ci: update tsconfig and refactor eslintrc (#2069)
parent
c555c10496
commit
0bc92404bb
|
@ -1,49 +1,34 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"parser": "@typescript-eslint/parser",
|
parser: "@typescript-eslint/parser",
|
||||||
"parserOptions": {
|
parserOptions: {
|
||||||
"project": "tsconfig.json"
|
project: "tsconfig.json",
|
||||||
},
|
},
|
||||||
"ignorePatterns": [
|
ignorePatterns: ["build/*", "coverage/*"],
|
||||||
"build/*",
|
settings: {
|
||||||
"coverage/*"
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
"typescript": {}
|
typescript: {},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"extends": [
|
},
|
||||||
"react-app",
|
extends: ["react-app", "plugin:import/errors", "plugin:import/warnings", "plugin:prettier/recommended", "prettier"],
|
||||||
"plugin:import/errors",
|
rules: {
|
||||||
"plugin:import/warnings",
|
|
||||||
"plugin:prettier/recommended",
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"import/order": [
|
"import/order": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"groups": [
|
groups: ["builtin", "external", "internal"],
|
||||||
"builtin",
|
pathGroups: [
|
||||||
"external",
|
|
||||||
"internal"
|
|
||||||
],
|
|
||||||
"pathGroups": [
|
|
||||||
{
|
{
|
||||||
"pattern": "react",
|
pattern: "react",
|
||||||
"group": "external",
|
group: "external",
|
||||||
"position": "before"
|
position: "before",
|
||||||
}
|
},
|
||||||
],
|
|
||||||
"pathGroupsExcludedImportTypes": [
|
|
||||||
"react"
|
|
||||||
],
|
],
|
||||||
|
pathGroupsExcludedImportTypes: ["react"],
|
||||||
"newlines-between": "always",
|
"newlines-between": "always",
|
||||||
"alphabetize": {
|
alphabetize: {
|
||||||
"order": "asc",
|
order: "asc",
|
||||||
"caseInsensitive": true
|
caseInsensitive: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
};
|
};
|
|
@ -21,6 +21,7 @@
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
".*.js",
|
||||||
"src",
|
"src",
|
||||||
"types"
|
"types"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue