-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
65 lines (62 loc) · 1.54 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
require('dotenv')
const { NODE_ENV } = process.env
const config = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'airbnb-typescript',
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
'prettier/react',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
project: './tsconfig.eslint.json',
},
plugins: ['react', '@typescript-eslint', 'prettier'],
ignorePatterns: ['.eslintrc.js', 'index.d.ts', 'node_modules/*'],
rules: {
'no-console': 'off',
'import/newline-after-import': 'error',
quotes: ['error', 'single'],
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
semi: 'off',
'@typescript-eslint/semi': 'off',
'arrow-body-style': ['error', 'as-needed'],
'@typescript-eslint/comma-dangle': [
'error',
{
arrays: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
imports: 'always-multiline',
objects: 'always-multiline',
},
],
'@typescript-eslint/no-var-requires': ['off'],
'import/order': 'error',
'import/first': 'error',
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'no-alert': 'off',
},
}
module.exports = config