forked from sanity-io/sanity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (41 loc) · 910 Bytes
/
.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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
globals: {
__DEV__: true,
JSX: true,
},
env: {
node: true,
browser: true,
},
settings: {
react: {version: '16.9.0'},
},
extends: [
'sanity',
'sanity/react',
'sanity/import',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'sanity/typescript',
'prettier/@typescript-eslint',
'prettier',
'prettier/react',
],
rules: {
'import/no-extraneous-dependencies': 'off', // because of parts
'import/no-unresolved': ['error', {ignore: ['.*:.*']}], // because of parts
'prettier/prettier': 'error',
'sort-imports': 'off', // prefer import/order
},
plugins: ['import', '@typescript-eslint', 'prettier', 'react'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'no-undef': 'off',
},
},
],
}