-
Notifications
You must be signed in to change notification settings - Fork 866
/
Copy patheslint.config.mjs
33 lines (32 loc) · 1.15 KB
/
eslint.config.mjs
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
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import globals from 'globals';
export default defineConfig([
{
ignores: ['**/node_modules', 'scripts', 'dist', 'build'],
files: ['**/*.js', '**/*.mjs'],
extends: [js.configs.recommended],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
Uint8Array: 'readonly',
CDATASection: 'readonly'
}
},
rules: {
'indent': ['error', 4, { 'SwitchCase': 1 }],
'space-before-function-paren': ['error', 'never'],
'no-console': ['error', { 'allow': ['warn'] }],
'object-curly-spacing': ['error', 'always', { 'objectsInObjects': false }],
'no-constant-condition': ['off'],
'no-undef': ['error'],
'no-unused-vars': ['error', { 'vars': 'local', 'args': 'none' }],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'no-prototype-builtins': ['off']
}
}
]);