-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathes6.js
46 lines (44 loc) · 1.43 KB
/
es6.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
/*
* We use plugin:import/typescript and import/extensions to include ts and tsx files here in es6.js instead
* of in typescript.js because otherwise eslint-plugin-import complains about importing .ts or .tsx files
* while linting a normal .js file.
* */
module.exports = {
plugins: ['babel'],
extends: ['airbnb'],
// extends: ['airbnb', 'plugin:import/typescript'],
parser: 'babel-eslint',
env: {
es6: true,
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
settings: {
'import/extensions': ['.js', '.json'],
// 'import/extensions': ['.js', '.json', '.ts', '.tsx'],
},
rules: {
// override airbnb overbearing rules
'no-console': ['warn', { allow: ['error', 'trace', 'time'] }],
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-unused-expressions': 'off',
'babel/no-unused-expressions': ['warn', { allowShortCircuit: true }],
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
'no-warning-comments': 1,
'prefer-destructuring': 'off',
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['**/*.stories.js', '**/*.test.js', '**/demo/**'] },
],
'jsx-a11y/label-has-for': 0, // this is deprecated in future versions so disable now
'jsx-a11y/label-has-associated-control': [
2,
{
assert: 'either', // fs-styles does not support nesting currently
},
],
},
}