generated from yandex-praktikum/client-server-template-with-vite
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
53 lines (53 loc) · 2.02 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
module.exports = {
env: {
browser: true,
es2020: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'airbnb'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 11,
},
plugins: ['@typescript-eslint'],
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'max-len': ['warn', { code: 100 }],
'@typescript-eslint/no-unused-vars': 2,
'react/jsx-boolean-value': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
indent: ['error', 4],
'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
'comma-dangle': 'off',
'import/no-extraneous-dependencies': 'off',
'no-console': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/function-component-definition': 'off',
'react/button-has-type': 'off',
'react/require-default-props': 'off',
'object-curly-newline': 'off',
'linebreak-style': 'off',
'arrow-parens': ['error', 'as-needed'],
'no-unused-expressions': ['error', { allowTernary: true, allowShortCircuit: true }],
'operator-linebreak': ['warn', 'after'],
'implicit-arrow-linebreak': ['warn', 'below'],
'prefer-template': 'off',
'no-nested-ternary': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
camelcase: 'off',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'class-methods-use-this': 'off',
'newline-per-chained-call': 'off',
},
};