-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
55 lines (55 loc) · 1.43 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
module.exports = {
env: {
browser: true,
},
extends: [
'eslint:recommended',
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:react/jsx-runtime',
'airbnb-typescript',
'prettier',
],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.eslint.json'],
tsconfigRootDir: __dirname,
},
rules: {
'@typescript-eslint/no-unused-vars': 'error',
// Require braces in arrow function body as needed
'arrow-body-style': ['error', 'as-needed'],
// Allow named exports from files with a single export
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
// Disallow /index in imports
'import/no-useless-path-segments': [
'error',
{
noUselessIndex: true,
},
],
// Prefer arrow functions in callbacks
'prefer-arrow-callback': 'error',
'react/jsx-no-duplicate-props': [
'error',
{
ignoreCase: false,
},
],
// Enforce function components being defined as arrow functions
'react/function-component-definition': [
'error',
{
namedComponents: 'arrow-function',
},
],
'react/no-danger': 0,
'react/require-default-props': 0,
'@typescript-eslint/no-explicit-any': 0,
'import/no-extraneous-dependencies': 0,
'react/no-unstable-nested-components': 0,
'import/extensions': 0,
},
}