This repository was archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.js
92 lines (90 loc) · 3.05 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
90
91
92
const path = require('path')
'use strict'
module.exports = {
parser: 'babel-eslint',
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true
}
},
extends: ['plugin:react/recommended', 'airbnb'],
plugins: ['react', 'module-resolver', 'react-hooks', 'standard', 'import', 'promise', 'unicorn', 'no-loops'],
env: {
browser: true,
'es6': true
},
globals: {
React: false,
COOKIE_KEYS: false,
PORT: false,
getEnvConfig: false
},
settings: {
'import/resolver': {
"alias": {
"map": [
['@icons', path.resolve(__dirname, './src/app/components/Icons')],
['@services', path.resolve(__dirname, './src/app/services')],
['@utils', path.resolve(__dirname, './src/app/utils')],
['@context', path.resolve(__dirname, './src/app/context')],
['@hoc', path.resolve(__dirname, './src/app/hoc')],
['@components', path.resolve(__dirname, './src/app/components')],
['@constants', path.resolve(__dirname, './src/app/constants')],
['@reducers', path.resolve(__dirname, './src/app/reducers')],
['@static', path.resolve(__dirname, './src/app/static')],
['@mutations', path.resolve(__dirname, './src/app/mutations')],
['@theme', path.resolve(__dirname, './src/app/theme')],
['@server', path.resolve(__dirname, './src/server')]
],
extensions: ['.ts', '.js', '.jsx', '.json']
}
}
},
rules: {
'jsx-quotes': [2, 'prefer-single'],
'react/jsx-indent-props': [2, 2],
'react/jsx-indent': [2, 2],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/forbid-prop-types': ['error', { forbid: ['any'] }],
'react/require-default-props': 0,
'react/jsx-no-target-blank': 0,
'react/no-unused-prop-types': 0,
'react/no-did-mount-set-state': 0,
'react/jsx-no-undef': [2, { allowGlobals: true }],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react/jsx-one-expression-per-line': [0],
'no-shadow': ['error', { allow: ['webpackConfig'] }],
'no-unused-vars': ['error', { vars: 'local' }],
'no-param-reassign': ['error', { props: true }],
'jsx-a11y/media-has-caption': 0,
'jsx-a11y/anchor-is-valid': 0,
'import/first': 'warn',
'quotes': ['error', 'single'],
'max-len': [2, 120, 2],
'semi': [2, 'never'],
'key-spacing': 0,
'comma-dangle': [2, 'never'],
'object-curly-spacing': [2, 'always'],
'object-curly-newline': 0,
'prefer-rest-params': 0,
'arrow-body-style': ['error', 'as-needed'],
'no-unused-expressions': [
1,
{
'allowTaggedTemplates': true,
'allowShortCircuit': true
}
],
'lines-between-class-members': ['error', 'always'],
'no-loops/no-loops': 2,
'unicorn/no-abusive-eslint-disable': ['warn', 'always'],
'unicorn/filename-case': 0,
'unicorn/catch-error-name': 0,
'import/no-extraneous-dependencies': 0,
'import/first': ['warn'],
"no-console": "off"
}
}