-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodejs.js
56 lines (49 loc) · 984 Bytes
/
nodejs.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
50
51
52
53
54
55
56
const {
IGNORE_PATTERNS,
FILE_PATTERN_TESTING,
FILE_PATTERN_INTERNALS,
FILE_PATTERN_CONFIG,
} = require("./utils");
/**
* Configuration for Node (non-browser) projects
* */
module.exports = {
extends: [
"./base",
"./plugins/import",
"./plugins/node",
"./plugins/unicorn",
],
env: {
browser: false,
es2020: true,
jest: true,
node: true,
},
parserOptions: {
ecmaVersion: "latest",
},
root: true,
ignorePatterns: IGNORE_PATTERNS,
overrides: [
{
// Enable testing rules only for test files
files: FILE_PATTERN_TESTING,
extends: ["./plugins/jest"],
},
{
// Disable rules for non-production files
files: FILE_PATTERN_INTERNALS,
rules: {
"node/no-unpublished-require": "off",
},
},
{
// Disable rules for configuration files
files: FILE_PATTERN_CONFIG,
rules: {
"node/no-unpublished-require": "off",
},
},
],
};