ci: update tsconfig and refactor eslintrc (#2069)

pull/2071/head
Amir Zarrinkafsh 2021-06-08 10:14:51 +10:00 committed by GitHub
parent c555c10496
commit 0bc92404bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 39 deletions

View File

@ -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,
} },
} },
] ],
} },
}; };

View File

@ -21,6 +21,7 @@
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": [ "include": [
".*.js",
"src", "src",
"types" "types"
] ]