-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
49 lines (47 loc) · 1.23 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
41
42
43
44
45
46
47
48
49
const js = require('@eslint/js');
//const qunitPlugin = require('eslint-plugin-qunit/configs/recommended');
const globals = require('globals');
const eslintConfigPrettier = require('eslint-config-prettier');
const stylisticJs = require('@stylistic/eslint-plugin-js');
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node,
...globals.qunit,
},
},
plugins: {
'@stylistic/js': stylisticJs,
},
rules: {
'no-console': ['warn', { allow: ['warn', 'error'] }],
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
'@stylistic/js/quotes': ['error', 'single'],
semi: ['error', 'always'],
},
},
{
ignores: [
'/dist/',
'/tmp/',
'/bower_components/',
'/node_modules/',
'/coverage/',
'!.*',
'.*/',
'.eslintcache',
'eslint.config.js',
'prettier.config.js',
],
},
//Disabled, no ESLint 9 support yet (on 2024-05-14):
//qunitPlugin,
eslintConfigPrettier,
eslintPluginPrettierRecommended,
];