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