-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (42 loc) · 1.18 KB
/
Copy patheslint.config.js
File metadata and controls
44 lines (42 loc) · 1.18 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
'use strict';
const js = require('@eslint/js');
const mocha = require('eslint-plugin-mocha');
const globals = require('globals');
module.exports = [
{
ignores: ['coverage/**', 'node_modules/**', '.nyc_output/**'],
},
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.es2022,
},
},
rules: {
indent: ['error', 4, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'no-console': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
},
},
{
files: ['test/**/*.js'],
plugins: { mocha },
languageOptions: {
globals: {
...globals.mocha,
},
},
rules: {
...mocha.configs.recommended.rules,
'mocha/no-mocha-arrows': 'off',
'mocha/no-setup-in-describe': 'off',
},
},
];