@comment-labs/oxlint-config 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +31 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.mjs +853 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @comment-labs/oxlint-config
|
|
2
|
+
|
|
3
|
+
Shared Oxlint configuration for comment-labs projects. Provides sensible defaults for TypeScript, JavaScript, React, and Node.js projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -D @comment-labs/oxlint-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Create an `oxlint.config.ts` file in your project root:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { defineConfig } from 'oxlint'
|
|
17
|
+
import { config } from '@comment-labs/oxlint-config'
|
|
18
|
+
|
|
19
|
+
export default defineConfig(config)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- Pre-configured rules for TypeScript, React, and Node.js
|
|
25
|
+
- Import and JSDoc plugin support
|
|
26
|
+
- Vitest compatibility
|
|
27
|
+
- Optimized for correctness and performance
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
[Apache-2.0](https://github.com/comment-team/comment-labs/blob/main/LICENSE)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OxlintConfig } from "oxlint";
|
|
2
|
+
import * as _$eslint from "eslint";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/index.d.ts
|
|
5
|
+
declare const commentLabsJs: {
|
|
6
|
+
meta: {
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
};
|
|
10
|
+
rules: {
|
|
11
|
+
'no-self-assign': _$eslint.Rule.RuleModule;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/index.d.ts
|
|
16
|
+
declare const config: OxlintConfig;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { config, commentLabsJs as default };
|
|
19
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,853 @@
|
|
|
1
|
+
import globalsPkg from "globals";
|
|
2
|
+
import { access, readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { cwd } from "node:process";
|
|
5
|
+
import { up } from "empathic/find";
|
|
6
|
+
//#region src/categories.ts
|
|
7
|
+
const categories = {
|
|
8
|
+
correctness: "error",
|
|
9
|
+
nursery: "warn",
|
|
10
|
+
pedantic: "warn",
|
|
11
|
+
perf: "warn",
|
|
12
|
+
restriction: "warn",
|
|
13
|
+
style: "warn",
|
|
14
|
+
suspicious: "error"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/base-rules.ts
|
|
18
|
+
const baseRules = {
|
|
19
|
+
"array-type": "off",
|
|
20
|
+
"capitalized-comments": "off",
|
|
21
|
+
"class-methods-use-this": "warn",
|
|
22
|
+
"consistent-indexed-object-style": "off",
|
|
23
|
+
"consistent-type-definitions": "off",
|
|
24
|
+
"complexity": ["warn", { max: 50 }],
|
|
25
|
+
"default-case": "off",
|
|
26
|
+
"exports-last": "off",
|
|
27
|
+
"explicit-function-return-type": "off",
|
|
28
|
+
"explicit-module-boundary-types": "off",
|
|
29
|
+
"func-style": "off",
|
|
30
|
+
"group-exports": "off",
|
|
31
|
+
"id-length": "off",
|
|
32
|
+
"init-declarations": "off",
|
|
33
|
+
"max-dependencies": "off",
|
|
34
|
+
"max-depth": ["warn", 7],
|
|
35
|
+
"max-lines": ["warn", {
|
|
36
|
+
max: 500,
|
|
37
|
+
skipBlankLines: true,
|
|
38
|
+
skipComments: true
|
|
39
|
+
}],
|
|
40
|
+
"max-lines-per-function": ["warn", {
|
|
41
|
+
max: 300,
|
|
42
|
+
skipBlankLines: true,
|
|
43
|
+
skipComments: true
|
|
44
|
+
}],
|
|
45
|
+
"max-params": "off",
|
|
46
|
+
"max-statements": ["warn", { max: 50 }],
|
|
47
|
+
"no-array-for-each": "off",
|
|
48
|
+
"no-array-method-this-argument": "off",
|
|
49
|
+
"no-array-reduce": "off",
|
|
50
|
+
"no-array-sort": "off",
|
|
51
|
+
"no-async-await": "off",
|
|
52
|
+
"no-await-expression-member": "off",
|
|
53
|
+
"no-await-in-loop": "off",
|
|
54
|
+
"no-bitwise": "off",
|
|
55
|
+
"new-cap": "off",
|
|
56
|
+
"no-console": "off",
|
|
57
|
+
"no-continue": "off",
|
|
58
|
+
"no-default-export": "off",
|
|
59
|
+
"no-extraneous-class": "off",
|
|
60
|
+
"no-inline-comments": "off",
|
|
61
|
+
"no-magic-numbers": "off",
|
|
62
|
+
"no-map-spread": "off",
|
|
63
|
+
"no-named-export": "off",
|
|
64
|
+
"no-namespace": "off",
|
|
65
|
+
"no-nested-ternary": "off",
|
|
66
|
+
"no-null": "off",
|
|
67
|
+
"no-negated-condition": "off",
|
|
68
|
+
"no-optional-chaining": "off",
|
|
69
|
+
"no-plusplus": "off",
|
|
70
|
+
"no-relative-parent-imports": "off",
|
|
71
|
+
"no-rest-spread-properties": "off",
|
|
72
|
+
"no-shadow": "warn",
|
|
73
|
+
"no-ternary": "off",
|
|
74
|
+
"no-undefined": "off",
|
|
75
|
+
"no-unassigned-import": "off",
|
|
76
|
+
"no-use-before-define": ["warn", { functions: false }],
|
|
77
|
+
"no-warning-comments": "off",
|
|
78
|
+
"prefer-default-export": "off",
|
|
79
|
+
"prefer-destructuring": "off",
|
|
80
|
+
"require-await": "off",
|
|
81
|
+
"sort-imports": "off",
|
|
82
|
+
"sort-keys": "off",
|
|
83
|
+
"typescript/consistent-type-imports": ["warn", {
|
|
84
|
+
disallowTypeAnnotations: false,
|
|
85
|
+
fixStyle: "inline-type-imports"
|
|
86
|
+
}],
|
|
87
|
+
"typescript/no-import-type-side-effects": "error",
|
|
88
|
+
"typescript/parameter-properties": ["warn", { prefer: "parameter-property" }],
|
|
89
|
+
"typescript/prefer-readonly-parameter-types": "off",
|
|
90
|
+
"typescript/require-await": "warn",
|
|
91
|
+
"typescript/no-non-nullable-type-assertion-style": "warn",
|
|
92
|
+
"import/no-unassigned-import": "warn",
|
|
93
|
+
"import/consistent-type-specifier-style": "off",
|
|
94
|
+
"import/no-anonymous-default-export": "off",
|
|
95
|
+
"import/no-cycle": "off",
|
|
96
|
+
"import/no-nodejs-modules": "off",
|
|
97
|
+
"import/unambiguous": "off",
|
|
98
|
+
"jest/require-hook": "off",
|
|
99
|
+
"jest/no-conditional-in-test": "off",
|
|
100
|
+
"jsdoc/require-param-type": "off",
|
|
101
|
+
"jsdoc/require-returns": "off",
|
|
102
|
+
"jsdoc/require-param": "off",
|
|
103
|
+
"unicorn/no-nested-ternary": "off",
|
|
104
|
+
"unicorn/switch-case-braces": ["warn", "avoid"],
|
|
105
|
+
"unicorn/no-array-method-this-argument": "warn",
|
|
106
|
+
"unicorn/no-await-expression-member": "warn",
|
|
107
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
108
|
+
"comment-labs-js/no-self-assign": "error",
|
|
109
|
+
"brettz9-js/arrow-parens": "off",
|
|
110
|
+
"brettz9-js/block-scoped-var": "off",
|
|
111
|
+
"brettz9-js/no-instanceof-wrapper": "error",
|
|
112
|
+
"brettz9-js/no-literal-call": "error",
|
|
113
|
+
"brettz9-js/no-this-in-static": "error",
|
|
114
|
+
"brettz9-js/no-use-ignored-vars": "warn",
|
|
115
|
+
"brettz9-js/no-useless-rest-spread": "warn",
|
|
116
|
+
"brettz9-js/prefer-for-of": "off",
|
|
117
|
+
"i18next-js/no-literal-string": "warn",
|
|
118
|
+
"import-zod-js/prefer-zod-namespace": "warn",
|
|
119
|
+
"security-js/detect-unsafe-regex": "error",
|
|
120
|
+
"security-js/detect-non-literal-regexp": "error",
|
|
121
|
+
"security-js/detect-non-literal-require": "off",
|
|
122
|
+
"security-js/detect-non-literal-fs-filename": "off",
|
|
123
|
+
"security-js/detect-eval-with-expression": "error",
|
|
124
|
+
"security-js/detect-pseudoRandomBytes": "error",
|
|
125
|
+
"security-js/detect-possible-timing-attacks": "error",
|
|
126
|
+
"security-js/detect-no-csrf-before-method-override": "error",
|
|
127
|
+
"security-js/detect-buffer-noassert": "error",
|
|
128
|
+
"security-js/detect-child-process": "error",
|
|
129
|
+
"security-js/detect-disable-mustache-escape": "error",
|
|
130
|
+
"security-js/detect-object-injection": "off",
|
|
131
|
+
"security-js/detect-new-buffer": "error",
|
|
132
|
+
"security-js/detect-bidi-characters": "error",
|
|
133
|
+
"unicorn-js/better-regex": "warn",
|
|
134
|
+
"unicorn-js/consistent-destructuring": "warn",
|
|
135
|
+
"unicorn-js/consistent-template-literal-escape": "warn",
|
|
136
|
+
"unicorn-js/no-for-loop": "warn",
|
|
137
|
+
"unicorn-js/no-useless-iterator-to-array": "warn",
|
|
138
|
+
"unicorn-js/prefer-export-from": "warn",
|
|
139
|
+
"unicorn-js/prefer-simple-condition-first": "warn",
|
|
140
|
+
"unicorn-js/prefer-switch": "warn",
|
|
141
|
+
"unicorn-js/switch-case-break-position": "warn",
|
|
142
|
+
"unicorn-js/prefer-single-call": "warn",
|
|
143
|
+
"stylistic-js/type-generic-spacing": "warn",
|
|
144
|
+
"stylistic-js/type-named-tuple-spacing": "warn",
|
|
145
|
+
"stylistic-js/function-call-spacing": ["warn", "never"],
|
|
146
|
+
"stylistic-js/semi": ["warn", "never"],
|
|
147
|
+
"stylistic-js/space-before-blocks": "warn",
|
|
148
|
+
"stylistic-js/space-before-function-paren": ["warn", {
|
|
149
|
+
"anonymous": "never",
|
|
150
|
+
"asyncArrow": "always",
|
|
151
|
+
"named": "never"
|
|
152
|
+
}],
|
|
153
|
+
"stylistic-js/space-infix-ops": ["warn", { int32Hint: false }],
|
|
154
|
+
"stylistic-js/semi-spacing": "warn",
|
|
155
|
+
"stylistic-js/type-annotation-spacing": ["warn", {
|
|
156
|
+
after: true,
|
|
157
|
+
before: true,
|
|
158
|
+
overrides: { colon: {
|
|
159
|
+
after: true,
|
|
160
|
+
before: false
|
|
161
|
+
} }
|
|
162
|
+
}],
|
|
163
|
+
"stylistic-js/member-delimiter-style": ["warn", {
|
|
164
|
+
multiline: {
|
|
165
|
+
delimiter: "none",
|
|
166
|
+
requireLast: true
|
|
167
|
+
},
|
|
168
|
+
singleline: {
|
|
169
|
+
delimiter: "semi",
|
|
170
|
+
requireLast: false
|
|
171
|
+
}
|
|
172
|
+
}],
|
|
173
|
+
"stylistic-js/quotes": ["warn", "single"],
|
|
174
|
+
"stylistic-js/rest-spread-spacing": "warn",
|
|
175
|
+
"stylistic-js/space-in-parens": ["warn", "never"],
|
|
176
|
+
"stylistic-js/spaced-comment": [
|
|
177
|
+
"warn",
|
|
178
|
+
"always",
|
|
179
|
+
{
|
|
180
|
+
"line": { "markers": ["/"] },
|
|
181
|
+
"block": {
|
|
182
|
+
"markers": ["!", "*"],
|
|
183
|
+
"balanced": true
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"stylistic-js/template-curly-spacing": ["warn", "never"],
|
|
188
|
+
"stylistic-js/template-tag-spacing": "warn",
|
|
189
|
+
"stylistic-js/array-bracket-newline": ["warn", { "multiline": true }],
|
|
190
|
+
"stylistic-js/array-bracket-spacing": [
|
|
191
|
+
"warn",
|
|
192
|
+
"always",
|
|
193
|
+
{
|
|
194
|
+
"arraysInArrays": false,
|
|
195
|
+
"objectsInArrays": false
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"stylistic-js/arrow-parens": ["warn", "as-needed"],
|
|
199
|
+
"stylistic-js/arrow-spacing": "warn",
|
|
200
|
+
"stylistic-js/block-spacing": ["warn", "always"],
|
|
201
|
+
"stylistic-js/brace-style": ["warn", "1tbs"],
|
|
202
|
+
"stylistic-js/comma-dangle": ["warn", "never"],
|
|
203
|
+
"stylistic-js/comma-spacing": ["warn", {
|
|
204
|
+
"after": true,
|
|
205
|
+
"before": false
|
|
206
|
+
}],
|
|
207
|
+
"stylistic-js/comma-style": ["warn", "last"],
|
|
208
|
+
"stylistic-js/dot-location": ["warn", "property"],
|
|
209
|
+
"stylistic-js/eol-last": ["warn", "always"],
|
|
210
|
+
"stylistic-js/function-call-argument-newline": ["warn", "consistent"],
|
|
211
|
+
"stylistic-js/function-paren-newline": ["warn", "multiline-arguments"],
|
|
212
|
+
"stylistic-js/indent": [
|
|
213
|
+
"warn",
|
|
214
|
+
2,
|
|
215
|
+
{ "SwitchCase": 1 }
|
|
216
|
+
],
|
|
217
|
+
"stylistic-js/key-spacing": ["warn", {
|
|
218
|
+
"afterColon": true,
|
|
219
|
+
"beforeColon": false,
|
|
220
|
+
"mode": "strict"
|
|
221
|
+
}],
|
|
222
|
+
"stylistic-js/keyword-spacing": ["warn", {
|
|
223
|
+
"after": true,
|
|
224
|
+
"before": true
|
|
225
|
+
}],
|
|
226
|
+
"stylistic-js/linebreak-style": ["error", "unix"],
|
|
227
|
+
"stylistic-js/lines-between-class-members": [
|
|
228
|
+
"warn",
|
|
229
|
+
"always",
|
|
230
|
+
{ "exceptAfterSingleLine": true }
|
|
231
|
+
],
|
|
232
|
+
"stylistic-js/max-len": ["warn", {
|
|
233
|
+
"code": 120,
|
|
234
|
+
"comments": 180,
|
|
235
|
+
"ignoreRegExpLiterals": true,
|
|
236
|
+
"ignoreStrings": true,
|
|
237
|
+
"ignoreTemplateLiterals": true,
|
|
238
|
+
"ignoreTrailingComments": true,
|
|
239
|
+
"ignoreUrls": true
|
|
240
|
+
}],
|
|
241
|
+
"stylistic-js/max-statements-per-line": "warn",
|
|
242
|
+
"stylistic-js/new-parens": "warn",
|
|
243
|
+
"stylistic-js/no-confusing-arrow": "off",
|
|
244
|
+
"stylistic-js/no-extra-parens": ["warn", "functions"],
|
|
245
|
+
"stylistic-js/no-extra-semi": "warn",
|
|
246
|
+
"stylistic-js/no-floating-decimal": "warn",
|
|
247
|
+
"stylistic-js/no-mixed-operators": ["warn", { "groups": [
|
|
248
|
+
[
|
|
249
|
+
"&",
|
|
250
|
+
"|",
|
|
251
|
+
"^",
|
|
252
|
+
"~",
|
|
253
|
+
"<<",
|
|
254
|
+
">>",
|
|
255
|
+
">>>"
|
|
256
|
+
],
|
|
257
|
+
[
|
|
258
|
+
"==",
|
|
259
|
+
"!=",
|
|
260
|
+
"===",
|
|
261
|
+
"!==",
|
|
262
|
+
">",
|
|
263
|
+
">=",
|
|
264
|
+
"<",
|
|
265
|
+
"<="
|
|
266
|
+
],
|
|
267
|
+
["&&", "||"],
|
|
268
|
+
["in", "instanceof"]
|
|
269
|
+
] }],
|
|
270
|
+
"stylistic-js/no-mixed-spaces-and-tabs": "warn",
|
|
271
|
+
"stylistic-js/no-multi-spaces": "warn",
|
|
272
|
+
"stylistic-js/no-multiple-empty-lines": ["warn", {
|
|
273
|
+
"max": 2,
|
|
274
|
+
"maxEOF": 0
|
|
275
|
+
}],
|
|
276
|
+
"stylistic-js/no-tabs": "warn",
|
|
277
|
+
"stylistic-js/no-trailing-spaces": "warn",
|
|
278
|
+
"stylistic-js/no-whitespace-before-property": "warn",
|
|
279
|
+
"stylistic-js/object-curly-newline": ["warn", {
|
|
280
|
+
"ExportDeclaration": { "multiline": true },
|
|
281
|
+
"ImportDeclaration": { "multiline": true }
|
|
282
|
+
}],
|
|
283
|
+
"stylistic-js/object-curly-spacing": ["warn", "always"],
|
|
284
|
+
"stylistic-js/operator-linebreak": ["warn", "before"],
|
|
285
|
+
"stylistic-js/padding-line-between-statements": [
|
|
286
|
+
"warn",
|
|
287
|
+
{
|
|
288
|
+
blankLine: "always",
|
|
289
|
+
prev: "*",
|
|
290
|
+
next: "return"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
blankLine: "always",
|
|
294
|
+
prev: "*",
|
|
295
|
+
next: "function"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
blankLine: "always",
|
|
299
|
+
prev: "*",
|
|
300
|
+
next: "iife"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
blankLine: "always",
|
|
304
|
+
prev: "*",
|
|
305
|
+
next: "class"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
blankLine: "always",
|
|
309
|
+
prev: "*",
|
|
310
|
+
next: "do"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
blankLine: "always",
|
|
314
|
+
prev: "*",
|
|
315
|
+
next: "for"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
blankLine: "always",
|
|
319
|
+
prev: "*",
|
|
320
|
+
next: "throw"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
blankLine: "always",
|
|
324
|
+
prev: "*",
|
|
325
|
+
next: "try"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
blankLine: "always",
|
|
329
|
+
prev: "*",
|
|
330
|
+
next: "while"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
blankLine: "always",
|
|
334
|
+
prev: "*",
|
|
335
|
+
next: "switch"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
blankLine: "always",
|
|
339
|
+
prev: "*",
|
|
340
|
+
next: "const"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
blankLine: "any",
|
|
344
|
+
prev: "const",
|
|
345
|
+
next: "const"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
blankLine: "any",
|
|
349
|
+
prev: "let",
|
|
350
|
+
next: "const"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
blankLine: "always",
|
|
354
|
+
prev: "*",
|
|
355
|
+
next: "let"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
blankLine: "any",
|
|
359
|
+
prev: "let",
|
|
360
|
+
next: "let"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
blankLine: "any",
|
|
364
|
+
prev: "const",
|
|
365
|
+
next: "let"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
blankLine: "always",
|
|
369
|
+
prev: "*",
|
|
370
|
+
next: "export"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
blankLine: "any",
|
|
374
|
+
prev: "export",
|
|
375
|
+
next: "export"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
blankLine: "always",
|
|
379
|
+
prev: "block-like",
|
|
380
|
+
next: "*"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
blankLine: "always",
|
|
384
|
+
prev: "multiline-block-like",
|
|
385
|
+
next: "*"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"jsdoc-js/check-alignment": "warn",
|
|
389
|
+
"jsdoc-js/check-indentation": "warn",
|
|
390
|
+
"jsdoc-js/check-line-alignment": "warn",
|
|
391
|
+
"jsdoc-js/check-param-names": "warn",
|
|
392
|
+
"jsdoc-js/check-types": "warn",
|
|
393
|
+
"jsdoc-js/check-values": "warn",
|
|
394
|
+
"jsdoc-js/multiline-blocks": "warn",
|
|
395
|
+
"jsdoc-js/no-multi-asterisks": "warn",
|
|
396
|
+
"jsdoc-js/no-undefined-types": "warn",
|
|
397
|
+
"jsdoc-js/require-returns-check": "warn",
|
|
398
|
+
"jsdoc-js/require-yields-check": "warn",
|
|
399
|
+
"jsdoc-js/tag-lines": "warn",
|
|
400
|
+
"jsdoc-js/valid-types": "warn",
|
|
401
|
+
"e18e-js/prefer-array-at": "error",
|
|
402
|
+
"e18e-js/prefer-array-fill": "error",
|
|
403
|
+
"e18e-js/prefer-includes": "error",
|
|
404
|
+
"e18e-js/prefer-array-to-reversed": "error",
|
|
405
|
+
"e18e-js/prefer-array-to-sorted": "error",
|
|
406
|
+
"e18e-js/prefer-array-to-spliced": "error",
|
|
407
|
+
"e18e-js/prefer-nullish-coalescing": "error",
|
|
408
|
+
"e18e-js/prefer-object-has-own": "error",
|
|
409
|
+
"e18e-js/prefer-spread-syntax": "error",
|
|
410
|
+
"e18e-js/prefer-url-canparse": "error",
|
|
411
|
+
"e18e-js/ban-dependencies": "error",
|
|
412
|
+
"e18e-js/prefer-array-from-map": "error",
|
|
413
|
+
"e18e-js/prefer-timer-args": "error",
|
|
414
|
+
"e18e-js/prefer-date-now": "error",
|
|
415
|
+
"e18e-js/prefer-regex-test": "error",
|
|
416
|
+
"e18e-js/prefer-array-some": "error",
|
|
417
|
+
"e18e-js/prefer-static-regex": "error",
|
|
418
|
+
"no-control-regex": "error",
|
|
419
|
+
"no-misleading-character-class": "error",
|
|
420
|
+
"no-regex-spaces": "error",
|
|
421
|
+
"prefer-regex-literals": "error",
|
|
422
|
+
"no-invalid-regexp": "off",
|
|
423
|
+
"no-useless-backreference": "off",
|
|
424
|
+
"no-empty-character-class": "off",
|
|
425
|
+
"regexp-js/confusing-quantifier": "warn",
|
|
426
|
+
"regexp-js/control-character-escape": "error",
|
|
427
|
+
"regexp-js/match-any": "error",
|
|
428
|
+
"regexp-js/negation": "error",
|
|
429
|
+
"regexp-js/no-contradiction-with-assertion": "error",
|
|
430
|
+
"regexp-js/no-dupe-characters-character-class": "error",
|
|
431
|
+
"regexp-js/no-dupe-disjunctions": "error",
|
|
432
|
+
"regexp-js/no-empty-alternative": "warn",
|
|
433
|
+
"regexp-js/no-empty-capturing-group": "error",
|
|
434
|
+
"regexp-js/no-empty-character-class": "error",
|
|
435
|
+
"regexp-js/no-empty-group": "error",
|
|
436
|
+
"regexp-js/no-empty-lookarounds-assertion": "error",
|
|
437
|
+
"regexp-js/no-empty-string-literal": "error",
|
|
438
|
+
"regexp-js/no-escape-backspace": "error",
|
|
439
|
+
"regexp-js/no-extra-lookaround-assertions": "error",
|
|
440
|
+
"regexp-js/no-invalid-regexp": "error",
|
|
441
|
+
"regexp-js/no-invisible-character": "error",
|
|
442
|
+
"regexp-js/no-lazy-ends": "warn",
|
|
443
|
+
"regexp-js/no-legacy-features": "error",
|
|
444
|
+
"regexp-js/no-misleading-capturing-group": "error",
|
|
445
|
+
"regexp-js/no-misleading-unicode-character": "error",
|
|
446
|
+
"regexp-js/no-missing-g-flag": "error",
|
|
447
|
+
"regexp-js/no-non-standard-flag": "error",
|
|
448
|
+
"regexp-js/no-obscure-range": "error",
|
|
449
|
+
"regexp-js/no-optional-assertion": "error",
|
|
450
|
+
"regexp-js/no-potentially-useless-backreference": "warn",
|
|
451
|
+
"regexp-js/no-super-linear-backtracking": "error",
|
|
452
|
+
"regexp-js/no-trivially-nested-assertion": "error",
|
|
453
|
+
"regexp-js/no-trivially-nested-quantifier": "error",
|
|
454
|
+
"regexp-js/no-unused-capturing-group": "error",
|
|
455
|
+
"regexp-js/no-useless-assertions": "error",
|
|
456
|
+
"regexp-js/no-useless-backreference": "error",
|
|
457
|
+
"regexp-js/no-useless-character-class": "error",
|
|
458
|
+
"regexp-js/no-useless-dollar-replacements": "error",
|
|
459
|
+
"regexp-js/no-useless-escape": "error",
|
|
460
|
+
"regexp-js/no-useless-flag": "warn",
|
|
461
|
+
"regexp-js/no-useless-lazy": "error",
|
|
462
|
+
"regexp-js/no-useless-non-capturing-group": "error",
|
|
463
|
+
"regexp-js/no-useless-quantifier": "error",
|
|
464
|
+
"regexp-js/no-useless-range": "error",
|
|
465
|
+
"regexp-js/no-useless-set-operand": "error",
|
|
466
|
+
"regexp-js/no-useless-string-literal": "error",
|
|
467
|
+
"regexp-js/no-useless-two-nums-quantifier": "error",
|
|
468
|
+
"regexp-js/no-zero-quantifier": "error",
|
|
469
|
+
"regexp-js/optimal-lookaround-quantifier": "warn",
|
|
470
|
+
"regexp-js/optimal-quantifier-concatenation": "error",
|
|
471
|
+
"regexp-js/prefer-character-class": "error",
|
|
472
|
+
"regexp-js/prefer-d": "error",
|
|
473
|
+
"regexp-js/prefer-plus-quantifier": "error",
|
|
474
|
+
"regexp-js/prefer-predefined-assertion": "error",
|
|
475
|
+
"regexp-js/prefer-question-quantifier": "error",
|
|
476
|
+
"regexp-js/prefer-range": "error",
|
|
477
|
+
"regexp-js/prefer-set-operation": "error",
|
|
478
|
+
"regexp-js/prefer-star-quantifier": "error",
|
|
479
|
+
"regexp-js/prefer-unicode-codepoint-escapes": "error",
|
|
480
|
+
"regexp-js/prefer-w": "error",
|
|
481
|
+
"regexp-js/simplify-set-operations": "error",
|
|
482
|
+
"regexp-js/sort-flags": "error",
|
|
483
|
+
"regexp-js/strict": "error",
|
|
484
|
+
"regexp-js/use-ignore-case": "error"
|
|
485
|
+
};
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region src/plugins.ts
|
|
488
|
+
const plugins = [
|
|
489
|
+
"eslint",
|
|
490
|
+
"oxc",
|
|
491
|
+
"typescript",
|
|
492
|
+
"unicorn",
|
|
493
|
+
"import",
|
|
494
|
+
"jsdoc",
|
|
495
|
+
"react",
|
|
496
|
+
"react-perf",
|
|
497
|
+
"vitest",
|
|
498
|
+
"jsx-a11y",
|
|
499
|
+
"promise",
|
|
500
|
+
"node",
|
|
501
|
+
"vue"
|
|
502
|
+
];
|
|
503
|
+
//#endregion
|
|
504
|
+
//#region src/utils.ts
|
|
505
|
+
async function enableMode(configFiles, dependencies) {
|
|
506
|
+
if ((await Promise.all(configFiles.map(async (file) => access(join(cwd(), file)).then(() => true).catch(() => false)))).some(Boolean)) return true;
|
|
507
|
+
const packageJson = up("package.json", { cwd: cwd() });
|
|
508
|
+
if (typeof packageJson === "string") {
|
|
509
|
+
const json = JSON.parse(await readFile(packageJson, "utf8"));
|
|
510
|
+
return dependencies?.some((dependency) => json.dependencies?.[dependency] !== void 0 || json.devDependencies?.[dependency] !== void 0) ?? false;
|
|
511
|
+
}
|
|
512
|
+
return false;
|
|
513
|
+
}
|
|
514
|
+
//#endregion
|
|
515
|
+
//#region src/globals.ts
|
|
516
|
+
const convertGlobals = (input) => {
|
|
517
|
+
const result = {};
|
|
518
|
+
for (const [key, value] of Object.entries(input)) result[key] = value ? "writable" : "readonly";
|
|
519
|
+
return result;
|
|
520
|
+
};
|
|
521
|
+
const base = convertGlobals(globalsPkg["shared-node-browser"]);
|
|
522
|
+
const cloudflareSpecificGlobals = {
|
|
523
|
+
Cloudflare: "readonly",
|
|
524
|
+
URLPattern: "readonly",
|
|
525
|
+
FixedLengthStream: "readonly",
|
|
526
|
+
IdentityTransformStream: "readonly",
|
|
527
|
+
HTMLRewriter: "readonly",
|
|
528
|
+
WebSocketPair: "readonly",
|
|
529
|
+
WebSocketRequestResponsePair: "readonly"
|
|
530
|
+
};
|
|
531
|
+
const cloudflare = {
|
|
532
|
+
...base,
|
|
533
|
+
...cloudflareSpecificGlobals
|
|
534
|
+
};
|
|
535
|
+
const { Cloudflare: _, ...cloudflareWithoutCF } = cloudflare;
|
|
536
|
+
const astro = {
|
|
537
|
+
...cloudflareWithoutCF,
|
|
538
|
+
Astro: "readonly"
|
|
539
|
+
};
|
|
540
|
+
async function getGlobals() {
|
|
541
|
+
if (await enableMode([
|
|
542
|
+
"astro.config.ts",
|
|
543
|
+
"astro.config.mjs",
|
|
544
|
+
"astro.config.js"
|
|
545
|
+
], ["astro"])) return astro;
|
|
546
|
+
if (await enableMode([
|
|
547
|
+
"wrangler.toml",
|
|
548
|
+
"wrangler.json",
|
|
549
|
+
"wrangler.jsonc"
|
|
550
|
+
], ["@cloudflare/workers-types", "wrangler"])) return cloudflare;
|
|
551
|
+
return base;
|
|
552
|
+
}
|
|
553
|
+
const globals = await getGlobals();
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region src/js-plugins.ts
|
|
556
|
+
const jsPlugins = [
|
|
557
|
+
"@comment-labs/oxlint-config",
|
|
558
|
+
{
|
|
559
|
+
name: "brettz9-js",
|
|
560
|
+
specifier: "@brettz9/eslint-plugin"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
name: "i18next-js",
|
|
564
|
+
specifier: "eslint-plugin-i18next"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: "import-zod-js",
|
|
568
|
+
specifier: "eslint-plugin-import-zod"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
name: "playwright-js",
|
|
572
|
+
specifier: "eslint-plugin-playwright"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: "react-hooks-js",
|
|
576
|
+
specifier: "eslint-plugin-react-hooks"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
name: "react-native-js",
|
|
580
|
+
specifier: "eslint-plugin-react-native"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: "react-refresh-js",
|
|
584
|
+
specifier: "eslint-plugin-react-refresh"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
name: "security-js",
|
|
588
|
+
specifier: "eslint-plugin-security"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: "unicorn-js",
|
|
592
|
+
specifier: "eslint-plugin-unicorn"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: "stylistic-js",
|
|
596
|
+
specifier: "@stylistic/eslint-plugin"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "jsdoc-js",
|
|
600
|
+
specifier: "eslint-plugin-jsdoc"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
name: "e18e-js",
|
|
604
|
+
specifier: "@e18e/eslint-plugin"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
name: "regexp-js",
|
|
608
|
+
specifier: "eslint-plugin-regexp"
|
|
609
|
+
}
|
|
610
|
+
];
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region src/overrides/playwright.ts
|
|
613
|
+
const playwrightOverrides = {
|
|
614
|
+
files: ["**/e2e/**/*"],
|
|
615
|
+
rules: {
|
|
616
|
+
"playwright-js/consistent-spacing-between-blocks": "warn",
|
|
617
|
+
"playwright-js/expect-expect": "warn",
|
|
618
|
+
"playwright-js/max-nested-describe": "warn",
|
|
619
|
+
"playwright-js/missing-playwright-await": "error",
|
|
620
|
+
"playwright-js/no-conditional-expect": "warn",
|
|
621
|
+
"playwright-js/no-conditional-in-test": "warn",
|
|
622
|
+
"playwright-js/no-duplicate-hooks": "warn",
|
|
623
|
+
"playwright-js/no-duplicate-slow": "warn",
|
|
624
|
+
"playwright-js/no-element-handle": "warn",
|
|
625
|
+
"playwright-js/no-eval": "warn",
|
|
626
|
+
"playwright-js/no-focused-test": "error",
|
|
627
|
+
"playwright-js/no-force-option": "warn",
|
|
628
|
+
"playwright-js/no-nested-step": "warn",
|
|
629
|
+
"playwright-js/no-networkidle": "error",
|
|
630
|
+
"playwright-js/no-page-pause": "warn",
|
|
631
|
+
"playwright-js/no-skipped-test": "warn",
|
|
632
|
+
"playwright-js/no-standalone-expect": "error",
|
|
633
|
+
"playwright-js/no-unsafe-references": "error",
|
|
634
|
+
"playwright-js/no-unused-locators": "error",
|
|
635
|
+
"playwright-js/no-useless-await": "warn",
|
|
636
|
+
"playwright-js/no-useless-not": "warn",
|
|
637
|
+
"playwright-js/no-wait-for-navigation": "error",
|
|
638
|
+
"playwright-js/no-wait-for-selector": "warn",
|
|
639
|
+
"playwright-js/no-wait-for-timeout": "warn",
|
|
640
|
+
"playwright-js/prefer-hooks-in-order": "warn",
|
|
641
|
+
"playwright-js/prefer-hooks-on-top": "warn",
|
|
642
|
+
"playwright-js/prefer-locator": "warn",
|
|
643
|
+
"playwright-js/prefer-to-have-count": "warn",
|
|
644
|
+
"playwright-js/prefer-to-have-length": "warn",
|
|
645
|
+
"playwright-js/prefer-web-first-assertions": "error",
|
|
646
|
+
"playwright-js/valid-describe-callback": "error",
|
|
647
|
+
"playwright-js/valid-expect": "error",
|
|
648
|
+
"playwright-js/valid-expect-in-promise": "error",
|
|
649
|
+
"playwright-js/valid-test-tags": "error",
|
|
650
|
+
"playwright-js/valid-title": "error"
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region src/overrides/react.ts
|
|
655
|
+
const reactOverrides = {
|
|
656
|
+
files: ["**/*.?(c|m)@(j|t)sx"],
|
|
657
|
+
rules: {
|
|
658
|
+
"react-hooks-js/exhaustive-deps": "error",
|
|
659
|
+
"react-hooks-js/rules-of-hooks": "warn",
|
|
660
|
+
"react-refresh-js/only-export-components": "warn"
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
const reactNativeOverrides = {
|
|
664
|
+
files: [await enableMode([], ["react-native"]) ? "**/*.?(m)@(j|t)sx" : "___disabled"],
|
|
665
|
+
rules: {
|
|
666
|
+
"react-native-js/no-color-literals": "warn",
|
|
667
|
+
"react-native-js/no-inline-styles": "warn",
|
|
668
|
+
"react-native-js/no-raw-text": "off",
|
|
669
|
+
"react-native-js/no-single-element-style-arrays": "warn",
|
|
670
|
+
"react-native-js/no-unused-styles": "warn",
|
|
671
|
+
"react-native-js/sort-styles": "off",
|
|
672
|
+
"react-native-js/split-platform-components": "error"
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
//#endregion
|
|
676
|
+
//#region src/plugin/no-self-assign.ts
|
|
677
|
+
function isIdentifier(node) {
|
|
678
|
+
return node.type === "Identifier";
|
|
679
|
+
}
|
|
680
|
+
function isAssignmentPattern(node) {
|
|
681
|
+
return node.type === "AssignmentPattern";
|
|
682
|
+
}
|
|
683
|
+
function isFunctionLike(node) {
|
|
684
|
+
return node.type === "FunctionExpression" || node.type === "FunctionDeclaration" || node.type === "ArrowFunctionExpression";
|
|
685
|
+
}
|
|
686
|
+
function isNode(value) {
|
|
687
|
+
return typeof value === "object" && value !== null && typeof Reflect.get(value, "type") === "string";
|
|
688
|
+
}
|
|
689
|
+
function getProperty(value, key) {
|
|
690
|
+
return Reflect.get(value, key);
|
|
691
|
+
}
|
|
692
|
+
function getParent(node, sourceCode) {
|
|
693
|
+
return sourceCode.getAncestors(node).at(-1);
|
|
694
|
+
}
|
|
695
|
+
function traverseNodes(node, sourceCode, visitor, shouldSkipChildren) {
|
|
696
|
+
visitor(node);
|
|
697
|
+
if (shouldSkipChildren?.(node) === true) return;
|
|
698
|
+
const keys = sourceCode.visitorKeys[node.type] ?? [];
|
|
699
|
+
for (const key of keys) {
|
|
700
|
+
const value = getProperty(node, key);
|
|
701
|
+
if (Array.isArray(value)) {
|
|
702
|
+
for (const child of value) if (isNode(child)) traverseNodes(child, sourceCode, visitor, shouldSkipChildren);
|
|
703
|
+
} else if (isNode(value)) traverseNodes(value, sourceCode, visitor, shouldSkipChildren);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
function isReferenceIdentifier(identifier, sourceCode) {
|
|
707
|
+
const parent = getParent(identifier, sourceCode);
|
|
708
|
+
if (!parent) return true;
|
|
709
|
+
if (parent.type.startsWith("TS")) return false;
|
|
710
|
+
if (parent.type === "Property" && parent.key === identifier) return parent.computed || parent.shorthand;
|
|
711
|
+
if (parent.type === "MemberExpression" && parent.property === identifier) return parent.computed;
|
|
712
|
+
if ((parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") && parent.key === identifier && !parent.computed) return false;
|
|
713
|
+
if (parent.type === "ImportSpecifier" || parent.type === "ImportDefaultSpecifier" || parent.type === "ImportNamespaceSpecifier") return false;
|
|
714
|
+
if (parent.type === "ExportSpecifier" && parent.exported === identifier) return false;
|
|
715
|
+
if (parent.type === "LabeledStatement" && parent.label === identifier) return false;
|
|
716
|
+
return true;
|
|
717
|
+
}
|
|
718
|
+
function findVariable(node, name, sourceCode) {
|
|
719
|
+
let scope = sourceCode.getScope(node);
|
|
720
|
+
while (scope) {
|
|
721
|
+
const variable = scope.set.get(name);
|
|
722
|
+
if (variable) return variable;
|
|
723
|
+
scope = scope.upper;
|
|
724
|
+
}
|
|
725
|
+
return null;
|
|
726
|
+
}
|
|
727
|
+
function isSelfReference(identifier, variable, sourceCode) {
|
|
728
|
+
if (variable.references.some((reference) => reference.identifier === identifier)) return true;
|
|
729
|
+
let scope = sourceCode.getScope(identifier);
|
|
730
|
+
while (scope) {
|
|
731
|
+
const reference = scope.references.find((candidate) => candidate.identifier === identifier);
|
|
732
|
+
if (reference) return reference.resolved === variable;
|
|
733
|
+
scope = scope.upper;
|
|
734
|
+
}
|
|
735
|
+
scope = sourceCode.getScope(identifier);
|
|
736
|
+
while (scope) {
|
|
737
|
+
const candidate = scope.set.get(identifier.name);
|
|
738
|
+
if (candidate) return candidate === variable;
|
|
739
|
+
scope = scope.upper;
|
|
740
|
+
}
|
|
741
|
+
for (const ancestor of sourceCode.getAncestors(identifier).toReversed()) {
|
|
742
|
+
if (!isAssignmentPattern(ancestor)) continue;
|
|
743
|
+
if (isIdentifier(ancestor.left) && ancestor.left.name === variable.name && variable.defs.some((definition) => definition.name === ancestor.left)) return true;
|
|
744
|
+
}
|
|
745
|
+
return false;
|
|
746
|
+
}
|
|
747
|
+
function isUnresolvedSelfReference(identifier, name, sourceCode) {
|
|
748
|
+
if (identifier.name !== name) return false;
|
|
749
|
+
return findVariable(identifier, name, sourceCode) === null;
|
|
750
|
+
}
|
|
751
|
+
function reportSelfReferences(context, sourceCode, node, variable) {
|
|
752
|
+
traverseNodes(node, sourceCode, (child) => {
|
|
753
|
+
if (!isIdentifier(child)) return;
|
|
754
|
+
if (!isReferenceIdentifier(child, sourceCode)) return;
|
|
755
|
+
if (isSelfReference(child, variable, sourceCode)) context.report({
|
|
756
|
+
node: child,
|
|
757
|
+
messageId: "selfRef",
|
|
758
|
+
data: { name: variable.name }
|
|
759
|
+
});
|
|
760
|
+
}, isFunctionLike);
|
|
761
|
+
}
|
|
762
|
+
function reportSelfReferencesByName(context, sourceCode, node, name) {
|
|
763
|
+
traverseNodes(node, sourceCode, (child) => {
|
|
764
|
+
if (!isIdentifier(child)) return;
|
|
765
|
+
if (!isReferenceIdentifier(child, sourceCode)) return;
|
|
766
|
+
if (isUnresolvedSelfReference(child, name, sourceCode)) context.report({
|
|
767
|
+
node: child,
|
|
768
|
+
messageId: "selfRef",
|
|
769
|
+
data: { name }
|
|
770
|
+
});
|
|
771
|
+
}, isFunctionLike);
|
|
772
|
+
}
|
|
773
|
+
function reportDefaultParameterSelfReferences(context, sourceCode, node) {
|
|
774
|
+
for (const param of node.params) {
|
|
775
|
+
if (!isAssignmentPattern(param) || !isIdentifier(param.left)) continue;
|
|
776
|
+
const variable = findVariable(param.left, param.left.name, sourceCode);
|
|
777
|
+
if (!variable) continue;
|
|
778
|
+
reportSelfReferences(context, sourceCode, param.right, variable);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
const noSelfAssign = {
|
|
782
|
+
meta: {
|
|
783
|
+
type: "problem",
|
|
784
|
+
docs: { description: "Disallow self-references inside variable initializers and parameter default values" },
|
|
785
|
+
schema: [],
|
|
786
|
+
messages: { selfRef: "Variable {{name}} is referenced within its own initializer." }
|
|
787
|
+
},
|
|
788
|
+
create(context) {
|
|
789
|
+
const sourceCode = context.sourceCode;
|
|
790
|
+
return {
|
|
791
|
+
VariableDeclarator(node) {
|
|
792
|
+
if (!node.init || !isIdentifier(node.id)) return;
|
|
793
|
+
const variable = findVariable(node, node.id.name, sourceCode);
|
|
794
|
+
if (!variable) return;
|
|
795
|
+
reportSelfReferences(context, sourceCode, node.init, variable);
|
|
796
|
+
},
|
|
797
|
+
FunctionDeclaration(node) {
|
|
798
|
+
reportDefaultParameterSelfReferences(context, sourceCode, node);
|
|
799
|
+
},
|
|
800
|
+
FunctionExpression(node) {
|
|
801
|
+
reportDefaultParameterSelfReferences(context, sourceCode, node);
|
|
802
|
+
},
|
|
803
|
+
ArrowFunctionExpression(node) {
|
|
804
|
+
reportDefaultParameterSelfReferences(context, sourceCode, node);
|
|
805
|
+
},
|
|
806
|
+
PropertyDefinition(node) {
|
|
807
|
+
if (!node.value || !isIdentifier(node.key)) return;
|
|
808
|
+
reportSelfReferencesByName(context, sourceCode, node.value, node.key.name);
|
|
809
|
+
}
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region src/plugin/index.ts
|
|
815
|
+
const commentLabsJs = {
|
|
816
|
+
meta: {
|
|
817
|
+
name: "comment-labs-js",
|
|
818
|
+
version: "1.0.0"
|
|
819
|
+
},
|
|
820
|
+
rules: { "no-self-assign": noSelfAssign }
|
|
821
|
+
};
|
|
822
|
+
//#endregion
|
|
823
|
+
//#region src/index.ts
|
|
824
|
+
const config = {
|
|
825
|
+
options: {
|
|
826
|
+
reportUnusedDisableDirectives: "warn",
|
|
827
|
+
typeAware: true,
|
|
828
|
+
typeCheck: true
|
|
829
|
+
},
|
|
830
|
+
plugins,
|
|
831
|
+
jsPlugins,
|
|
832
|
+
rules: baseRules,
|
|
833
|
+
globals,
|
|
834
|
+
categories,
|
|
835
|
+
settings: { vitest: { typecheck: true } },
|
|
836
|
+
overrides: [
|
|
837
|
+
playwrightOverrides,
|
|
838
|
+
reactOverrides,
|
|
839
|
+
reactNativeOverrides
|
|
840
|
+
],
|
|
841
|
+
ignorePatterns: [
|
|
842
|
+
"coverage/**",
|
|
843
|
+
"public/**",
|
|
844
|
+
".expo/**",
|
|
845
|
+
".output/**",
|
|
846
|
+
"**/dist/**",
|
|
847
|
+
"**/*wasm-bindgen/**"
|
|
848
|
+
]
|
|
849
|
+
};
|
|
850
|
+
//#endregion
|
|
851
|
+
export { config, commentLabsJs as default };
|
|
852
|
+
|
|
853
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/categories.ts","../src/base-rules.ts","../src/plugins.ts","../src/utils.ts","../src/globals.ts","../src/js-plugins.ts","../src/overrides/playwright.ts","../src/overrides/react.ts","../src/overrides/react-native.ts","../src/plugin/no-self-assign.ts","../src/plugin/index.ts","../src/index.ts"],"sourcesContent":["import type { RuleCategories } from 'oxlint'\n\n\nexport const categories: RuleCategories = {\n correctness: 'error',\n nursery: 'warn',\n pedantic: 'warn',\n perf: 'warn',\n restriction: 'warn',\n style: 'warn',\n suspicious: 'error'\n}\n","import type { DummyRuleMap } from 'oxlint'\n\n\nexport const baseRules: DummyRuleMap = {\n 'array-type': 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'warn',\n 'consistent-indexed-object-style': 'off',\n 'consistent-type-definitions': 'off',\n 'complexity': [ 'warn', { max: 50 }],\n 'default-case': 'off',\n 'exports-last': 'off',\n 'explicit-function-return-type': 'off',\n 'explicit-module-boundary-types': 'off',\n 'func-style': 'off',\n 'group-exports': 'off',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'max-dependencies': 'off',\n 'max-depth': [ 'warn', 7 ],\n 'max-lines': [\n 'warn',\n {\n max: 500,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-lines-per-function': [\n 'warn',\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-params': 'off',\n 'max-statements': [ 'warn', { max: 50 }],\n 'no-array-for-each': 'off',\n 'no-array-method-this-argument': 'off',\n 'no-array-reduce': 'off',\n 'no-array-sort': 'off',\n 'no-async-await': 'off',\n 'no-await-expression-member': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'new-cap': 'off',\n 'no-console': 'off',\n 'no-continue': 'off',\n 'no-default-export': 'off',\n 'no-extraneous-class': 'off',\n 'no-inline-comments': 'off',\n 'no-magic-numbers': 'off',\n 'no-map-spread': 'off',\n 'no-named-export': 'off',\n 'no-namespace': 'off',\n 'no-nested-ternary': 'off',\n 'no-null': 'off',\n 'no-negated-condition': 'off',\n 'no-optional-chaining': 'off',\n 'no-plusplus': 'off',\n 'no-relative-parent-imports': 'off',\n 'no-rest-spread-properties': 'off',\n 'no-shadow': 'warn',\n 'no-ternary': 'off',\n 'no-undefined': 'off',\n 'no-unassigned-import': 'off',\n 'no-use-before-define': [ 'warn', { functions: false }],\n 'no-warning-comments': 'off',\n 'prefer-default-export': 'off',\n 'prefer-destructuring': 'off',\n 'require-await': 'off',\n 'sort-imports': 'off',\n 'sort-keys': 'off',\n\n 'typescript/consistent-type-imports': [\n 'warn',\n {\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports'\n }\n ],\n 'typescript/no-import-type-side-effects': 'error',\n 'typescript/parameter-properties': [ 'warn', { prefer: 'parameter-property' }],\n 'typescript/prefer-readonly-parameter-types': 'off',\n 'typescript/require-await': 'warn',\n 'typescript/no-non-nullable-type-assertion-style': 'warn',\n\n 'import/no-unassigned-import': 'warn',\n 'import/consistent-type-specifier-style': 'off',\n 'import/no-anonymous-default-export': 'off',\n 'import/no-cycle': 'off',\n 'import/no-nodejs-modules': 'off',\n 'import/unambiguous': 'off',\n\n // TODO enable jest rules for vitest\n 'jest/require-hook': 'off',\n 'jest/no-conditional-in-test': 'off',\n\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-returns': 'off',\n 'jsdoc/require-param': 'off',\n\n 'unicorn/no-nested-ternary': 'off',\n 'unicorn/switch-case-braces': [ 'warn', 'avoid' ],\n 'unicorn/no-array-method-this-argument': 'warn',\n 'unicorn/no-await-expression-member': 'warn',\n\n 'vitest/no-importing-vitest-globals': 'off',\n\n // custom rules\n 'comment-labs-js/no-self-assign': 'error',\n\n // js plugin rules\n 'brettz9-js/arrow-parens': 'off',\n 'brettz9-js/block-scoped-var': 'off',\n 'brettz9-js/no-instanceof-wrapper': 'error',\n 'brettz9-js/no-literal-call': 'error',\n 'brettz9-js/no-this-in-static': 'error',\n 'brettz9-js/no-use-ignored-vars': 'warn',\n 'brettz9-js/no-useless-rest-spread': 'warn',\n 'brettz9-js/prefer-for-of': 'off',\n\n 'i18next-js/no-literal-string': 'warn',\n\n 'import-zod-js/prefer-zod-namespace': 'warn',\n\n 'security-js/detect-unsafe-regex': 'error',\n 'security-js/detect-non-literal-regexp': 'error',\n 'security-js/detect-non-literal-require': 'off',\n 'security-js/detect-non-literal-fs-filename': 'off',\n 'security-js/detect-eval-with-expression': 'error',\n 'security-js/detect-pseudoRandomBytes': 'error',\n 'security-js/detect-possible-timing-attacks': 'error',\n 'security-js/detect-no-csrf-before-method-override': 'error',\n 'security-js/detect-buffer-noassert': 'error',\n 'security-js/detect-child-process': 'error',\n 'security-js/detect-disable-mustache-escape': 'error',\n 'security-js/detect-object-injection': 'off',\n 'security-js/detect-new-buffer': 'error',\n 'security-js/detect-bidi-characters': 'error',\n\n 'unicorn-js/better-regex': 'warn',\n 'unicorn-js/consistent-destructuring': 'warn',\n 'unicorn-js/consistent-template-literal-escape': 'warn',\n 'unicorn-js/no-for-loop': 'warn',\n 'unicorn-js/no-useless-iterator-to-array': 'warn',\n 'unicorn-js/prefer-export-from': 'warn',\n 'unicorn-js/prefer-simple-condition-first': 'warn',\n 'unicorn-js/prefer-switch': 'warn',\n 'unicorn-js/switch-case-break-position': 'warn',\n 'unicorn-js/prefer-single-call': 'warn',\n\n 'stylistic-js/type-generic-spacing': 'warn',\n 'stylistic-js/type-named-tuple-spacing': 'warn',\n 'stylistic-js/function-call-spacing': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/semi': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/space-before-blocks': 'warn',\n 'stylistic-js/space-before-function-paren': [\n 'warn',\n {\n 'anonymous': 'never',\n 'asyncArrow': 'always',\n 'named': 'never'\n }\n ],\n 'stylistic-js/space-infix-ops': [ 'warn', { int32Hint: false }],\n 'stylistic-js/semi-spacing': 'warn',\n 'stylistic-js/type-annotation-spacing': [\n 'warn', {\n after: true, before: true,\n overrides: { colon: { after: true, before: false } }\n }\n ],\n 'stylistic-js/member-delimiter-style': [\n 'warn', {\n multiline: { delimiter: 'none', requireLast: true },\n singleline: { delimiter: 'semi', requireLast: false }\n }\n ],\n 'stylistic-js/quotes': [ 'warn', 'single' ],\n 'stylistic-js/rest-spread-spacing': 'warn',\n 'stylistic-js/space-in-parens': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/spaced-comment': [\n 'warn',\n 'always',\n {\n 'line': {\n 'markers': [ '/' ]\n },\n 'block': {\n 'markers': [ '!', '*' ],\n 'balanced': true\n }\n }\n ],\n 'stylistic-js/template-curly-spacing': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/template-tag-spacing': 'warn',\n 'stylistic-js/array-bracket-newline': [\n 'warn',\n {\n 'multiline': true\n }\n ],\n 'stylistic-js/array-bracket-spacing': [\n 'warn',\n 'always',\n {\n 'arraysInArrays': false,\n 'objectsInArrays': false\n }\n ],\n 'stylistic-js/arrow-parens': [\n 'warn',\n 'as-needed'\n ],\n 'stylistic-js/arrow-spacing': 'warn',\n 'stylistic-js/block-spacing': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/brace-style': [\n 'warn',\n '1tbs'\n ],\n 'stylistic-js/comma-dangle': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/comma-spacing': [\n 'warn',\n {\n 'after': true,\n 'before': false\n }\n ],\n 'stylistic-js/comma-style': [\n 'warn',\n 'last'\n ],\n 'stylistic-js/dot-location': [\n 'warn',\n 'property'\n ],\n 'stylistic-js/eol-last': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/function-call-argument-newline': [\n 'warn',\n 'consistent'\n ],\n 'stylistic-js/function-paren-newline': [\n 'warn',\n 'multiline-arguments'\n ],\n 'stylistic-js/indent': [\n 'warn',\n 2,\n {\n 'SwitchCase': 1\n }\n ],\n 'stylistic-js/key-spacing': [\n 'warn',\n {\n 'afterColon': true,\n 'beforeColon': false,\n 'mode': 'strict'\n }\n ],\n 'stylistic-js/keyword-spacing': [\n 'warn',\n {\n 'after': true,\n 'before': true\n }\n ],\n 'stylistic-js/linebreak-style': [\n 'error',\n 'unix'\n ],\n 'stylistic-js/lines-between-class-members': [\n 'warn',\n 'always',\n {\n 'exceptAfterSingleLine': true\n }\n ],\n 'stylistic-js/max-len': [\n 'warn',\n {\n 'code': 120,\n 'comments': 180,\n 'ignoreRegExpLiterals': true,\n 'ignoreStrings': true,\n 'ignoreTemplateLiterals': true,\n 'ignoreTrailingComments': true,\n 'ignoreUrls': true\n }\n ],\n 'stylistic-js/max-statements-per-line': 'warn',\n 'stylistic-js/new-parens': 'warn',\n 'stylistic-js/no-confusing-arrow': 'off',\n 'stylistic-js/no-extra-parens': [\n 'warn',\n 'functions'\n ],\n 'stylistic-js/no-extra-semi': 'warn',\n 'stylistic-js/no-floating-decimal': 'warn',\n 'stylistic-js/no-mixed-operators': [\n 'warn', {\n 'groups': [\n [ '&', '|', '^', '~', '<<', '>>', '>>>' ],\n [ '==', '!=', '===', '!==', '>', '>=', '<', '<=' ],\n [ '&&', '||' ],\n [ 'in', 'instanceof' ]\n ]\n }\n ],\n 'stylistic-js/no-mixed-spaces-and-tabs': 'warn',\n 'stylistic-js/no-multi-spaces': 'warn',\n 'stylistic-js/no-multiple-empty-lines': [\n 'warn',\n {\n 'max': 2,\n 'maxEOF': 0\n }\n ],\n 'stylistic-js/no-tabs': 'warn',\n 'stylistic-js/no-trailing-spaces': 'warn',\n 'stylistic-js/no-whitespace-before-property': 'warn',\n 'stylistic-js/object-curly-newline': [\n 'warn',\n {\n 'ExportDeclaration': {\n 'multiline': true\n },\n 'ImportDeclaration': {\n 'multiline': true\n }\n }\n ],\n 'stylistic-js/object-curly-spacing': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/operator-linebreak': [\n 'warn',\n 'before'\n ],\n 'stylistic-js/padding-line-between-statements': [\n 'warn',\n { blankLine: 'always', prev: '*', next: 'return' },\n { blankLine: 'always', prev: '*', next: 'function' },\n { blankLine: 'always', prev: '*', next: 'iife' },\n { blankLine: 'always', prev: '*', next: 'class' },\n { blankLine: 'always', prev: '*', next: 'do' },\n { blankLine: 'always', prev: '*', next: 'for' },\n { blankLine: 'always', prev: '*', next: 'throw' },\n { blankLine: 'always', prev: '*', next: 'try' },\n { blankLine: 'always', prev: '*', next: 'while' },\n { blankLine: 'always', prev: '*', next: 'switch' },\n\n { blankLine: 'always', prev: '*', next: 'const' },\n { blankLine: 'any', prev: 'const', next: 'const' },\n { blankLine: 'any', prev: 'let', next: 'const' },\n { blankLine: 'always', prev: '*', next: 'let' },\n { blankLine: 'any', prev: 'let', next: 'let' },\n { blankLine: 'any', prev: 'const', next: 'let' },\n\n { blankLine: 'always', prev: '*', next: 'export' },\n { blankLine: 'any', prev: 'export', next: 'export' },\n { blankLine: 'always', prev: 'block-like', next: '*' },\n { blankLine: 'always', prev: 'multiline-block-like', next: '*' }\n ],\n\n 'jsdoc-js/check-alignment': 'warn',\n 'jsdoc-js/check-indentation': 'warn',\n 'jsdoc-js/check-line-alignment': 'warn',\n 'jsdoc-js/check-param-names': 'warn',\n 'jsdoc-js/check-types': 'warn',\n 'jsdoc-js/check-values': 'warn',\n 'jsdoc-js/multiline-blocks': 'warn',\n 'jsdoc-js/no-multi-asterisks': 'warn',\n 'jsdoc-js/no-undefined-types': 'warn',\n 'jsdoc-js/require-returns-check': 'warn',\n 'jsdoc-js/require-yields-check': 'warn',\n 'jsdoc-js/tag-lines': 'warn',\n 'jsdoc-js/valid-types': 'warn',\n\n 'e18e-js/prefer-array-at': 'error',\n 'e18e-js/prefer-array-fill': 'error',\n 'e18e-js/prefer-includes': 'error',\n 'e18e-js/prefer-array-to-reversed': 'error',\n 'e18e-js/prefer-array-to-sorted': 'error',\n 'e18e-js/prefer-array-to-spliced': 'error',\n 'e18e-js/prefer-nullish-coalescing': 'error',\n 'e18e-js/prefer-object-has-own': 'error',\n 'e18e-js/prefer-spread-syntax': 'error',\n 'e18e-js/prefer-url-canparse': 'error',\n 'e18e-js/ban-dependencies': 'error',\n 'e18e-js/prefer-array-from-map': 'error',\n 'e18e-js/prefer-timer-args': 'error',\n 'e18e-js/prefer-date-now': 'error',\n 'e18e-js/prefer-regex-test': 'error',\n 'e18e-js/prefer-array-some': 'error',\n 'e18e-js/prefer-static-regex': 'error',\n\n 'no-control-regex': 'error',\n 'no-misleading-character-class': 'error',\n 'no-regex-spaces': 'error',\n 'prefer-regex-literals': 'error',\n 'no-invalid-regexp': 'off',\n 'no-useless-backreference': 'off',\n 'no-empty-character-class': 'off',\n\n 'regexp-js/confusing-quantifier': 'warn',\n 'regexp-js/control-character-escape': 'error',\n 'regexp-js/match-any': 'error',\n 'regexp-js/negation': 'error',\n 'regexp-js/no-contradiction-with-assertion': 'error',\n 'regexp-js/no-dupe-characters-character-class': 'error',\n 'regexp-js/no-dupe-disjunctions': 'error',\n 'regexp-js/no-empty-alternative': 'warn',\n 'regexp-js/no-empty-capturing-group': 'error',\n 'regexp-js/no-empty-character-class': 'error',\n 'regexp-js/no-empty-group': 'error',\n 'regexp-js/no-empty-lookarounds-assertion': 'error',\n 'regexp-js/no-empty-string-literal': 'error',\n 'regexp-js/no-escape-backspace': 'error',\n 'regexp-js/no-extra-lookaround-assertions': 'error',\n 'regexp-js/no-invalid-regexp': 'error',\n 'regexp-js/no-invisible-character': 'error',\n 'regexp-js/no-lazy-ends': 'warn',\n 'regexp-js/no-legacy-features': 'error',\n 'regexp-js/no-misleading-capturing-group': 'error',\n 'regexp-js/no-misleading-unicode-character': 'error',\n 'regexp-js/no-missing-g-flag': 'error',\n 'regexp-js/no-non-standard-flag': 'error',\n 'regexp-js/no-obscure-range': 'error',\n 'regexp-js/no-optional-assertion': 'error',\n 'regexp-js/no-potentially-useless-backreference': 'warn',\n 'regexp-js/no-super-linear-backtracking': 'error',\n 'regexp-js/no-trivially-nested-assertion': 'error',\n 'regexp-js/no-trivially-nested-quantifier': 'error',\n 'regexp-js/no-unused-capturing-group': 'error',\n 'regexp-js/no-useless-assertions': 'error',\n 'regexp-js/no-useless-backreference': 'error',\n 'regexp-js/no-useless-character-class': 'error',\n 'regexp-js/no-useless-dollar-replacements': 'error',\n 'regexp-js/no-useless-escape': 'error',\n 'regexp-js/no-useless-flag': 'warn',\n 'regexp-js/no-useless-lazy': 'error',\n 'regexp-js/no-useless-non-capturing-group': 'error',\n 'regexp-js/no-useless-quantifier': 'error',\n 'regexp-js/no-useless-range': 'error',\n 'regexp-js/no-useless-set-operand': 'error',\n 'regexp-js/no-useless-string-literal': 'error',\n 'regexp-js/no-useless-two-nums-quantifier': 'error',\n 'regexp-js/no-zero-quantifier': 'error',\n 'regexp-js/optimal-lookaround-quantifier': 'warn',\n 'regexp-js/optimal-quantifier-concatenation': 'error',\n 'regexp-js/prefer-character-class': 'error',\n 'regexp-js/prefer-d': 'error',\n 'regexp-js/prefer-plus-quantifier': 'error',\n 'regexp-js/prefer-predefined-assertion': 'error',\n 'regexp-js/prefer-question-quantifier': 'error',\n 'regexp-js/prefer-range': 'error',\n 'regexp-js/prefer-set-operation': 'error',\n 'regexp-js/prefer-star-quantifier': 'error',\n 'regexp-js/prefer-unicode-codepoint-escapes': 'error',\n 'regexp-js/prefer-w': 'error',\n 'regexp-js/simplify-set-operations': 'error',\n 'regexp-js/sort-flags': 'error',\n 'regexp-js/strict': 'error',\n 'regexp-js/use-ignore-case': 'error'\n}\n","import type { OxlintConfig } from 'oxlint'\n\n\nexport const plugins: NonNullable<OxlintConfig['plugins']> = [\n 'eslint',\n 'oxc',\n 'typescript',\n 'unicorn',\n 'import',\n 'jsdoc',\n 'react',\n 'react-perf',\n 'vitest',\n 'jsx-a11y',\n 'promise',\n 'node',\n 'vue'\n]\n","import { access, readFile } from 'node:fs/promises'\nimport { join } from 'node:path'\nimport { cwd } from 'node:process'\nimport { up } from 'empathic/find'\n\n\nexport async function enableMode(configFiles: string[], dependencies?: string[]): Promise<boolean> {\n\n const hasConfigFile = await Promise.all(configFiles.map(async file => access(join(cwd(), file))\n .then(() => true)\n .catch(() => false)))\n\n if (hasConfigFile.some(Boolean)) {\n return true\n }\n\n const packageJson = up('package.json', { cwd: cwd() })\n if (typeof packageJson === 'string') {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const json = JSON.parse(await readFile(packageJson, 'utf8')) as { dependencies?: Record<string, string>; devDependencies?: Record<string, string> }\n\n return dependencies?.some(dependency =>\n json.dependencies?.[dependency] !== undefined || json.devDependencies?.[dependency] !== undefined) ?? false\n }\n\n return false\n}\n","import globalsPkg from 'globals'\nimport type { OxlintGlobals } from 'oxlint'\nimport { enableMode } from './utils'\n\n\nconst convertGlobals = (input: Record<string, boolean>): OxlintGlobals => {\n const result: Record<string, 'readonly' | 'writable'> = {}\n\n for (const [ key, value ] of Object.entries(input)) {\n result[key] = value ? 'writable' : 'readonly'\n }\n\n return result as OxlintGlobals\n}\n\nconst base: OxlintGlobals = convertGlobals(globalsPkg['shared-node-browser'])\n\nconst cloudflareSpecificGlobals: OxlintGlobals = {\n Cloudflare: 'readonly',\n URLPattern: 'readonly',\n FixedLengthStream: 'readonly',\n IdentityTransformStream: 'readonly',\n HTMLRewriter: 'readonly',\n WebSocketPair: 'readonly',\n WebSocketRequestResponsePair: 'readonly'\n}\n\nconst cloudflare: OxlintGlobals = {\n ...base,\n ...cloudflareSpecificGlobals\n}\n\nconst { Cloudflare: _, ...cloudflareWithoutCF } = cloudflare\nconst astro: OxlintGlobals = {\n ...cloudflareWithoutCF,\n Astro: 'readonly'\n}\n\nasync function getGlobals(): Promise<OxlintGlobals> {\n const isAstro = await enableMode(\n [ 'astro.config.ts', 'astro.config.mjs', 'astro.config.js' ],\n [ 'astro' ]\n )\n\n if (isAstro) {\n return astro\n }\n\n const isCloudflare = await enableMode(\n [ 'wrangler.toml', 'wrangler.json', 'wrangler.jsonc' ],\n [ '@cloudflare/workers-types', 'wrangler' ]\n )\n\n if (isCloudflare) {\n return cloudflare\n }\n\n return base\n}\n\nexport const globals = await getGlobals()\n","export const jsPlugins = [\n '@comment-labs/oxlint-config',\n { name: 'brettz9-js', specifier: '@brettz9/eslint-plugin' },\n { name: 'i18next-js', specifier: 'eslint-plugin-i18next' },\n { name: 'import-zod-js', specifier: 'eslint-plugin-import-zod' },\n { name: 'playwright-js', specifier: 'eslint-plugin-playwright' },\n { name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },\n { name: 'react-native-js', specifier: 'eslint-plugin-react-native' },\n { name: 'react-refresh-js', specifier: 'eslint-plugin-react-refresh' },\n { name: 'security-js', specifier: 'eslint-plugin-security' },\n { name: 'unicorn-js', specifier: 'eslint-plugin-unicorn' },\n { name: 'stylistic-js', specifier: '@stylistic/eslint-plugin' },\n { name: 'jsdoc-js', specifier: 'eslint-plugin-jsdoc' },\n { name: 'e18e-js', specifier: '@e18e/eslint-plugin' },\n { name: 'regexp-js', specifier: 'eslint-plugin-regexp' }\n]\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const playwrightOverrides: OxlintOverride = {\n files: [ '**/e2e/**/*' ],\n rules: {\n 'playwright-js/consistent-spacing-between-blocks': 'warn',\n 'playwright-js/expect-expect': 'warn',\n 'playwright-js/max-nested-describe': 'warn',\n 'playwright-js/missing-playwright-await': 'error',\n 'playwright-js/no-conditional-expect': 'warn',\n 'playwright-js/no-conditional-in-test': 'warn',\n 'playwright-js/no-duplicate-hooks': 'warn',\n 'playwright-js/no-duplicate-slow': 'warn',\n 'playwright-js/no-element-handle': 'warn',\n 'playwright-js/no-eval': 'warn',\n 'playwright-js/no-focused-test': 'error',\n 'playwright-js/no-force-option': 'warn',\n 'playwright-js/no-nested-step': 'warn',\n 'playwright-js/no-networkidle': 'error',\n 'playwright-js/no-page-pause': 'warn',\n 'playwright-js/no-skipped-test': 'warn',\n 'playwright-js/no-standalone-expect': 'error',\n 'playwright-js/no-unsafe-references': 'error',\n 'playwright-js/no-unused-locators': 'error',\n 'playwright-js/no-useless-await': 'warn',\n 'playwright-js/no-useless-not': 'warn',\n 'playwright-js/no-wait-for-navigation': 'error',\n 'playwright-js/no-wait-for-selector': 'warn',\n 'playwright-js/no-wait-for-timeout': 'warn',\n 'playwright-js/prefer-hooks-in-order': 'warn',\n 'playwright-js/prefer-hooks-on-top': 'warn',\n 'playwright-js/prefer-locator': 'warn',\n 'playwright-js/prefer-to-have-count': 'warn',\n 'playwright-js/prefer-to-have-length': 'warn',\n 'playwright-js/prefer-web-first-assertions': 'error',\n 'playwright-js/valid-describe-callback': 'error',\n 'playwright-js/valid-expect': 'error',\n 'playwright-js/valid-expect-in-promise': 'error',\n 'playwright-js/valid-test-tags': 'error',\n 'playwright-js/valid-title': 'error'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const reactOverrides: OxlintOverride = {\n files: [ '**/*.?(c|m)@(j|t)sx' ],\n rules: {\n 'react-hooks-js/exhaustive-deps': 'error',\n 'react-hooks-js/rules-of-hooks': 'warn',\n\n 'react-refresh-js/only-export-components': 'warn'\n }\n}\n","import { enableMode } from '#/utils'\nimport type { OxlintOverride } from 'oxlint'\n\n\nconst reactNative = await enableMode([], [ 'react-native' ])\n\nexport const reactNativeOverrides: OxlintOverride = {\n files: [ reactNative ? '**/*.?(m)@(j|t)sx' : '___disabled' ],\n rules: {\n 'react-native-js/no-color-literals': 'warn',\n 'react-native-js/no-inline-styles': 'warn',\n 'react-native-js/no-raw-text': 'off',\n 'react-native-js/no-single-element-style-arrays': 'warn',\n 'react-native-js/no-unused-styles': 'warn',\n 'react-native-js/sort-styles': 'off',\n 'react-native-js/split-platform-components': 'error'\n }\n}\n","import type { Rule, Scope, SourceCode } from 'eslint'\n\n\n/*\n * Ported from:\n * https://github.com/DaniFoldi/bundled-lint-config/blob/main/packages/bundled-eslint-config/src/rules/no-self-assign.ts\n *\n * Includes code derived from MIT-licensed source.\n * Copyright (c) 2026 Dániel Földi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n */\n\ntype ScopeNode = Parameters<SourceCode['getScope']>[0]\ntype IdentifierNode = ScopeNode & { type: 'Identifier'; name: string }\ntype AssignmentPatternNode = ScopeNode & {\n type: 'AssignmentPattern'\n left: ScopeNode\n right: ScopeNode\n}\ntype FunctionLikeNode = ScopeNode & {\n type: 'ArrowFunctionExpression' | 'FunctionDeclaration' | 'FunctionExpression'\n params: readonly ScopeNode[]\n}\n\nfunction isIdentifier(node: { type: string } | ScopeNode): node is IdentifierNode {\n return node.type === 'Identifier'\n}\n\nfunction isAssignmentPattern(node: ScopeNode): node is AssignmentPatternNode {\n return node.type === 'AssignmentPattern'\n}\n\nfunction isFunctionLike(node: ScopeNode): node is FunctionLikeNode {\n return node.type === 'FunctionExpression'\n || node.type === 'FunctionDeclaration'\n || node.type === 'ArrowFunctionExpression'\n}\n\nfunction isNode(value: unknown): value is ScopeNode {\n return typeof value === 'object'\n && value !== null\n && typeof Reflect.get(value, 'type') === 'string'\n}\n\nfunction getProperty(value: object, key: PropertyKey): unknown {\n return Reflect.get(value, key)\n}\n\nfunction getParent(node: ScopeNode, sourceCode: SourceCode) {\n return sourceCode.getAncestors(node).at(-1)\n}\n\nfunction traverseNodes(\n node: ScopeNode,\n sourceCode: SourceCode,\n visitor: (child: ScopeNode) => void,\n shouldSkipChildren?: (child: ScopeNode) => boolean\n): void {\n visitor(node)\n\n if (shouldSkipChildren?.(node) === true) {\n return\n }\n\n const keys = sourceCode.visitorKeys[node.type] ?? []\n\n for (const key of keys) {\n const value = getProperty(node, key)\n\n if (Array.isArray(value)) {\n for (const child of value) {\n if (isNode(child)) {\n traverseNodes(child, sourceCode, visitor, shouldSkipChildren)\n }\n }\n } else if (isNode(value)) {\n traverseNodes(value, sourceCode, visitor, shouldSkipChildren)\n }\n }\n}\n\nfunction isReferenceIdentifier(identifier: IdentifierNode, sourceCode: SourceCode): boolean {\n const parent = getParent(identifier, sourceCode)\n if (!parent) {\n return true\n }\n\n if (parent.type.startsWith('TS')) {\n return false\n }\n\n if (parent.type === 'Property' && parent.key === identifier) {\n return parent.computed || parent.shorthand\n }\n\n if (parent.type === 'MemberExpression' && parent.property === identifier) {\n return parent.computed\n }\n\n if (\n (parent.type === 'MethodDefinition' || parent.type === 'PropertyDefinition')\n && parent.key === identifier\n && !parent.computed\n ) {\n return false\n }\n\n if (\n parent.type === 'ImportSpecifier'\n || parent.type === 'ImportDefaultSpecifier'\n || parent.type === 'ImportNamespaceSpecifier'\n ) {\n return false\n }\n\n if (parent.type === 'ExportSpecifier' && parent.exported === identifier) {\n return false\n }\n\n if (parent.type === 'LabeledStatement' && parent.label === identifier) {\n return false\n }\n\n return true\n}\n\nfunction findVariable(node: ScopeNode, name: string, sourceCode: SourceCode): Scope.Variable | null {\n let scope: Scope.Scope | null = sourceCode.getScope(node)\n\n while (scope) {\n const variable = scope.set.get(name)\n if (variable) {\n return variable\n }\n\n scope = scope.upper\n }\n\n return null\n}\n\nfunction isSelfReference(identifier: IdentifierNode, variable: Scope.Variable, sourceCode: SourceCode): boolean {\n if (variable.references.some(reference => reference.identifier === identifier)) {\n return true\n }\n\n let scope: Scope.Scope | null = sourceCode.getScope(identifier)\n\n while (scope) {\n const reference = scope.references.find(candidate => candidate.identifier === identifier)\n if (reference) {\n return reference.resolved === variable\n }\n\n scope = scope.upper\n }\n\n scope = sourceCode.getScope(identifier)\n\n while (scope) {\n const candidate = scope.set.get(identifier.name)\n if (candidate) {\n return candidate === variable\n }\n\n scope = scope.upper\n }\n\n for (const ancestor of sourceCode.getAncestors(identifier).toReversed()) {\n if (!isAssignmentPattern(ancestor)) {\n continue\n }\n\n if (\n isIdentifier(ancestor.left)\n && ancestor.left.name === variable.name\n && variable.defs.some(definition => definition.name === ancestor.left)\n ) {\n return true\n }\n }\n\n return false\n}\n\nfunction isUnresolvedSelfReference(identifier: IdentifierNode, name: string, sourceCode: SourceCode): boolean {\n if (identifier.name !== name) {\n return false\n }\n\n return findVariable(identifier, name, sourceCode) === null\n}\n\nfunction reportSelfReferences(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: ScopeNode,\n variable: Scope.Variable\n): void {\n traverseNodes(node, sourceCode, child => {\n if (!isIdentifier(child)) {\n return\n }\n\n if (!isReferenceIdentifier(child, sourceCode)) {\n return\n }\n\n if (isSelfReference(child, variable, sourceCode)) {\n context.report({\n node: child,\n messageId: 'selfRef',\n data: { name: variable.name }\n })\n }\n }, isFunctionLike)\n}\n\nfunction reportSelfReferencesByName(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: ScopeNode,\n name: string\n): void {\n traverseNodes(node, sourceCode, child => {\n if (!isIdentifier(child)) {\n return\n }\n\n if (!isReferenceIdentifier(child, sourceCode)) {\n return\n }\n\n if (isUnresolvedSelfReference(child, name, sourceCode)) {\n context.report({\n node: child,\n messageId: 'selfRef',\n data: { name }\n })\n }\n }, isFunctionLike)\n}\n\nfunction reportDefaultParameterSelfReferences(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: FunctionLikeNode\n): void {\n for (const param of node.params) {\n if (!isAssignmentPattern(param) || !isIdentifier(param.left)) {\n continue\n }\n\n const variable = findVariable(param.left, param.left.name, sourceCode)\n if (!variable) {\n continue\n }\n\n reportSelfReferences(context, sourceCode, param.right, variable)\n }\n}\n\nexport const noSelfAssign: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow self-references inside variable initializers and parameter default values'\n },\n schema: [],\n messages: {\n selfRef: 'Variable {{name}} is referenced within its own initializer.'\n }\n },\n\n create(context) {\n const sourceCode = context.sourceCode\n\n return {\n VariableDeclarator(node) {\n if (!node.init || !isIdentifier(node.id)) {\n return\n }\n\n const variable = findVariable(node, node.id.name, sourceCode)\n if (!variable) {\n return\n }\n\n reportSelfReferences(context, sourceCode, node.init, variable)\n },\n\n FunctionDeclaration(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n FunctionExpression(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n ArrowFunctionExpression(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n PropertyDefinition(node) {\n if (!node.value || !isIdentifier(node.key)) {\n return\n }\n\n reportSelfReferencesByName(context, sourceCode, node.value, node.key.name)\n }\n }\n }\n}\n","import { noSelfAssign } from './no-self-assign'\n\n\nexport const commentLabsJs = {\n meta: {\n name: 'comment-labs-js',\n version: '1.0.0'\n },\n rules: {\n 'no-self-assign': noSelfAssign\n }\n}\n","import type { OxlintConfig } from 'oxlint'\nimport { categories } from './categories'\nimport { baseRules } from './base-rules'\nimport { plugins } from './plugins'\nimport { globals } from './globals'\nimport { jsPlugins } from './js-plugins'\nimport { playwrightOverrides } from './overrides/playwright'\nimport { reactOverrides } from './overrides/react'\nimport { reactNativeOverrides } from './overrides/react-native'\n\n\nexport const config: OxlintConfig = {\n options: {\n reportUnusedDisableDirectives: 'warn',\n typeAware: true,\n typeCheck: true\n },\n plugins,\n jsPlugins,\n rules: baseRules,\n globals,\n categories,\n settings: {\n vitest: {\n typecheck: true\n }\n },\n overrides: [\n playwrightOverrides,\n reactOverrides,\n reactNativeOverrides\n ],\n ignorePatterns: [ 'coverage/**', 'public/**', '.expo/**', '.output/**', '**/dist/**', '**/*wasm-bindgen/**' ]\n}\n\nexport { commentLabsJs as default } from './plugin'\n"],"mappings":";;;;;;AAGA,MAAa,aAA6B;CACxC,aAAa;CACb,SAAS;CACT,UAAU;CACV,MAAM;CACN,aAAa;CACb,OAAO;CACP,YAAY;CACb;;;ACRD,MAAa,YAA0B;CACrC,cAAc;CACd,wBAAwB;CACxB,0BAA0B;CAC1B,mCAAmC;CACnC,+BAA+B;CAC/B,cAAc,CAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;CACpC,gBAAgB;CAChB,gBAAgB;CAChB,iCAAiC;CACjC,kCAAkC;CAClC,cAAc;CACd,iBAAiB;CACjB,aAAa;CACb,qBAAqB;CACrB,oBAAoB;CACpB,aAAa,CAAE,QAAQ,EAAG;CAC1B,aAAa,CACX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CACF;CACD,sCAAsC;EACpC;EACA;EACA;GACE,kBAAkB;GAClB,mBAAmB;GACpB;EACF;CACD,6BAA6B,CAC3B,QACA,YACD;CACD,8BAA8B;CAC9B,8BAA8B,CAC5B,QACA,SACD;CACD,4BAA4B,CAC1B,QACA,OACD;CACD,6BAA6B,CAC3B,QACA,QACD;CACD,8BAA8B,CAC5B,QACA;EACE,SAAS;EACT,UAAU;EACX,CACF;CACD,4BAA4B,CAC1B,QACA,OACD;CACD,6BAA6B,CAC3B,QACA,WACD;CACD,yBAAyB,CACvB,QACA,SACD;CACD,+CAA+C,CAC7C,QACA,aACD;CACD,uCAAuC,CACrC,QACA,sBACD;CACD,uBAAuB;EACrB;EACA;EACA,EACE,cAAc,GACf;EACF;CACD,4BAA4B,CAC1B,QACA;EACE,cAAc;EACd,eAAe;EACf,QAAQ;EACT,CACF;CACD,gCAAgC,CAC9B,QACA;EACE,SAAS;EACT,UAAU;EACX,CACF;CACD,gCAAgC,CAC9B,SACA,OACD;CACD,4CAA4C;EAC1C;EACA;EACA,EACE,yBAAyB,MAC1B;EACF;CACD,wBAAwB,CACtB,QACA;EACE,QAAQ;EACR,YAAY;EACZ,wBAAwB;EACxB,iBAAiB;EACjB,0BAA0B;EAC1B,0BAA0B;EAC1B,cAAc;EACf,CACF;CACD,wCAAwC;CACxC,2BAA2B;CAC3B,mCAAmC;CACnC,gCAAgC,CAC9B,QACA,YACD;CACD,8BAA8B;CAC9B,oCAAoC;CACpC,mCAAmC,CACjC,QAAQ,EACN,UAAU;EACR;GAAE;GAAK;GAAK;GAAK;GAAK;GAAM;GAAM;GAAO;EACzC;GAAE;GAAM;GAAM;GAAO;GAAO;GAAK;GAAM;GAAK;GAAM;EAClD,CAAE,MAAM,KAAM;EACd,CAAE,MAAM,aAAc;EACvB,EACF,CACF;CACD,yCAAyC;CACzC,gCAAgC;CAChC,wCAAwC,CACtC,QACA;EACE,OAAO;EACP,UAAU;EACX,CACF;CACD,wBAAwB;CACxB,mCAAmC;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SAAS;;;AAIpE,MAAa,eAAgC;CAC3C,MAAM;EACJ,MAAM;EACN,MAAM,EACJ,aAAa,sFACd;EACD,QAAQ,EAAE;EACV,UAAU,EACR,SAAS,+DACV;EACF;CAED,OAAO,SAAS;EACd,MAAM,aAAa,QAAQ;AAE3B,SAAO;GACL,mBAAmB,MAAM;AACvB,QAAI,CAAC,KAAK,QAAQ,CAAC,aAAa,KAAK,GAAG,CACtC;IAGF,MAAM,WAAW,aAAa,MAAM,KAAK,GAAG,MAAM,WAAW;AAC7D,QAAI,CAAC,SACH;AAGF,yBAAqB,SAAS,YAAY,KAAK,MAAM,SAAS;;GAGhE,oBAAoB,MAAM;AACxB,yCAAqC,SAAS,YAAY,KAAK;;GAGjE,mBAAmB,MAAM;AACvB,yCAAqC,SAAS,YAAY,KAAK;;GAGjE,wBAAwB,MAAM;AAC5B,yCAAqC,SAAS,YAAY,KAAK;;GAGjE,mBAAmB,MAAM;AACvB,QAAI,CAAC,KAAK,SAAS,CAAC,aAAa,KAAK,IAAI,CACxC;AAGF,+BAA2B,SAAS,YAAY,KAAK,OAAO,KAAK,IAAI,KAAK;;GAE7E;;CAEJ;;;AC9TD,MAAa,gBAAgB;CAC3B,MAAM;EACJ,MAAM;EACN,SAAS;EACV;CACD,OAAO,EACL,kBAAkB,cACnB;CACF;;;ACAD,MAAa,SAAuB;CAClC,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;EACZ;CACD;CACA;CACA,OAAO;CACP;CACA;CACA,UAAU,EACR,QAAQ,EACN,WAAW,MACZ,EACF;CACD,WAAW;EACT;EACA;EACA;EACD;CACD,gBAAgB;EAAE;EAAe;EAAa;EAAY;EAAc;EAAc;EAAuB;CAC9G"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
+
"name": "@comment-labs/oxlint-config",
|
|
4
|
+
"version": "1.0.0-beta.0",
|
|
5
|
+
"description": "Oxlint configuration for comment-labs projects",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.mjs",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@e18e/eslint-plugin": "^0.3.0",
|
|
15
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
16
|
+
"empathic": "^2.0.0",
|
|
17
|
+
"eslint-plugin-jsdoc": "^62.9.0",
|
|
18
|
+
"eslint-plugin-regexp": "^3.1.0",
|
|
19
|
+
"globals": "^17.4.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "25.5.0",
|
|
23
|
+
"bundled-eslint-config": "0.8.1",
|
|
24
|
+
"eslint": "^10.1.0",
|
|
25
|
+
"eslint-plugin-oxlint": "1.57.0",
|
|
26
|
+
"oxlint": "1.57.0",
|
|
27
|
+
"oxlint-tsgolint": "0.18.1",
|
|
28
|
+
"tsdown": "0.21.7",
|
|
29
|
+
"typescript": "6.0.2",
|
|
30
|
+
"vitest": "4.0.2",
|
|
31
|
+
"@comment-labs/tsconfig": "1.0.0-beta.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"oxlint": "^1.57.0",
|
|
35
|
+
"oxlint-tsgolint": "^0.17.3"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsdown",
|
|
42
|
+
"prelint": "pnpm build",
|
|
43
|
+
"lint": "oxlint && eslint --cache .",
|
|
44
|
+
"test": "vitest",
|
|
45
|
+
"typecheck": "tsc"
|
|
46
|
+
}
|
|
47
|
+
}
|