-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cf7236
commit 778c2bc
Showing
2 changed files
with
121 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,116 +1,149 @@ | ||
// Automatically generated by running npx @eslint/migrate-config .eslintrc.json | ||
|
||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import js from "@eslint/js"; | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import filenames from "eslint-plugin-filenames"; | ||
import github from "eslint-plugin-github"; | ||
import _import from "eslint-plugin-import"; | ||
import noAsyncForeach from "eslint-plugin-no-async-foreach"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import js from "@eslint/js"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import globals from "globals"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [{ | ||
ignores: ["**/webpack.config.js", "lib/**/*", "src/testdata/**/*", "tests/**/*"], | ||
}, ...fixupConfigRules(compat.extends( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:github/recommended", | ||
"plugin:github/typescript", | ||
"plugin:import/typescript", | ||
)), { | ||
export default [ | ||
{ | ||
ignores: [ | ||
"**/webpack.config.js", | ||
"lib/**/*", | ||
"src/testdata/**/*", | ||
"tests/**/*", | ||
"eslint.config.mjs", | ||
".github/**/*", | ||
], | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:github/recommended", | ||
"plugin:github/typescript", | ||
"plugin:import/typescript", | ||
), | ||
), | ||
{ | ||
plugins: { | ||
"@typescript-eslint": fixupPluginRules(typescriptEslint), | ||
filenames, | ||
github: fixupPluginRules(github), | ||
import: fixupPluginRules(_import), | ||
"no-async-foreach": noAsyncForeach, | ||
"@typescript-eslint": fixupPluginRules(typescriptEslint), | ||
filenames: fixupPluginRules(filenames), | ||
github: fixupPluginRules(github), | ||
import: fixupPluginRules(_import), | ||
"no-async-foreach": noAsyncForeach, | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 5, | ||
sourceType: "script", | ||
parser: tsParser, | ||
ecmaVersion: 5, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
globals: { | ||
...globals.node, | ||
}, | ||
|
||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
|
||
settings: { | ||
"import/resolver": { | ||
node: { | ||
moduleDirectory: ["node_modules", "src"], | ||
}, | ||
|
||
typescript: {}, | ||
"import/resolver": { | ||
node: { | ||
moduleDirectory: ["node_modules", "src"], | ||
}, | ||
|
||
typescript: {}, | ||
}, | ||
"import/ignore": ["sinon", "uuid", "@octokit/plugin-retry"], | ||
}, | ||
|
||
rules: { | ||
"filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"], | ||
"i18n-text/no-en": "off", | ||
|
||
"import/extensions": ["error", { | ||
json: {}, | ||
}], | ||
|
||
"import/no-amd": "error", | ||
"import/no-commonjs": "error", | ||
"import/no-cycle": "error", | ||
"import/no-dynamic-require": "error", | ||
|
||
"import/no-extraneous-dependencies": ["error", { | ||
devDependencies: true, | ||
}], | ||
|
||
"import/no-namespace": "off", | ||
"import/no-unresolved": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
|
||
"import/order": ["error", { | ||
alphabetize: { | ||
order: "asc", | ||
}, | ||
|
||
"newlines-between": "always", | ||
}], | ||
|
||
"max-len": ["error", { | ||
code: 120, | ||
ignoreUrls: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true, | ||
}], | ||
|
||
"no-async-foreach/no-async-foreach": "error", | ||
"no-sequences": "error", | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": "error", | ||
"one-var": ["error", "never"], | ||
"filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"], | ||
"i18n-text/no-en": "off", | ||
|
||
"import/extensions": [ | ||
"error", | ||
{ | ||
json: {}, | ||
}, | ||
], | ||
|
||
"import/no-amd": "error", | ||
"import/no-commonjs": "error", | ||
"import/no-cycle": "error", | ||
"import/no-dynamic-require": "error", | ||
|
||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
devDependencies: true, | ||
}, | ||
], | ||
|
||
"import/no-namespace": "off", | ||
"import/no-unresolved": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
|
||
"import/order": [ | ||
"error", | ||
{ | ||
alphabetize: { | ||
order: "asc", | ||
}, | ||
|
||
"newlines-between": "always", | ||
}, | ||
], | ||
|
||
"max-len": [ | ||
"error", | ||
{ | ||
code: 120, | ||
ignoreUrls: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true, | ||
}, | ||
], | ||
|
||
"no-async-foreach/no-async-foreach": "error", | ||
"no-sequences": "error", | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": "error", | ||
"one-var": ["error", "never"], | ||
}, | ||
}, { | ||
files: ["**"], | ||
}, | ||
{ | ||
files: ["**/*.ts", "**/*.js"], | ||
|
||
rules: { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/prefer-regexp-exec": "off", | ||
"@typescript-eslint/require-await": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"func-style": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/prefer-regexp-exec": "off", | ||
"@typescript-eslint/require-await": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"func-style": "off", | ||
}, | ||
}]; | ||
}, | ||
]; |
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