generated from eea/volto-frontend-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
73 lines (72 loc) · 2.26 KB
/
eslint.config.js
File metadata and controls
73 lines (72 loc) · 2.26 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const js = require('@eslint/js');
const importPlugin = require('eslint-plugin-import');
module.exports = [
js.configs.recommended,
{
files: ['src/**/*.{js,jsx}'],
plugins: {
import: importPlugin,
},
languageOptions: {
ecmaVersion: 2021,
sourceType: 'commonjs',
globals: {
// ES6 globals
Promise: 'readonly',
Symbol: 'readonly',
Map: 'readonly',
Set: 'readonly',
WeakMap: 'readonly',
WeakSet: 'readonly',
Proxy: 'readonly',
Reflect: 'readonly',
// Browser globals
window: 'readonly',
document: 'readonly',
console: 'readonly',
alert: 'readonly',
// Node.js globals
global: 'readonly',
process: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
module: 'readonly',
require: 'readonly',
exports: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
// Jest globals
describe: 'readonly',
it: 'readonly',
test: 'readonly',
expect: 'readonly',
jest: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
},
},
rules: {
// Only use import/errors rules from the original config
...importPlugin.configs.errors.rules,
// Original rules from .eslintrc.json
'react/prop-types': 'off',
'linebreak-style': 'warn',
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.json'],
},
},
},
},
];