-
Couldn't load subscription status.
- Fork 37
fix: update dependencies, support ESLint v8 #77
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
test/recommended.js
Outdated
| assert.strictEqual(messages[0].ruleId, '@lwc/lwc/no-dupe-class-members'); | ||
| assert.strictEqual(messages[1].ruleId, '@lwc/lwc/no-dupe-class-members'); | ||
| assert.strictEqual(messages[0].ruleId, 'no-dupe-class-members'); | ||
| assert.strictEqual(messages[1].ruleId, 'no-dupe-class-members'); |
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.
Looks like there is now an official ESLint rule: https://eslint.org/docs/rules/no-dupe-class-members
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 should deprecate the @lwc/lwc/no-dupe-class-members rule now that ESLint has builtin support for this.
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.
It looks like @lwc/lwc/no-dupe-class-members was designed to extend the built-in rule which lacked support for class fields. It appears to have support for class fields now. So yeah, it can be removed.
| it('should load properly base config', () => { | ||
| const cli = new eslint.CLIEngine({ | ||
| it('should load properly base config', async () => { | ||
| const cli = new eslint.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.
For details on the ESLint API changes, see:
test/recommended.js
Outdated
| assert.strictEqual(messages[0].ruleId, '@lwc/lwc/no-dupe-class-members'); | ||
| assert.strictEqual(messages[1].ruleId, '@lwc/lwc/no-dupe-class-members'); | ||
| assert.strictEqual(messages[0].ruleId, 'no-dupe-class-members'); | ||
| assert.strictEqual(messages[1].ruleId, 'no-dupe-class-members'); |
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 should deprecate the @lwc/lwc/no-dupe-class-members rule now that ESLint has builtin support for this.
|
Based on the review, it looks like we actually have additional work needed to support ESLint v8. |
|
Related: salesforce/eslint-plugin-lwc#79 |
|
OK, this PR should pass once salesforce/eslint-plugin-lwc#79 is merged and published. |
|
This PR is green now! |
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 still need to update @salesforce/eslint-plugin-lightning.
The main changes are to
devDependenciesand the test files, so this shouldn't introduce any breakages.I did update our
devDepon ESLint from 7 to 8, though. But again, all changes are in the test files, so we should be compatible with both ESLint 7 and 8.