forked from astoilkov/use-local-storage-state
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
40 lines (32 loc) · 978 Bytes
/
.eslintrc.cjs
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
const confusingBrowserGlobals = require('confusing-browser-globals')
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'strictest/eslint',
'strictest/promise',
'strictest/react',
'strictest/react-hooks',
'strictest/typescript-eslint',
'strictest/unicorn',
],
plugins: ['promise', 'react', 'react-hooks', '@typescript-eslint', 'unicorn'],
parserOptions: {
// enables the use of `import { a } from b` syntax. required for TypeScript imports
sourceType: 'module',
project: './tsconfig.json',
},
settings: {
react: {
// probably can remove it in the future because docs say:
// "it will default to "detect" in the future"
version: 'detect',
},
},
env: {
es6: true,
browser: true,
},
rules: {
'no-restricted-globals': ['error', ...confusingBrowserGlobals],
},
}