forked from common-voice/common-voice
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
49 lines (48 loc) · 1.05 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
module.exports = {
root: true,
env: {
node: true,
browser: true,
es2021: true,
},
plugins: ['import', '@typescript-eslint', 'react', 'react-hooks', 'jsx-a11y'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: [
'tsconfig.eslint.json',
'./common/tsconfig.json',
'./web/tsconfig.json',
'./server/tsconfig.json',
],
},
rules: {
// turn on errors for missing imports
'import/no-unresolved': 'error',
// warn us if we're using @ts-ignore etc..
'@typescript-eslint/ban-ts-comment': 'warn',
},
settings: {
react: {
version: 'latest',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
};