1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

specify new eslint file

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
Sebastian Malton 2020-08-21 10:23:26 -04:00
parent 7294c11b38
commit 6085a6c02c

View File

@ -1,4 +1,4 @@
module.exports = { module.exports = {
overrides: [ overrides: [
{ {
files: [ files: [
@ -6,71 +6,104 @@ module.exports = {
"build/**/*.js", "build/**/*.js",
], ],
extends: [ extends: [
'eslint:recommended', "eslint:recommended",
], ],
env: { env: {
node: true node: true
}, },
parserOptions: { parserOptions: {
ecmaVersion: 2018, ecmaVersion: 2018,
sourceType: 'module', sourceType: 'module',
}, },
rules: { rules: {
"indent": ["error", 2], "indent": ["error", 2],
"no-unused-vars": "off", "no-unused-vars": "off",
"semi": ["error", "never"],
} }
}, },
{ {
files: [ files: [
"src/renderer/**/*.tsx",
"build/*.ts", "build/*.ts",
"src/**/*.ts", "src/**/*.ts",
"integration/**/*.ts" "integration/**/*.ts"
], ],
parser: "@typescript-eslint/parser", parser: "@typescript-eslint/parser",
extends: [ plugins: [
'plugin:@typescript-eslint/recommended', "react",
], ],
parserOptions: { extends: [
ecmaVersion: 2018, "plugin:@typescript-eslint/recommended",
sourceType: 'module', "plugin:react/recommended",
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-interface": "off",
"indent": ["error", 2]
},
},
{
files: [
"src/renderer/**/*.tsx",
], ],
parser: "@typescript-eslint/parser", parserOptions: {
extends: [
'plugin:@typescript-eslint/recommended',
],
parserOptions: {
ecmaVersion: 2018, ecmaVersion: 2018,
sourceType: 'module', sourceType: 'module',
jsx: true, jsx: true,
}, },
settings: {
react: {
version: "16.13",
},
},
rules: { rules: {
"@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off", "no-unused-vars": "off",
"@typescript-eslint/interface-name-prefix": "off", "comma-dangle": ["error", "always-multiline"],
"@typescript-eslint/no-use-before-define": "off", "object-shorthand": ["error", "always"],
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true,
}
],
"quotes": [
"error",
"double",
{
"avoidEscape": true,
}
],
"prefer-template": "error",
"no-useless-concat": "error",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": false,
}
],
"@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-ignore": "off", "@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/explicit-module-boundary-types": ["error"],
"@typescript-eslint/ban-types": "off", "@typescript-eslint/ban-types": ["error"],
"@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-function": "off",
"indent": ["error", 2] "@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": false,
},
}
],
"indent": [
"error",
2,
{
"SwitchCase": 1,
}
],
"semi": ["error", "never"],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/no-set-state": "error",
}, },
} }
] ]