-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (39 loc) · 1.18 KB
/
Copy patheslint.config.js
File metadata and controls
40 lines (39 loc) · 1.18 KB
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 js = require('@eslint/js')
const reactPlugin = require('eslint-plugin-react')
const globals = require('globals')
module.exports = [
js.configs.recommended,
reactPlugin.configs.flat.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.es2021,
//metro provides commonjs (require() for assets) and process at runtime
...globals.commonjs,
process: 'readonly',
//compile-time define, injected by babel-plugin-transform-define
RAINDROP_ENVIRONMENT: 'readonly'
}
},
settings: {
react: { version: 'detect' }
},
rules: {
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/display-name': 'off',
'react/prop-types': 'off',
'no-unused-vars': 'off',
'no-empty': ['error', { allowEmptyCatch: true }]
}
},
{
files: ['*.js'],
languageOptions: {
globals: globals.node
}
}
]