Skip to content

Conversation

@nolanlawson
Copy link
Contributor

The main changes are to devDependencies and the test files, so this shouldn't introduce any breakages.

I did update our devDep on 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.

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');
Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Contributor

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.

@nolanlawson
Copy link
Contributor Author

Based on the review, it looks like we actually have additional work needed to support ESLint v8.

@nolanlawson
Copy link
Contributor Author

Related: salesforce/eslint-plugin-lwc#79

@nolanlawson
Copy link
Contributor Author

nolanlawson commented Nov 9, 2021

OK, this PR should pass once salesforce/eslint-plugin-lwc#79 is merged and published.

@nolanlawson
Copy link
Contributor Author

This PR is green now!

@nolanlawson nolanlawson changed the title chore: update dependencies fix: update dependencies, support ESLint v8 Nov 11, 2021
Copy link
Contributor

@pmdartus pmdartus left a 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.

@pmdartus pmdartus merged commit c36ea2e into master Nov 16, 2021
@pmdartus pmdartus deleted the nolan/update-deps-201111 branch November 16, 2021 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants