|
4 | 4 | "browser": true,
|
5 | 5 | "node": true,
|
6 | 6 | },
|
| 7 | + "extends": "@ljharb", |
7 | 8 | "globals": {
|
8 | 9 | "Promise": false,
|
9 | 10 | },
|
10 | 11 | "rules": {
|
11 |
| - "brace-style": ["error", "1tbs", { |
12 |
| - "allowSingleLine": true, |
13 |
| - }], |
14 |
| - "comma-dangle": ["error", "never"], |
15 |
| - "comma-spacing": [2, { |
16 |
| - "before": false, |
17 |
| - "after": true, |
18 |
| - }], |
19 |
| - "consistent-return": "error", |
20 |
| - "curly": ["error", "all"], |
21 |
| - "function-paren-newline": ["error", "multiline"], |
22 |
| - "function-call-argument-newline": ["error", "consistent"], |
| 12 | + "array-bracket-spacing": "off", |
| 13 | + "complexity": "off", |
| 14 | + "eqeqeq": ["error", "always", { "null": "ignore" }], |
| 15 | + "func-style": "warn", |
23 | 16 | "indent": ["error", 4],
|
24 |
| - "key-spacing": "error", |
25 |
| - "quotes": ["error", "single", { |
26 |
| - "avoidEscape": true, |
27 |
| - }], |
28 |
| - "semi": ["error", "always"], |
29 |
| - "space-before-function-paren": ["error", { |
30 |
| - "anonymous": "always", |
31 |
| - "named": "never", |
32 |
| - }], |
33 |
| - "no-extra-parens": ["error", "all", { |
34 |
| - "conditionalAssign": false, |
35 |
| - "nestedBinaryExpressions": false, |
36 |
| - "returnAssign": false, |
37 |
| - "ignoreJSX": "all", |
38 |
| - "enforceForArrowConditionals": false, |
39 |
| - "enforceForSequenceExpressions": true, |
40 |
| - "enforceForNewInMemberExpressions": false, |
41 |
| - }], |
42 |
| - "no-extra-semi": "error", |
43 |
| - "no-shadow": ["error", { |
44 |
| - "builtinGlobals": false, |
45 |
| - "hoist": "functions", |
46 |
| - "allow": [] |
47 |
| - }], |
48 |
| - "no-undef": "error", |
49 |
| - "no-unused-vars": ["error", { |
50 |
| - "vars": "all", |
51 |
| - "args": "after-used" |
52 |
| - }], |
53 |
| - "no-useless-escape": "error", |
54 |
| - "object-curly-newline": ["error", { |
55 |
| - "ObjectExpression": { |
56 |
| - "multiline": true, |
57 |
| - "consistent": true, |
58 |
| - "minProperties": 3, |
59 |
| - }, |
60 |
| - "ObjectPattern": { |
61 |
| - "multiline": true, |
62 |
| - "consistent": true, |
63 |
| - "minProperties": 3, |
64 |
| - }, |
65 |
| - }], |
66 |
| - "object-curly-spacing": ["error", "always"], |
| 17 | + "no-magic-numbers": "off", |
| 18 | + "max-lines": "warn", |
| 19 | + "max-lines-per-function": "warn", |
| 20 | + "max-statements": "warn", |
| 21 | + "max-statements-per-line": [2, { "max": 2 }], |
| 22 | + "multiline-comment-style": "off", |
| 23 | + "no-negated-condition": "off", |
| 24 | + "no-use-before-define": "warn", |
| 25 | + "no-underscore-dangle": "warn", |
67 | 26 | "operator-linebreak": ["error", "before"],
|
68 |
| - "semi-style": ["error", "last"], |
69 |
| - "space-in-parens": ["error", "never"], |
70 |
| - "space-infix-ops": "error", |
71 |
| - "space-unary-ops": ["error", { |
72 |
| - "words": false, |
73 |
| - "nonwords": false, |
74 |
| - }], |
75 |
| - "strict": "error", |
76 |
| - "wrap-iife": ["error", "outside", { |
77 |
| - "functionPrototypeMethods": true, |
78 |
| - }], |
79 |
| - "wrap-regex": "error", |
| 27 | + "sort-keys": "warn", |
80 | 28 | },
|
81 | 29 | "ignorePatterns": [ "syntax-error.*" ],
|
82 | 30 | "overrides": [
|
83 | 31 | {
|
84 | 32 | "files": ["*.mjs", "test/import/package_type/*.js"],
|
85 | 33 | "extends": "@ljharb/eslint-config/esm",
|
86 | 34 | },
|
| 35 | + { |
| 36 | + "files": ["bin/**"], |
| 37 | + "rules": { |
| 38 | + "global-require": "off", |
| 39 | + "no-process-exit": "off", |
| 40 | + "quote-props": ["error", "as-needed", { |
| 41 | + "keywords": false, |
| 42 | + }], |
| 43 | + }, |
| 44 | + }, |
87 | 45 | {
|
88 | 46 | "files": ["bin/import-or-require.js"],
|
89 | 47 | "parserOptions": {
|
90 | 48 | "ecmaVersion": 2020,
|
91 | 49 | },
|
92 | 50 | },
|
| 51 | + { |
| 52 | + "files": ["index.js"], |
| 53 | + "rules": { |
| 54 | + "no-param-reassign": "warn", |
| 55 | + }, |
| 56 | + }, |
| 57 | + { |
| 58 | + "files": ["lib/results.js"], |
| 59 | + "rules": { |
| 60 | + "no-cond-assign": "warn", |
| 61 | + "no-param-reassign": "warn", |
| 62 | + "no-plusplus": "warn", |
| 63 | + }, |
| 64 | + }, |
| 65 | + { |
| 66 | + "files": ["lib/test.js"], |
| 67 | + "rules": { |
| 68 | + "eqeqeq": "warn", |
| 69 | + "func-name-matching": "off", |
| 70 | + "max-params": "off", |
| 71 | + "no-continue": "off", |
| 72 | + "no-invalid-this": "off", |
| 73 | + "no-param-reassign": "warn", |
| 74 | + "no-plusplus": "warn", |
| 75 | + "no-multi-assign": "off", |
| 76 | + "no-restricted-syntax": "off", |
| 77 | + }, |
| 78 | + }, |
93 | 79 | {
|
94 | 80 | "files": ["test/async-await/*"],
|
95 | 81 | "parserOptions": {
|
|
101 | 87 | "globals": {
|
102 | 88 | "g": false,
|
103 | 89 | },
|
| 90 | + "rules": { |
| 91 | + "no-new-func": "off", |
| 92 | + }, |
| 93 | + }, |
| 94 | + { |
| 95 | + "files": ["example/**"], |
| 96 | + "rules": { |
| 97 | + "array-bracket-newline": "off", |
| 98 | + "global-require": "off", |
| 99 | + "no-console": "off", |
| 100 | + }, |
| 101 | + }, |
| 102 | + { |
| 103 | + "files": ["test/**"], |
| 104 | + "rules": { |
| 105 | + "dot-notation": [2, { |
| 106 | + "allowKeywords": true, |
| 107 | + "allowPattern": "throws" |
| 108 | + }], |
| 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 | + }, |
104 | 121 | },
|
105 | 122 | ],
|
106 | 123 | }
|
0 commit comments