-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deps): update to
@typescript-eslint/*
v8 (#955)
- Loading branch information
1 parent
c6f254d
commit 8403d69
Showing
17 changed files
with
296 additions
and
302 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
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 |
---|---|---|
@@ -1,26 +1,20 @@ | ||
import { readdirSync } from 'fs'; | ||
import { join, parse } from 'path'; | ||
|
||
import { TSESLint } from '@typescript-eslint/utils'; | ||
|
||
import { importDefault, TestingLibraryRuleMeta } from '../utils'; | ||
|
||
type RuleModule = TSESLint.RuleModule<string, unknown[]> & { | ||
meta: TestingLibraryRuleMeta<string, unknown[]> & { | ||
recommended: false; | ||
}; | ||
}; | ||
import { importDefault, TestingLibraryPluginRuleModule } from '../utils'; | ||
|
||
const rulesDir = __dirname; | ||
const excludedFiles = ['index']; | ||
|
||
export default readdirSync(rulesDir) | ||
.map((rule) => parse(rule).name) | ||
.filter((ruleName) => !excludedFiles.includes(ruleName)) | ||
.reduce<Record<string, RuleModule>>( | ||
.reduce<Record<string, TestingLibraryPluginRuleModule<string, unknown[]>>>( | ||
(allRules, ruleName) => ({ | ||
...allRules, | ||
[ruleName]: importDefault<RuleModule>(join(rulesDir, ruleName)), | ||
[ruleName]: importDefault< | ||
TestingLibraryPluginRuleModule<string, unknown[]> | ||
>(join(rulesDir, ruleName)), | ||
}), | ||
{} | ||
); |
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
Oops, something went wrong.