-
Notifications
You must be signed in to change notification settings - Fork 17
/
.eslintrc.cjs
97 lines (96 loc) · 2.49 KB
/
.eslintrc.cjs
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
const lernaJSON = require('./lerna.json');
module.exports = {
extends: ['airbnb', 'prettier'],
plugins: ['import', 'prettier'],
env: {
browser: true,
},
rules: {
'arrow-body-style': 'off',
'arrow-parens': ['error', 'as-needed'],
'import/no-relative-packages': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
camelcase: 'off',
indent: [
'error',
2,
{
SwitchCase: 1,
ignoredNodes: [
'TaggedTemplateExpression[tag.name=/html|outdent/]',
'TaggedTemplateExpression[tag.name=/html|outdent/] *',
],
},
],
'no-confusing-arrow': 'off',
'class-methods-use-this': 'off',
'no-return-assign': 'off',
'no-bitwise': 'off',
'no-continue': 'off',
'no-param-reassign': ['error', { props: false }],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-underscore-dangle': 'off',
'no-use-before-define': ['error', { functions: false, classes: false }],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'scripts/**',
'rollup.config.js',
'rollup.config.dist.js',
'playwright.config.js',
'**/story.{js,jsx}',
'**/demo.{js,jsx}',
'**/react/*.{js,jsx}',
'**/05-utils/**/*.{js,jsx}',
'**/src/**/*.react.js',
'**/demo/**',
'**/ui.test.js',
'**/e2e.js',
'**/unit.test.{js,jsx}',
'**/*test.accessor.js',
'**/*ui.test.js',
],
packageDir: [__dirname, ...lernaJSON.packages],
},
],
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'object-curly-newline': ['error', { multiline: true, consistent: true }],
'react/function-component-definition': 'off',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
'react/prop-types': 'off',
},
globals: {
HTMLElement: true,
HTMLSelectElement: true,
XMLHttpRequest: true,
history: true,
CustomEvent: true,
MutationObserver: true,
customElements: true,
document: true,
navigator: true,
window: true,
ENV: true,
PROD: true,
DEV: true,
fixture: true,
test: true,
page: true,
__VERSION_INFO__: true,
__COLORS_SCSS_AS_STRING__: true,
},
parserOptions: {
ecmaVersion: 2019,
ecmaFeatures: {
jsx: true,
},
},
};