UNPKG

3.73 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 "max-lines-per-function": "off",
17 "max-statements-per-line": [2, { "max": 2 }],
18 "max-statements": "warn",
19 "multiline-comment-style": "off",
20 "no-negated-condition": "off",
21 "no-param-reassign": "warn",
22 "no-underscore-dangle": "warn",
23 "object-curly-newline": "off",
24 "sort-keys": "off",
25 },
26 "ignorePatterns": [
27 "syntax-error.*",
28 ],
29 "overrides": [
30 {
31 "files": ["*.mjs", "test/import/package_type/*.js"],
32 "extends": "@ljharb/eslint-config/esm",
33 },
34 {
35 "files": ["bin/**"],
36 "rules": {
37 "global-require": "off",
38 "no-process-exit": "off",
39 "quote-props": ["error", "as-needed", {
40 "keywords": false,
41 }],
42 },
43 },
44 {
45 "files": ["bin/import-or-require.js"],
46 "parserOptions": {
47 "ecmaVersion": 2020,
48 },
49 },
50 {
51 "files": ["index.js"],
52 "rules": {
53 "no-param-reassign": "warn",
54 },
55 },
56 {
57 "files": ["lib/results.js"],
58 "rules": {
59 "no-cond-assign": "warn",
60 "no-param-reassign": "warn",
61 "no-plusplus": "warn",
62 },
63 },
64 {
65 "files": ["lib/test.js"],
66 "rules": {
67 "eqeqeq": "warn",
68 "func-name-matching": "off",
69 "max-params": "off",
70 "no-continue": "off",
71 "no-invalid-this": "off",
72 "no-param-reassign": "warn",
73 "no-plusplus": "warn",
74 "no-multi-assign": "off",
75 "no-restricted-syntax": "off",
76 "operator-linebreak": ["error", "before"],
77 },
78 },
79 {
80 "files": ["test/async-await/*"],
81 "parserOptions": {
82 "ecmaVersion": 2017,
83 },
84 },
85 {
86 "files": ["example/**", "test/**"],
87 "globals": {
88 "g": false,
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 "func-style": "off",
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 {
124 "files": ["lib/default_stream.js"],
125 "rules": {
126 "no-use-before-define": "warn",
127 },
128 },
129 {
130 "files": ["lib/test.js"],
131 "rules": {
132 "max-lines": "off",
133 },
134 },
135 ],
136}