-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
67 lines (67 loc) · 2.44 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
{
"env": {
"browser": true,
"jest": true,
"es6": true
},
"extends": ["airbnb-typescript", "plugin:compat/recommended", "plugin:prettier/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
/*
To use eslint with VSCode and see lint error directly in file,
you have to install dbaeumer.vscode-eslint extension
and you may have to tweak your workspace settings with:
"eslint.workingDirectories": ["src/frontend"]
As frontend is not at the root of the repository,
this setting allows ESLint extension to find the ./tsconfig.json file
*/
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["formatjs", "@typescript-eslint"],
/* Disable some rules to be iso with tslint which was previously used */
"rules": {
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/no-use-before-define": "off",
"arrow-parens": "error",
"consistent-return": "off",
"default-case": "off",
"formatjs/no-multiple-whitespaces": "error",
"formatjs/enforce-description": "error",
"formatjs/enforce-default-message": "error",
"global-require": "off",
"import/extensions": "off",
"import/no-cycle": ["off"],
"import/no-dynamic-require": "off",
"import/prefer-default-export": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "warn",
"no-console": ["error", { "allow": ["warn"] }],
"no-else-return": "off",
"no-empty-function": "off",
"no-nested-ternary": "warn",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
"no-return-assign": "off",
"no-return-await": "off",
"no-undef": "off",
"no-underscore-dangle": "off",
"no-useless-escape": "off",
"prefer-template": "off",
"react/button-has-type": "off",
"react/destructuring-assignment": "off",
"react/jsx-boolean-value": "off",
"react/jsx-fragments": "off",
"react/jsx-props-no-spreading": "off",
"react/no-array-index-key": "warn",
"react/prop-types": "off",
"react/require-default-props": "off"
},
"settings": {
"polyfills": ["fetch", "Promise"]
}
}