-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
40 lines (40 loc) · 1.21 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"env": {
"browser": true
},
"extends": ["airbnb"],
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint", "import/typescript"],
//出现import/no-unresolved错误, plugins中添加"plugin:import/typescript",https://stackoverflow.com/questions/55198502/using-eslint-with-typescript-unable-to-resolve-path-to-module
"rules": {
"react/prefer-stateless-function": "off",
"linebreak-style": "off",
"semi": ["error", "never"],
"quotes": "off",
// "react/jsx-filename-extension": [
// "error",
// {
// "extensions": [".js", ".jsx", ".ts", ".tsx"]
// }
// ],
"import/no-extraneous-dependencies": "off",
"no-use-before-define": "off"
}
// "settings": {
// "import/resolver": {
// "node": {
// "extensions": [".js", ".jsx", ".ts", ".tsx"]
// },
// "alias": {
// "map": [
// ["pages", "./src/pages"],
// ["@utils", "./src/utils"],
// ["@components", "./src/components"],
// ["common", "./src/common"],
// ["context", "./src/context"]
// ],
// "extensions": [".ts", ".tsx", ".js", ".jsx", ".json", ".d.ts"]
// }
// }
// }
}