-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
32 lines (31 loc) · 1.09 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
import js from '@eslint/js';
import globals from 'globals';
import stylistic from '@stylistic/eslint-plugin';
export default [
js.configs.recommended,
{
plugins: {
'@stylistic': stylistic,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.serviceworker,
},
},
rules: {
'no-unused-vars': [ 'warn', { args: 'none' } ],
'no-use-before-define': [ 'error', { functions: false } ],
'prefer-const': [ 'warn', { destructuring: 'all', ignoreReadBeforeAssign: true }],
'no-invalid-this': 'error',
'@stylistic/no-extra-semi': 'warn',
'@stylistic/semi': [ 'warn', 'always', { omitLastInOneLineBlock: true } ],
'@stylistic/comma-dangle': [ 'warn', 'always-multiline' ],
'@stylistic/quotes': [ 'warn', 'single', { avoidEscape: true, allowTemplateLiterals: true } ],
},
linterOptions: {
reportUnusedDisableDirectives: 'warn',
},
},
];