-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
89 lines (89 loc) · 2.34 KB
/
.eslintrc.js
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
79
80
81
82
83
84
85
86
87
88
89
/** @type {import('@types/eslint').Linter.BaseConfig} */
module.exports = {
root: true,
overrides: [
{
files: [ "*.tsx", "*.ts", "*.jsx", "*.js" ],
parser: "@typescript-eslint/parser",
processor: "@graphql-eslint/graphql",
rules: {
"no-console": "off",
"no-unused-vars": "off",
"array-bracket-spacing": [ "warn", "always" ],
"object-curly-spacing": [ "warn", "always" ],
"space-in-parens": [ "warn", "always" ],
"indent": [ "error", "tab" ],
"unused-imports/no-unused-imports": "off",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
],
"alphabetize": {
"order": "asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
"caseInsensitive": true /* ignore case. Options: [true, false] */
}
}
],
"import/namespace": [ "error", { "allowComputed": true } ],
"jsdoc/require-param-type": "off",
"react/function-component-definition": [ 2, { "namedComponents": "arrow-function" } ]
},
extends: [
"eslint:recommended",
"next/core-web-vitals",
"plugin:@wordpress/eslint-plugin/jsx-a11y",
"plugin:@wordpress/eslint-plugin/esnext",
"plugin:@wordpress/eslint-plugin/i18n",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@next/next/recommended"
],
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
env: {
browser: true,
node: true,
es6: true
},
globals: {
"window": true,
"document": true,
},
plugins: [ "prettier", "import", "unused-imports", "@typescript-eslint" ],
settings: {
"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`
}
}
}
},
{
files: [ "*.graphql" ],
parser: "@graphql-eslint/eslint-plugin",
extends: "plugin:@graphql-eslint/schema-recommended",
plugins: [ "@graphql-eslint" ]
}
]
}