UNPKG

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