1 | {
|
2 | "root": true,
|
3 | "extends": "@ljharb",
|
4 | "env": {
|
5 | "browser": true,
|
6 | "node": true,
|
7 | },
|
8 | "parserOptions": {
|
9 | "ecmaVersion": 5,
|
10 | "allowReserved": false,
|
11 | },
|
12 | "rules": {
|
13 | "array-bracket-newline": "off",
|
14 | "array-bracket-spacing": "off",
|
15 | "complexity": "off",
|
16 | "func-style": ["error", "declaration"],
|
17 | "no-magic-numbers": "off",
|
18 | "max-lines-per-function": "off",
|
19 | "max-statements-per-line": [2, { "max": 2 }],
|
20 | "max-statements": "warn",
|
21 | "multiline-comment-style": "off",
|
22 | "no-negated-condition": "off",
|
23 | "no-underscore-dangle": "warn",
|
24 | "object-curly-newline": "off",
|
25 | "sort-keys": "off",
|
26 | },
|
27 | "ignorePatterns": ["syntax-error.*"],
|
28 | "overrides": [
|
29 | {
|
30 | "files": ["*.mjs", "test/import/package_type/*.js"],
|
31 | "extends": "@ljharb/eslint-config/esm",
|
32 | },
|
33 | {
|
34 | "files": ["bin/**"],
|
35 | "rules": {
|
36 | "global-require": "off",
|
37 | "no-process-exit": "off",
|
38 | "quote-props": ["error", "as-needed", {
|
39 | "keywords": false,
|
40 | }],
|
41 | },
|
42 | },
|
43 | {
|
44 | "files": ["bin/import-or-require.js"],
|
45 | "parserOptions": {
|
46 | "ecmaVersion": 2020,
|
47 | },
|
48 | },
|
49 | {
|
50 | "files": ["index.js"],
|
51 | "rules": {
|
52 | "no-param-reassign": "warn",
|
53 | },
|
54 | },
|
55 | {
|
56 | "files": ["lib/results.js"],
|
57 | "rules": {
|
58 | "no-cond-assign": "warn",
|
59 | "no-param-reassign": "warn",
|
60 | "no-plusplus": "warn",
|
61 | },
|
62 | },
|
63 | {
|
64 | "files": ["lib/test.js"],
|
65 | "rules": {
|
66 | "eqeqeq": "warn",
|
67 | "func-name-matching": "off",
|
68 | "max-params": "off",
|
69 | "no-continue": "off",
|
70 | "no-invalid-this": "off",
|
71 | "no-multi-assign": "off",
|
72 | "no-param-reassign": "warn",
|
73 | "no-plusplus": "warn",
|
74 | "no-restricted-syntax": "off",
|
75 | "operator-linebreak": ["error", "before"],
|
76 | },
|
77 | },
|
78 | {
|
79 | "files": ["test/async-await/*"],
|
80 | "parserOptions": {
|
81 | "ecmaVersion": 2017,
|
82 | },
|
83 | },
|
84 | {
|
85 | "files": ["example/**", "test/**"],
|
86 | "globals": {
|
87 | "g": false,
|
88 | },
|
89 | "rules": {
|
90 | "no-new-func": "off",
|
91 | },
|
92 | },
|
93 | {
|
94 | "files": ["example/**"],
|
95 | "rules": {
|
96 | "array-bracket-newline": "off",
|
97 | "global-require": "off",
|
98 | "no-console": "off",
|
99 | },
|
100 | },
|
101 | {
|
102 | "files": ["test/**"],
|
103 | "rules": {
|
104 | "dot-notation": [2, {
|
105 | "allowKeywords": true,
|
106 | "allowPattern": "throws"
|
107 | }],
|
108 | "func-style": "off",
|
109 | "id-length": "off",
|
110 | "max-len": "off",
|
111 | "max-lines-per-function": "off",
|
112 | "no-plusplus": "off",
|
113 | "no-throw-literal": "off",
|
114 | },
|
115 | },
|
116 | {
|
117 | "files": ["test/*/**"],
|
118 | "rules": {
|
119 | "camelcase": "off",
|
120 | },
|
121 | },
|
122 | {
|
123 | "files": ["lib/default_stream.js"],
|
124 | "rules": {
|
125 | "no-use-before-define": "warn",
|
126 | },
|
127 | },
|
128 | {
|
129 | "files": ["lib/test.js"],
|
130 | "rules": {
|
131 | "max-lines": "off",
|
132 | },
|
133 | },
|
134 | ],
|
135 | }
|