forked from joaopaulovieira/clappr-tvs-key-mapping-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
160 lines (160 loc) · 6.62 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
module.exports = {
env: { browser: true, node: true, jest: true },
globals: { Clappr: true, $: true },
extends: ['eslint:recommended'],
parserOptions: { sourceType: 'module', ecmaVersion: 2018 },
rules: {
// Possible Errors
'getter-return': ['error', { allowImplicit: true }], // overrides eslint:recommended
'no-await-in-loop': ['error'],
'no-console': ['error'],
'no-extra-parens': [
'warn',
'all',
{
conditionalAssign: false,
returnAssign: false,
nestedBinaryExpressions: false,
enforceForArrowConditionals: false,
},
],
'no-import-assign': ['error'],
'no-template-curly-in-string': ['error'],
// Best Practices
'accessor-pairs': ['error', { setWithoutGet: true }],
'array-callback-return': ['error', { allowImplicit: true }],
curly: ['error', 'multi', 'consistent'],
'default-param-last': ['error'],
'dot-location': ['error', 'property'],
'dot-notation': ['error'],
eqeqeq: ['error', 'smart'],
'max-classes-per-file': ['error', 1],
'no-alert': ['error'],
'no-caller': ['error'],
'no-eq-null': ['error'],
'no-else-return': ['error'],
'no-empty-function': ['warn', { allow: ['arrowFunctions', 'methods', 'generatorMethods', 'setters'] }],
'no-eval': ['error'],
'no-extend-native': ['error'],
'no-extra-bind': ['error'],
'no-extra-label': ['error'],
'no-implicit-coercion': ['error', { boolean: false }],
'no-implicit-globals': ['error'],
'no-implied-eval': ['error'],
'no-iterator': ['error'],
'no-labels': ['error'],
'no-lone-blocks': ['error'],
'no-loop-func': ['error'],
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'no-multi-str': ['error'],
'no-new': ['error'],
'no-new-func': ['error'],
'no-new-wrappers': ['error'],
'no-octal-escape': ['error'],
'no-param-reassign': ['error'],
'no-proto': ['error'],
'no-return-assign': ['error', 'except-parens'],
'no-return-await': ['error'],
'no-self-compare': ['error'],
'no-script-url': ['error'],
'no-sequences': ['error'],
'no-throw-literal': ['error'],
'no-unmodified-loop-condition': ['error'],
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'no-useless-call': ['error'],
'no-useless-concat': ['error'],
'no-useless-return': ['error'],
'no-void': ['error'],
'prefer-regex-literals': ['error'],
radix: ['error'],
'require-await': ['error'],
'wrap-iife': ['error', 'inside'],
yoda: ['error', 'never'],
// Variables
'no-label-var': ['error'],
'no-restricted-globals': ['error', { name: 'event', message: 'Use local parameter instead.' }],
'no-undef-init': ['error'],
'no-use-before-define': ['error'],
// Stylistic Issues
'array-bracket-newline': ['error', { multiline: true }],
'array-bracket-spacing': ['error', 'never'],
'array-element-newline': ['error', 'consistent'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
camelcase: ['error', { properties: 'always' }],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'eol-last': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'func-style': ['error', 'expression'],
'function-call-argument-newline': ['error', 'consistent'],
'func-name-matching': ['error', 'always'],
'function-paren-newline': ['error', 'consistent'],
'implicit-arrow-linebreak': ['error', 'beside'],
indent: ['error', 2],
'key-spacing': ['error', { mode: 'strict' }],
'keyword-spacing': ['error', { before: true, after: true }],
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': ['error', 'always'],
'max-depth': ['error', 4],
'max-len': ['error', 144, { ignoreTrailingComments: true, ignoreUrls: true }],
'new-cap': ['error'],
'new-parens': ['error', 'always'],
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 3 }],
'no-array-constructor': ['error'],
'no-lonely-if': ['error'],
'no-multi-assign': ['error'],
'no-multiple-empty-lines': ['error', { max: 1 }],
'no-negated-condition': ['error'],
'no-new-object': ['error'],
'no-tabs': ['error'],
'no-trailing-spaces': ['error'],
'no-unneeded-ternary': ['error'],
'no-whitespace-before-property': ['error'],
'object-curly-newline': ['error', { multiline: true }],
'object-curly-spacing': ['error', 'always'],
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
'one-var': ['error', { initialized: 'never', uninitialized: 'consecutive' }],
'operator-assignment': ['error', 'always'],
'operator-linebreak': ['error', 'before', { overrides: { '=': 'after' } }],
'padded-blocks': ['error', 'never'],
'prefer-object-spread': ['error'],
quotes: ['error', 'single'],
'quote-props': ['error', 'as-needed'],
semi: ['error', 'never'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': ['error'],
'space-unary-ops': ['error', { words: true, nonwords: false }],
'spaced-comment': ['error', 'always'],
'switch-colon-spacing': ['error', { before: false, after: true }],
'template-tag-spacing': ['error', 'always'],
'unicode-bom': ['error', 'never'],
// ES6
'arrow-body-style': ['error', 'as-needed'],
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': ['error', { before: true, after: true }],
'generator-star-spacing': ['error', { before: false, after: true }],
'no-confusing-arrow': ['error'],
'no-duplicate-imports': ['error'],
'no-useless-computed-key': ['error'],
'no-useless-constructor': ['error'],
'no-useless-rename': ['error'],
'no-var': ['error'],
'object-shorthand': ['error', 'always'],
'prefer-arrow-callback': ['error', { allowNamedFunctions: false, allowUnboundThis: true }],
'prefer-const': ['error', { destructuring: 'all', ignoreReadBeforeAssign: true }],
'prefer-destructuring': ['error', { array: true, object: true }, { enforceForRenamedProperties: false }],
'prefer-numeric-literals': ['error'],
'prefer-rest-params': ['error'],
'prefer-spread': ['error'],
'prefer-template': ['error'],
'rest-spread-spacing': ['error', 'never'],
'symbol-description': ['error'],
'template-curly-spacing': ['error', 'never'],
'yield-star-spacing': ['error', { before: false, after: true }],
},
}