-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8b04c6f
chore: update dependencies
nolanlawson b593faa
fix: fix for newest eslint-plugin-lwc
nolanlawson c069417
fix: explicitly check eslint version
nolanlawson d8fc303
fix: remove eslint compat
nolanlawson f714c81
test: fix eslint version check
nolanlawson b55de4c
chore: update eslint-plugin-lwc
nolanlawson a4e90b3
Upgrade eslint-plugin-lightning peer dependency
pmdartus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,36 +20,36 @@ describe('base config', () => { | |
| unlinkConfig(); | ||
| }); | ||
|
|
||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. For details on the ESLint API changes, see: |
||
| useEslintrc: false, | ||
| baseConfig: { | ||
| extends: '@salesforce/eslint-config-lwc/base', | ||
| }, | ||
| }); | ||
|
|
||
| const report = cli.executeOnText(` | ||
| const results = await cli.lintText(` | ||
| import { api } from 'lwc'; | ||
| class Foo { | ||
| @api({ param: true }) | ||
| foo; | ||
| } | ||
| `); | ||
|
|
||
| const { messages } = report.results[0]; | ||
| const { messages } = results[0]; | ||
| assert.equal(messages.length, 1); | ||
| assert.equal(messages[0].ruleId, '@lwc/lwc/valid-api'); | ||
| }); | ||
|
|
||
| it('should include @lwc/lwc/no-unknown-wire-adapters rule', () => { | ||
| const cli = new eslint.CLIEngine({ | ||
| it('should include @lwc/lwc/no-unknown-wire-adapters rule', async () => { | ||
| const cli = new eslint.ESLint({ | ||
| useEslintrc: false, | ||
| baseConfig: { | ||
| extends: '@salesforce/eslint-config-lwc/base', | ||
| }, | ||
| }); | ||
|
|
||
| const report = cli.executeOnText(` | ||
| const results = await cli.lintText(` | ||
| import { wire } from 'lwc'; | ||
| import { Baz } from 'c/cmp'; | ||
| class Foo { | ||
|
|
@@ -58,20 +58,20 @@ describe('base config', () => { | |
| } | ||
| `); | ||
|
|
||
| const { messages } = report.results[0]; | ||
| const { messages } = results[0]; | ||
| assert.equal(messages.length, 1); | ||
| assert.equal(messages[0].ruleId, '@lwc/lwc/no-unknown-wire-adapters'); | ||
| }); | ||
|
|
||
| it('should include @lwc/lwc/no-unexpected-wire-adapter-usages', () => { | ||
| const cli = new eslint.CLIEngine({ | ||
| it('should include @lwc/lwc/no-unexpected-wire-adapter-usages', async () => { | ||
| const cli = new eslint.ESLint({ | ||
| useEslintrc: false, | ||
| baseConfig: { | ||
| extends: '@salesforce/eslint-config-lwc/base', | ||
| }, | ||
| }); | ||
|
|
||
| const report = cli.executeOnText(` | ||
| const results = await cli.lintText(` | ||
| import { wire } from 'lwc'; | ||
| import { CurrentPageReference } from 'lightning/navigation'; | ||
| const reference = CurrentPageReference; | ||
|
|
@@ -81,7 +81,7 @@ describe('base config', () => { | |
| } | ||
| `); | ||
|
|
||
| const { messages } = report.results[0]; | ||
| const { messages } = results[0]; | ||
| assert.equal(messages.length, 1); | ||
| assert.equal(messages[0].ruleId, '@lwc/lwc/no-unexpected-wire-adapter-usages'); | ||
| }); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.