-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
101 lines (100 loc) · 3.01 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
93
94
95
96
97
98
99
100
101
const restrictedGlobals = require('eslint-restricted-globals')
.filter(name => name !== 'self');
module.exports = {
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaVersion: 2018,
},
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
globals: {
chrome: true,
it: true,
xit: true,
describe: true,
beforeAll: true,
beforeEach: true,
afterEach: true,
afterAll: true,
before: true,
after: true,
chai: true,
sinon: true,
expect: true,
jest: true,
test: true,
cy: true,
Cypress: true,
},
env: {
browser: true,
node: true,
},
rules: {
'arrow-parens': ['error', 'as-needed'],
'class-methods-use-this': 0,
'comma-dangle': ['error', 'always-multiline'],
'curly': ['error', 'all'],
'consistent-return': 0,
'dot-notation': [2, { allowPattern: '^[a-z]+(_[a-z]+)+$' }],
'func-names':2,
'function-paren-newline': 0,
'func-style': [ 'error', 'declaration', { 'allowArrowFunctions': false } ],
'global-require': 0,
'import/extensions': 0,
'import/export': 0,
'import/named': 2,
'import/no-default-export': 0,
'import/no-extraneous-dependencies': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'import/order': 2,
'implicit-arrow-linebreak': 0,
'linebreak-style': process.env.NODE_ENV !== 'production' ? 'off' : ['error', 'unix'],
'max-len': ['error', {
code: 150,
ignoreUrls: true,
ignoreStrings: true,
ignoreComments: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignorePattern: '<p>|<p|<span>|<small>'
}],
'max-params': ['error', 3],
'no-console': 2,
'no-debugger': 1,
'no-nested-ternary': 0,
'no-plusplus': 0,
'no-mixed-operators': 0,
'no-param-reassign': ['error', { props: false }],
'no-use-before-define': 0,
'no-restricted-syntax': ['error', 'WithStatement'],
'no-return-assign': 0,
'no-restricted-globals': ['error'].concat(restrictedGlobals),
'operator-linebreak': [2, 'after', { 'overrides': { '?': 'before', ':': 'before' } }],
'object-curly-newline': 0,
'operator-linebreak': 0,
'prefer-destructuring': 0,
'require-jsdoc': 0,
'space-before-function-paren': ['error', 'never'],
'spaced-comment': 0,
'sort-keys': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/indent': 0,
'@typescript-eslint/array-type': ['error', 'array'],
'@typescript-eslint/interface-name': [true, 'never'],
'@typescript-eslint/no-angle-bracket-type-assertion': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/no-object-literal-type-assertion': 0,
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'valid-jsdoc': 0,
},
};