-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
69 lines (68 loc) · 1.86 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
const path = require('path');
module.exports = {
root: true,
env: {
browser: true,
es6: true,
},
extends: [
'airbnb-base',
'plugin:json/recommended',
'plugin:prettier/recommended',
'plugin:typescript-sort-keys/recommended',
'eslint:recommended',
'plugin:import/recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:storybook/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', 'prettier', '@typescript-eslint', 'react-hooks', 'typescript-sort-keys'],
rules: {
'jsx-a11y/anchor-is-valid': 0,
'react/jsx-filename-extension': 0,
'react/jsx-props-no-spreading': 0,
'import/prefer-default-export': 0,
'@typescript-eslint/no-var-requires': 0,
'import/no-extraneous-dependencies': 0,
'react/display-name': 0,
'react/prop-types': 0,
'import/extensions': 0,
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'react/require-default-props': 'off', // Since we do not use prop-types
quotes: [2, 'single', { avoidEscape: true }],
},
settings: {
'import/resolver': {
typescript: {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: [path.resolve(__dirname, './node_modules'), path.resolve(__dirname, 'src')],
},
},
},
overrides: [
{
files: ['*.js', '*.jsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
],
};