-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
57 lines (55 loc) · 1.4 KB
/
eslint.config.js
File metadata and controls
57 lines (55 loc) · 1.4 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
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import eslintPluginImport from 'eslint-plugin-import';
export default [
// Global ignores
{
ignores: [
'node_modules/**',
'dist/**',
'.vscode/**',
'public/js/bundle.js',
],
},
js.configs.recommended,
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
global: 'readonly',
module: 'readonly',
require: 'readonly',
exports: 'readonly',
},
},
plugins: {
import: eslintPluginImport,
},
rules: {
// Remove 'prettier/prettier'
'spaced-comment': 'off',
'no-console': 'warn',
'consistent-return': 'off',
'func-names': 'off',
'object-shorthand': 'off',
'no-process-exit': 'off',
'no-param-reassign': 'off',
'no-return-await': 'off',
'no-underscore-dangle': 'off',
'class-methods-use-this': 'off',
'prefer-destructuring': ['error', { object: true, array: false }],
'no-unused-vars': 'error',
'no-undef': 'error',
'import/extensions': ['error', 'ignorePackages', { js: 'always' }],
},
},
// Disable rules that conflict with Prettier
prettier,
];