-
Notifications
You must be signed in to change notification settings - Fork 6
/
eslint.config.js
40 lines (39 loc) · 1.68 KB
/
eslint.config.js
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
import eslintjs from '@eslint/js';
import globals from 'globals';
export default [
eslintjs.configs.recommended,
{ ignores: [ 'tmp/' ] }, // github.com/eslint/eslint/discussions/18304
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
Deno: 'readonly',
},
},
rules: {
'array-bracket-spacing': [ 'error', 'always' ],
'comma-dangle': [ 'error', 'always-multiline' ],
'comma-spacing': [ 'error' ],
'curly': [ 'error', 'multi-line' ],
'indent': [ 'error', 4, { 'SwitchCase': 1 } ],
'key-spacing': [ 'error', { 'align': 'value' } ],
'keyword-spacing': [ 'error' ],
'no-case-declarations': 'warn',
'no-console': [ 'warn', { 'allow': [ 'error', 'info', 'debug' ] } ],
'no-irregular-whitespace': 'warn',
'no-redeclare': 'warn',
'no-shadow': 'warn',
'no-unused-vars': 'warn',
'no-var': 'error',
'object-curly-spacing': [ 'error', 'always' ],
'prefer-const': 'error',
'quotes': [ 'error', 'single', 'avoid-escape' ],
'require-await': 'error',
'semi': [ 'error', 'always' ],
'space-before-blocks': [ 'error', 'always' ],
'space-in-parens': [ 'error' ],
'strict': [ 'error', 'global' ],
},
},
];