-
Notifications
You must be signed in to change notification settings - Fork 37
chore: Add ESLint 7 support #39
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
Conversation
| keys: | ||
| - v1-dependencies-{{ checksum "yarn.lock" }} | ||
| - v1-dependencies-{{ checksum "yarn.lock" }}-<< parameters.eslint >> | ||
| - v1-dependencies- |
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.
What is this cache key used for?
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.
We make CircleCI cache the NPM dependencies between builds so we don't have to redownload them.
Based on your other comments, I will rework the CI config.
| "scripts": { | ||
| "format": "prettier --write \"**/*.{js,md}\"", | ||
| "format:check": "prettier --check \"**/*.{js,md}\"", | ||
| "lint": "eslint", |
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.
| "lint": "eslint", | |
| "lint": "eslint .", |
Seems like eslint@6 just prints the help options when you don't specify a path:
https://app.circleci.com/pipelines/github/salesforce/eslint-config-lwc/75/workflows/10ee9089-33c8-4f5e-9336-975ba1157ead/jobs/75
But eslint@7 is fine without it:
https://app.circleci.com/pipelines/github/salesforce/eslint-config-lwc/75/workflows/10ee9089-33c8-4f5e-9336-975ba1157ead/jobs/76
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.
Good catch @ekashida. I think we need to run yarn lint first and then install a different eslint version to run the tests.
|
|
||
| - run: yarn format:check | ||
| - run: yarn lint | ||
| - run: yarn test |
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.
Just to confirm, from the compatibility perspective, we're more interested in the test results because yarn lint just lints the source in this repo?
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.
Yes, you are right.
|
I updated the workflow based on your recommendation. Let me know what you think =) |
ekashida
left a comment
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.
lgtm!
This PR adds support for ESLint 7 to this package:
Fixes #38