-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.js
More file actions
34 lines (33 loc) · 1017 Bytes
/
Copy patheslint.config.js
File metadata and controls
34 lines (33 loc) · 1017 Bytes
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
const js = require('@eslint/js');
const globals = require('globals');
module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
// CommonJS のコードだが sourceType は module のままにする。commonjs にすると
// strict ルールの "function" が「関数内に 'use strict' を書く」要求に変わり、
// lib と test の全ファイルが違反になる。
sourceType: 'module',
globals: {
...globals.commonjs,
...globals.node,
...globals.mocha,
},
},
rules: {
strict: ['error', 'function'],
curly: 'error',
eqeqeq: 'error',
'wrap-iife': ['error', 'any'],
'no-use-before-define': ['error', { functions: false }],
'new-cap': 'error',
'no-caller': 'error',
'dot-notation': 'off',
'no-undef': 'error',
'no-unused-vars': 'error',
'no-cond-assign': ['error', 'except-parens'],
'no-eq-null': 'error',
},
},
];