-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
45 lines (45 loc) · 1.03 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
module.exports = {
parser: 'babel-eslint',
// parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
},
env: {
browser: true,
},
extends: [
'eslint:recommended',
'prettier',
'prettier/react',
'plugin:react/recommended',
],
settings: {
react: {
version: 'detect',
},
},
plugins: ['babel', 'react', 'prettier'],
// plugins: ['babel', 'react', 'prettier', '@typescript-eslint/eslint-plugin'],
rules: {
eqeqeq: 2,
indent: [2, 2],
'no-console': 0,
'react/jsx-indent': [2, 2],
'react/no-unused-prop-types': 2,
},
// You can get rid of the no-undef errors for types and interfaces by using the
// following overrides. tsc still fails at non-standard syntax but we can at least
// hide all the false positives in ESLint for types and interfaces:
// overrides: [
// {
// files: ['*.ts', '*.tsx'],
// rules: {
// 'no-undef': 0,
// },
// },
// ],
};