generated from MerlinMason/NextProject
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
78 lines (78 loc) · 2.35 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"env": {
"browser": true,
"es2021": true,
"jest/globals": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"globals": {
"React": true,
"JSX": true
},
"processor": "disable/disable",
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:astro/recommended",
"airbnb",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"prettier"
],
"plugins": ["react", "@typescript-eslint", "import", "jsx-a11y", "jest", "disable", "prettier"],
"rules": {
"import/extensions": 0,
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"react/require-default-props": 0,
"react/function-component-definition": [2, { "namedComponents": "arrow-function" }],
"react/jsx-filename-extension": [2, { "extensions": [".js", ".jsx", ".tsx", ".mdx"] }],
"react/jsx-props-no-spreading": 0
},
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
}
}
},
"overrides": [
{
"files": ["**/*.mdx"],
"extends": ["plugin:mdx/recommended"],
"settings": {
"mdx/code-blocks": true,
"mdx/language-mapper": {}
}
},
{
// we need to make sure we're not linting js files twice
"files": ["**/*.js", "**/*.jsx"],
"settings": {
"disable/plugins": "@typescript-eslint"
}
},
{
"files": ["*.astro"],
"parser": "astro-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".astro"]
}
}
]
}