-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup eslint config #562
Conversation
+ prettier on eslintrc + hides warning by updating eslint dependency
run: | | ||
echo "::remove-matcher owner=eslint-compact::" | ||
echo "::remove-matcher owner=eslint-stylish::" | ||
npm run lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy only tracks changes, but not existing files. I added this CI job to ensure that all files are affected by new rules.
Possible improvements:
- Run this job only if the lockfile or eslint config has changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow would be this, if interested, but I think it's best to just leave it running at all times. It costs nothing and it already passes thanks to this PR 🎉
lint.yml
name: Lint
on:
push:
branches:
- "*"
path:
- .eslintrc
- package-lock.json
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: bahmutov/npm-install@v1
# Run eslint without GitHub Actions annotations
# https://stackoverflow.com/a/65964721/288906
- name: npm run lint
run: |
echo "::remove-matcher owner=eslint-compact::"
echo "::remove-matcher owner=eslint-stylish::"
npm run lint
import reactTemplate from "@contrib/templates/reader-react.txt"; | ||
import menuTemplate from "@contrib/templates/foundation-menu-item.txt"; | ||
import panelTemplate from "@contrib/templates/foundation-panel.txt"; | ||
import blueprintTemplate from "@contrib/templates/blueprint-menu.txt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fregante You can test this by 1) going to the workshop, 2) clicking create new brick, and 3) selecting a template from the dropdown
See documentation for more information on accessing: https://docs.pixiebrix.com/developer-guide/workshop-basics#202afa4a0c0b4c449031d30540ba9a5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fregante see comment on how to test. Also, I merged in the prettier PR you made, so you might need to re-run on these files? Do we need to fix the prettier configuration in pre-commit: http://github.com/pixiebrix/pixiebrix-extension/blob/7e46cde8f20cc265af7668d1d40c98a2bab9160a/.pre-commit-config.yaml#L13-L13? |
Prettier run, PR ready to merge. |
Setup for #536
Includes parts of #513
This PR ensures that the
lint
script actually runs without errors.Before moving onto adding further plugins, I think it's best to fix existing errors first.