forked from relative-ci/bundle-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
99 lines (99 loc) · 2.58 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
module.exports = {
root: true,
extends: ['airbnb', 'plugin:prettier/recommended'],
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
env: {
node: true,
browser: true,
'jest/globals': true,
},
rules: {
'import/extensions': [
'error',
'ignorePackages',
{ js: 'never', jsx: 'never', ts: 'never', tsx: 'never' },
],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
{
peerDependencies: true,
devDependencies: [
'build/**/*.js',
'**/*.stories.jsx',
'**/__mocks__/**/*.js',
'**/__tests__/*.js',
'**/test/**/*.js',
'**/storybook/*.js',
'**/jest/*.js',
],
},
],
'react/static-property-placement': 'off',
'react/jsx-props-no-spreading': 'off',
'prettier/prettier': 'warn',
'no-unused-vars': ['warn', { varsIgnorePattern: '^[_]{1,}$' }],
'implicit-arrow-linebreak': 'warn',
indent: 'warn',
'react/function-component-definition': [
'warn',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
},
plugins: ['jest'],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
extends: ['airbnb-typescript'],
plugins: ['@typescript-eslint'],
rules: {
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
{
peerDependencies: true,
devDependencies: [
'build/**/*.ts',
'**/*.stories.tsx',
'**/__mocks__/**/*.ts',
'**/__tests__/*.ts',
'**/storybook/*.ts',
'**/jest/*.ts',
],
},
],
'implicit-arrow-linebreak': 'warn',
'react/require-default-props': 'off',
'@typescript-eslint/comma-dangle': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^[_]{1,}$' }],
'@typescript-eslint/indent': 'warn',
'react/prop-types': 'off',
// '@typescript-eslint/implicit-arrow-linebreak': 'warn',
},
},
],
};