generated from serokell/metatemplates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
executable file
·85 lines (69 loc) · 2.18 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
// SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
module.exports = {
extends: [
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier/@typescript-eslint",
"prettier/react",
],
parserOptions: {
project: ["./tsconfig.json"],
},
ignorePatterns: ["/*.*"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
rules: {
// Sometime we need to specify any type, so it's rather useful
"@typescript-eslint/no-explicit-any": 0,
"react/jsx-closing-bracket-location": 0,
// Import modules from different places
"import/no-unresolved": 0,
// JSX extensions support
"react/jsx-filename-extension": [
2,
{
extensions: [".jsx", ".tsx"],
},
],
quotes: "off",
"@typescript-eslint/quotes": [2, "double", { avoidEscape: true }],
'no-plusplus': [2, { allowForLoopAfterthoughts: true }],
"@typescript-eslint/comma-dangle":
['error', {
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'never', },],
// Use TS no-unused-vars rule
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-use-before-define": 0,
// Support declarations in case
"no-case-declarations": 0,
// We already write props type in generic of functional component
"react/prop-types": 0,
"no-alert": 0, // TODO enable it later
// Rules for making interface available for people with disabilities
"jsx-a11y/control-has-associated-label": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
// Enable while(true) loops
"no-constant-condition": ["error", { checkLoops: false }],
"react/jsx-props-no-spreading": 0,
"jsx-a11y/tabindex-no-positive": 0,
"react/require-default-props": 0,
"no-nested-ternary": 0,
"import/prefer-default-export": 0
},
globals: {
window: true,
alert: true,
document: true,
Node: true,
},
};