-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ESLint Plugin to support ignoring imported properties (#2573)
* test: move the test fixture files. * fix: do not spell check imported properties * fix: support ignoring imported properties. * fix: Make sure import aliases are checked. * Update index.test.ts
- Loading branch information
Showing
18 changed files
with
228 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
21 changes: 21 additions & 0 deletions
21
packages/cspell-eslint-plugin/fixtures/with-errors/creepyData.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export interface CreepyExpressions { | ||
muawhahaha: string; | ||
grrrrr: string; | ||
uuuug: string; | ||
} | ||
|
||
export const expressions: CreepyExpressions = { | ||
muawhahaha: 'muawhahaha', | ||
grrrrr: 'grrrrr', | ||
uuuug: 'uuuug', | ||
}; | ||
|
||
export const muawhahaha = expressions.muawhahaha; | ||
export const uuug = expressions.uuuug; | ||
export const grrr = expressions.grrrrr; | ||
|
||
export enum ExpressionCategory { | ||
MUAWHAHAHA = 0, | ||
GRRRRRR, | ||
UUUUUG, | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/cspell-eslint-plugin/fixtures/with-errors/importAlias.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { uuug as uuug, muawhahaha as evilLaugh, grrr } from './creepyData'; | ||
|
||
console.log(uuug); | ||
console.log(evilLaugh); | ||
console.log(grrr); |
7 changes: 7 additions & 0 deletions
7
packages/cspell-eslint-plugin/fixtures/with-errors/imports.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { muawhahaha, expressions } from './creepyData'; | ||
import * as creepy from './creepyData'; | ||
|
||
console.log(creepy.expressions.grrrrr); | ||
console.log(creepy.muawhahaha); | ||
console.log(muawhahaha); | ||
console.log(expressions.uuuug); |
This file contains 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* @type { import("eslint").Linter.Config } | ||
*/ | ||
const config = { | ||
extends: ['./.eslintrc.js', 'plugin:@cspell/debug'], | ||
}; | ||
|
||
module.exports = config; |
This file contains 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
21 changes: 21 additions & 0 deletions
21
test-packages/test-cspell-eslint-plugin/fixtures/creepyData.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export interface CreepyExpressions { | ||
muawhahaha: string; | ||
grrrrr: string; | ||
uuuug: string; | ||
} | ||
|
||
export const expressions: CreepyExpressions = { | ||
muawhahaha: 'muawhahaha', | ||
grrrrr: 'grrrrr', | ||
uuuug: 'uuuug', | ||
}; | ||
|
||
export const muawhahaha = expressions.muawhahaha; | ||
export const uuug = expressions.uuuug; | ||
export const grrr = expressions.grrrrr; | ||
|
||
export enum ExpressionCategory { | ||
MUAWHAHAHA = 0, | ||
GRRRRRR, | ||
UUUUUG, | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
test-packages/test-cspell-eslint-plugin/fixtures/importAlias.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { uuug as uuug, muawhahaha as evilLaugh, grrr } from './creepyData'; | ||
|
||
console.log(uuug); | ||
console.log(evilLaugh); | ||
console.log(grrr); |
Oops, something went wrong.