-
-
Notifications
You must be signed in to change notification settings - Fork 119
feat: ESLint-plugin -- Add report option to be able to control the reporting level (matching the CLI): "all", "simple", "typos", "flagged".
#8273
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
Changes from all commits
8876cb6
e978598
7934b27
f9b0627
7c1a663
26f35bd
335fc47
c5cd63b
a00eb52
b580c50
0bd80fc
1815264
300558b
1a28afd
c98d0d1
4e76835
ee61d47
82a545c
5641dfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,5 @@ ignoreWords: | |
| - bluelist | ||
| words: | ||
| - synckit | ||
| flaggedWords: | ||
| - testFlaggedWord | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # dictionaries: | ||
| # - business-terminology | ||
| # dictionaryDefinitions: | ||
| # - name: business-terminology | ||
| # path: ./dictionaries/business-terminology.txt | ||
| flaggedWords: | ||
| - flaggedmagicword |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| bestbusiness | ||
| friendz | ||
| flaggedmagicword |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import eslint from '@eslint/js'; | ||
| import nodePlugin from 'eslint-plugin-n'; | ||
| import cspellRecommended from '@cspell/eslint-plugin/recommended'; | ||
|
|
||
| /** | ||
| * @type { import("eslint").Linter.Config[] } | ||
| */ | ||
| const config = [ | ||
| eslint.configs.recommended, | ||
| nodePlugin.configs['flat/recommended-module'], | ||
| { | ||
| rules: { | ||
| 'n/no-extraneous-import': 'off', | ||
| 'n/no-unpublished-import': 'off', | ||
| }, | ||
| }, | ||
| cspellRecommended, | ||
| { | ||
| rules: { | ||
| '@cspell/spellchecker': [ | ||
| 'warn', | ||
| { | ||
| debugMode: false, | ||
| autoFix: true, | ||
| cspell: { | ||
| dictionaries: ['business-terminology'], | ||
| dictionaryDefinitions: [ | ||
| { | ||
| name: 'business-terminology', | ||
| path: './dictionaries/business-terminology.txt', | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| ]; | ||
|
|
||
| export default config; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "name": "@internal/issue-4870-fixture", | ||
| "version": "1.0.0", | ||
| "description": "", | ||
| "main": "sample.js", | ||
| "scripts": { | ||
| "test": "eslint ." | ||
| }, | ||
| "keywords": [], | ||
| "author": "", | ||
| "license": "ISC", | ||
| "devDependencies": { | ||
| "@cspell/eslint-plugin": "workspace:^", | ||
| "eslint": "^8.50.0" | ||
|
Collaborator
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. Hmm, I didn't realize that eslint 8 was still sitting around. I'll fix it in another PR. |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| console.log('hello bestbusiness and friendz'); | ||
| console.log('hello flaggedmagicword and friendz'); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,17 @@ ruleTester.run('cspell', Rule.rules.spellchecker, { | |
| ], | ||
| }, | ||
| }), | ||
| readFix('issue-8261/sample.js', { | ||
| cspell: { | ||
|
Collaborator
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. The Since we are testing the two settings, |
||
| dictionaries: ['business-terms'], | ||
| dictionaryDefinitions: [ | ||
| { | ||
| name: 'business-terms', | ||
| path: fixtureRelativeToCwd('issue-8261/dictionaries/business-terminology.txt'), | ||
| }, | ||
| ], | ||
| }, | ||
| }), | ||
Jason3S marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ], | ||
| invalid: [ | ||
| // cspell:ignore Guuide Gallaxy BADD functionn coool | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.