-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add action to lint JS files using lint-js
script
#71
Add action to lint JS files using lint-js
script
#71
Conversation
Using `npm scripts` and `wp-scripts` to lint JS files
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.
@mitogh Great work! Only left a few small comments that should be quick to resolve.
.github/workflows/js-lint.yml
Outdated
- trunk | ||
# Only run if JS/JSON/Lint/NVM files changed. | ||
paths: | ||
- '.github/workflows/js-css-lint-test.yml' |
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.
This needs to be adjusted to the file name here js-lint.yml
.
.github/workflows/js-lint.yml
Outdated
- '.github/workflows/js-css-lint-test.yml' | ||
- '**.js' | ||
- '**.json' | ||
- '**.scss' |
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.
Probably not necessary to include .scss
files here since this is exclusively for JS linting?
.github/workflows/js-lint.yml
Outdated
- trunk | ||
# Only run if JS/JSON/Lint/NVM files changed. | ||
paths: | ||
- '.github/workflows/js-css-lint-test.yml' |
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.
See above.
.github/workflows/js-lint.yml
Outdated
- '.github/workflows/js-css-lint-test.yml' | ||
- '**.js' | ||
- '**.json' | ||
- '**.scss' |
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.
See above.
package-lock.json
Outdated
"resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", | ||
"integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", | ||
"dev": true | ||
}, |
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.
This seems like an unrelated, system-specific update? Can you revert that?
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.
Great!
Fixes #62
Adds an action to lint JS files only using
wp-scripts
.