-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
67 lines (54 loc) · 1.83 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
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"next/core-web-vitals",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
// Require indentation of 2 spaces.
"indent": ["error", 2],
// Require single quotes.
"quotes": ["error", "single"],
// Require double quotes in JSX.
"jsx-quotes": ["error", "prefer-double"],
// Don't use semicolons.
"semi": ["error", "never"],
// Require dangling comma on multiline constructs.
"comma-dangle": ["error", "always-multiline" ],
// Require spaces around object:
// { key1: value1, key2: value2 }
"object-curly-spacing": ["error", "always", {
"objectsInObjects": false
}],
// Disallow spaces around arrays:
// [element1, element2, element3]
"array-bracket-spacing": ["error", "never"],
// Require parentheses around parameters in arrow functions:
// (a, b, c) => expr
"arrow-parens": ["error", "always"],
// Ignore unused variables if prefixed with '_'.
"@typescript-eslint/no-unused-vars": ["warn", {
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}],
// Allow empty interfaces.
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"react/jsx-tag-spacing": ["error", {
// Require a space before closing a self-closing JSX element:
// <div />
"beforeSelfClosing": "always",
// Disallow spaces before closing a normal JSX element:
// <div>...</div>
"beforeClosing": "never"
}],
// Allow children to be passed as prob.
// This is almost a necessity if we want to pass function variables as children.
"react/no-children-prop": "off"
}
}