chore(tools): convert .eslintrc.cjs to declarative .eslintrc.json (#1069)
Co-authored-by: chris <chris@bumblehead.com>pull/1068/head
parent
36bd539557
commit
38ee0df895
@ -1,73 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint"],
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:markdown/recommended",
|
||||
"plugin:import/recommended",
|
||||
"plugin:import/typescript",
|
||||
"prettier",
|
||||
],
|
||||
env: {
|
||||
browser: true,
|
||||
node: false,
|
||||
},
|
||||
ignorePatterns: ["browserstack-browsers.js", "web-test-runner.config.js"],
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.ts", "*.tsx"],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ["./tsconfig.json", "test/tsconfig.json"],
|
||||
},
|
||||
extends: [
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
],
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-unsafe-return": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/no-redundant-type-constituents": "off",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["test/unit/**/*.ts", "test/unit/*.tsx"],
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["examples/**/*.js"],
|
||||
rules: {
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["*.js"],
|
||||
excludedFiles: ["examples/**"],
|
||||
extends: ["plugin:node/recommended"],
|
||||
env: {
|
||||
node: true,
|
||||
browser: false,
|
||||
},
|
||||
rules: {
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
"max-statements-per-line": "error",
|
||||
"no-var": "error",
|
||||
"import/newline-after-import": "error",
|
||||
"import/no-default-export": "error",
|
||||
},
|
||||
};
|
@ -0,0 +1,69 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"ignorePatterns": ["build"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:markdown/recommended",
|
||||
"plugin:import/recommended",
|
||||
"plugin:import/typescript",
|
||||
"prettier"
|
||||
],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": false
|
||||
},
|
||||
"ignorePatterns": ["browserstack-browsers.js", "web-test-runner.config.js"],
|
||||
"overrides": [{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"parserOptions": {
|
||||
"project": ["./tsconfig.json", "test/tsconfig.json"]
|
||||
},
|
||||
"extends": [
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-unsafe-return": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/no-redundant-type-constituents": "off"
|
||||
}
|
||||
}, {
|
||||
"files": ["test/unit/**/*.ts", "test/unit/*.tsx"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
}
|
||||
}, {
|
||||
"files": ["examples/**/*.js"],
|
||||
"rules": {
|
||||
"import/no-unresolved": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off"
|
||||
}
|
||||
}, {
|
||||
"files": ["*.js"],
|
||||
"excludedFiles": ["examples/**"],
|
||||
"extends": ["plugin:node/recommended"],
|
||||
"env": {
|
||||
"node": true,
|
||||
"browser": false
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-var-requires": "off"
|
||||
}
|
||||
}],
|
||||
"rules": {
|
||||
"max-statements-per-line": "error",
|
||||
"no-var": "error",
|
||||
"import/newline-after-import": "error",
|
||||
"import/no-default-export": "error"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue