@nekoyasuii/config 0.1.3 → 0.1.5
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/dist/chunk-97s6xvc6.js +32 -0
- package/dist/{chunk-1chg07xf.js → chunk-fqcw0kzp.js} +17 -1
- package/dist/tools/oxlint/config/anti-slop/index.d.ts +15 -0
- package/dist/tools/oxlint/config/core/index.d.ts +19 -0
- package/dist/tools/oxlint/config/index.d.ts +37 -3
- package/dist/tools/oxlint/config/index.js +11 -2
- package/dist/tools/oxlint/config/js-plugins/index.d.ts +180 -5
- package/dist/tools/oxlint/config/js-plugins/index.js +1 -1
- package/dist/tools/oxlint/config/no-comment-slop/index.d.ts +19 -0
- package/dist/tools/oxlint/config/no-comment-slop/index.js +7 -0
- package/dist/tools/oxlint/config/no-comment-slop/plugin.d.ts +658 -0
- package/dist/tools/oxlint/config/no-comment-slop/plugin.js +918 -0
- package/dist/tools/oxlint/config/react/index.d.ts +47 -0
- package/dist/tools/oxlint/config/tanstack/index.d.ts +10 -0
- package/dist/tools/oxlint/config/tanstack/js-plugins/index.d.ts +18 -0
- package/dist/tools/oxlint/rules/index.js +261 -1
- package/dist/tools/shared/tsconfig-aliases.d.ts +3 -2
- package/package.json +6 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every non-nursery react, react-perf, and jsx-a11y rule oxlint implements
|
|
3
|
+
* is listed explicitly (mirroring the core config's philosophy), with
|
|
4
|
+
* decisions matching the ESLint react preset
|
|
5
|
+
*/
|
|
1
6
|
export declare const reactConfig: {
|
|
2
7
|
plugins: ("jsx-a11y" | "react" | "react-perf")[];
|
|
3
8
|
rules: {
|
|
@@ -37,14 +42,31 @@ export declare const reactConfig: {
|
|
|
37
42
|
"jsx-a11y/role-supports-aria-props": "error";
|
|
38
43
|
"jsx-a11y/scope": "error";
|
|
39
44
|
"jsx-a11y/tabindex-no-positive": "error";
|
|
45
|
+
/**
|
|
46
|
+
* Inline JSX/object/array/function props are idiomatic modern React;
|
|
47
|
+
* the react-doctor rules (opt-in js-plugins preset) cover the cases that
|
|
48
|
+
* actually hurt
|
|
49
|
+
*/
|
|
40
50
|
"react-perf/jsx-no-jsx-as-prop": "off";
|
|
41
51
|
"react-perf/jsx-no-new-array-as-prop": "off";
|
|
42
52
|
"react-perf/jsx-no-new-function-as-prop": "off";
|
|
43
53
|
"react-perf/jsx-no-new-object-as-prop": "off";
|
|
54
|
+
/** "react/button-has-type": "error", */
|
|
44
55
|
"react/capitalized-calls": "error";
|
|
56
|
+
/**
|
|
57
|
+
* "react/checked-requires-onchange-or-readonly": "error",
|
|
58
|
+
* "react/display-name": "error",
|
|
59
|
+
*/
|
|
45
60
|
"react/error-boundaries": "error";
|
|
46
61
|
"react/exhaustive-deps": "error";
|
|
47
62
|
"react/exhaustive-effect-dependencies": "error";
|
|
63
|
+
/**
|
|
64
|
+
* "react/forbid-component-props": "off",
|
|
65
|
+
* "react/forbid-dom-props": "error",
|
|
66
|
+
* "react/forbid-elements": "error",
|
|
67
|
+
* forwardRef is deprecated in React 19; react-doctor/no-react19-deprecated-apis
|
|
68
|
+
* (opt-in js-plugins preset) covers it
|
|
69
|
+
*/
|
|
48
70
|
"react/forward-ref-uses-ref": "off";
|
|
49
71
|
"react/function-component-definition": ["error", {
|
|
50
72
|
namedComponents: "arrow-function";
|
|
@@ -57,33 +79,53 @@ export declare const reactConfig: {
|
|
|
57
79
|
"react/immutability": "error";
|
|
58
80
|
"react/incompatible-library": "error";
|
|
59
81
|
"react/invariant": "error";
|
|
82
|
+
/** "react/jsx-boolean-value": "off", */
|
|
60
83
|
"react/jsx-curly-brace-presence": "error";
|
|
84
|
+
/** "react/jsx-filename-extension": "off", */
|
|
61
85
|
"react/jsx-fragments": "error";
|
|
62
86
|
"react/jsx-key": "error";
|
|
87
|
+
/** "react/jsx-max-depth": "off", */
|
|
63
88
|
"react/jsx-no-comment-textnodes": "error";
|
|
64
89
|
"react/jsx-no-constructed-context-values": "error";
|
|
65
90
|
"react/jsx-no-duplicate-props": "error";
|
|
91
|
+
/**
|
|
92
|
+
* "react/jsx-no-literals": "off",
|
|
93
|
+
* "react/jsx-no-script-url": "error",
|
|
94
|
+
*/
|
|
66
95
|
"react/jsx-no-target-blank": "error";
|
|
67
96
|
"react/jsx-no-undef": "error";
|
|
68
97
|
"react/jsx-no-useless-fragment": "error";
|
|
98
|
+
/** "react/jsx-pascal-case": "error", */
|
|
69
99
|
"react/jsx-props-no-spread-multi": "error";
|
|
100
|
+
/** "react/jsx-props-no-spreading": "off", */
|
|
70
101
|
"react/memo-dependencies": "error";
|
|
102
|
+
/**
|
|
103
|
+
* Off in the ESLint preset; react-doctor/no-random-key (opt-in js-plugins
|
|
104
|
+
* preset) covers the dangerous cases.
|
|
105
|
+
* "react/no-array-index-key": "off",
|
|
106
|
+
*/
|
|
71
107
|
"react/no-children-prop": "error";
|
|
72
108
|
"react/no-clone-element": "error";
|
|
109
|
+
/** "react/no-danger": "error", */
|
|
73
110
|
"react/no-danger-with-children": "error";
|
|
74
111
|
"react/no-deriving-state-in-effects": "error";
|
|
112
|
+
/** "react/no-did-mount-set-state": "error", */
|
|
75
113
|
"react/no-did-update-set-state": "error";
|
|
76
114
|
"react/no-direct-mutation-state": "error";
|
|
77
115
|
"react/no-find-dom-node": "error";
|
|
78
116
|
"react/no-is-mounted": "error";
|
|
117
|
+
/** "react/no-multi-comp": "off", */
|
|
79
118
|
"react/no-namespace": "error";
|
|
119
|
+
/** "react/no-object-type-as-default-prop": "error", */
|
|
80
120
|
"react/no-react-children": "error";
|
|
121
|
+
/** "react/no-redundant-should-component-update": "error", */
|
|
81
122
|
"react/no-render-return-value": "error";
|
|
82
123
|
"react/no-set-state": "error";
|
|
83
124
|
"react/no-string-refs": "error";
|
|
84
125
|
"react/no-this-in-sfc": "error";
|
|
85
126
|
"react/no-unescaped-entities": "error";
|
|
86
127
|
"react/no-unknown-property": "off";
|
|
128
|
+
/** "react/no-unsafe": "error", */
|
|
87
129
|
"react/no-unstable-nested-components": "error";
|
|
88
130
|
"react/no-will-update-set-state": "error";
|
|
89
131
|
"react/prefer-es6-class": "error";
|
|
@@ -106,10 +148,15 @@ export declare const reactConfig: {
|
|
|
106
148
|
"react/use-memo": "error";
|
|
107
149
|
"react/void-dom-elements-no-children": "error";
|
|
108
150
|
"react/void-use-memo": "error";
|
|
151
|
+
/**
|
|
152
|
+
* Prop forwarding (`onClick={action.onClick}`) is not a handler-naming
|
|
153
|
+
* problem, and react-doctor's own rules cover the cases that hurt
|
|
154
|
+
*/
|
|
109
155
|
"react/jsx-handler-names": "off";
|
|
110
156
|
"react/only-export-components": ["warn", {
|
|
111
157
|
allowConstantExport: true;
|
|
112
158
|
}];
|
|
159
|
+
/** overrides */
|
|
113
160
|
"react/button-has-type": ["off"];
|
|
114
161
|
"react/checked-requires-onchange-or-readonly": ["off"];
|
|
115
162
|
"react/display-name": ["off"];
|
|
@@ -2,6 +2,11 @@ export declare const tanstackConfig: {
|
|
|
2
2
|
overrides: ({
|
|
3
3
|
files: string[];
|
|
4
4
|
rules: {
|
|
5
|
+
/**
|
|
6
|
+
* Route option types are order-sensitive (`head`/`component` infer
|
|
7
|
+
* `loaderData` from properties declared before them), so alphabetical
|
|
8
|
+
* ordering conflicts with tanstack-start-route-property-order
|
|
9
|
+
*/
|
|
5
10
|
"sort-keys": "off";
|
|
6
11
|
"unicorn/filename-case": "off";
|
|
7
12
|
"unicorn/no-abusive-eslint-disable"?: undefined;
|
|
@@ -9,6 +14,11 @@ export declare const tanstackConfig: {
|
|
|
9
14
|
} | {
|
|
10
15
|
files: string[];
|
|
11
16
|
rules: {
|
|
17
|
+
/**
|
|
18
|
+
* Route option types are order-sensitive (`head`/`component` infer
|
|
19
|
+
* `loaderData` from properties declared before them), so alphabetical
|
|
20
|
+
* ordering conflicts with tanstack-start-route-property-order
|
|
21
|
+
*/
|
|
12
22
|
"sort-keys"?: undefined;
|
|
13
23
|
"unicorn/filename-case": "off";
|
|
14
24
|
"unicorn/no-abusive-eslint-disable": "off";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Doctor's TanStack Query/Router/Start rules. These live outside the
|
|
3
|
+
* base js-plugins preset because some of them fire on generic JSX (e.g. plain
|
|
4
|
+
* <a> elements) and recommend TanStack replacements, which is pure noise in
|
|
5
|
+
* non-TanStack projects. Extend this alongside js-plugins in TanStack apps:
|
|
6
|
+
*
|
|
7
|
+
* import { defineConfig } from "oxlint";
|
|
8
|
+
* import core from "ultracite/oxlint/core";
|
|
9
|
+
* import tanstack from "ultracite/oxlint/tanstack";
|
|
10
|
+
* import jsPlugins from "ultracite/oxlint/js-plugins";
|
|
11
|
+
* import tanstackJsPlugins from "ultracite/oxlint/tanstack/js-plugins";
|
|
12
|
+
*
|
|
13
|
+
* export default defineConfig({
|
|
14
|
+
* extends: [core, tanstack, jsPlugins, tanstackJsPlugins],
|
|
15
|
+
* ignorePatterns: core.ignorePatterns,
|
|
16
|
+
* jsPlugins: jsPlugins.jsPlugins,
|
|
17
|
+
* });
|
|
18
|
+
*/
|
|
1
19
|
declare const _default: {
|
|
2
20
|
jsPlugins: {
|
|
3
21
|
name: string;
|
|
@@ -49,6 +49,261 @@ var FILE_CONTEXT = Object.freeze({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
+
// tools/oxlint/rules/canonical-header-names/index.ts
|
|
53
|
+
var HeaderWordCasingExceptions = {
|
|
54
|
+
ct: "CT",
|
|
55
|
+
dpop: "DPoP",
|
|
56
|
+
etag: "ETag",
|
|
57
|
+
te: "TE",
|
|
58
|
+
www: "WWW",
|
|
59
|
+
x: "X",
|
|
60
|
+
xss: "XSS"
|
|
61
|
+
};
|
|
62
|
+
var headerNamePattern = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u;
|
|
63
|
+
var headerMethods = new Set(["append", "delete", "get", "has", "set"]);
|
|
64
|
+
function canonicalHeaderName(name) {
|
|
65
|
+
return name.toLowerCase().split("-").map((word) => HeaderWordCasingExceptions[word] || word.charAt(0).toUpperCase() + word.slice(1)).join("-");
|
|
66
|
+
}
|
|
67
|
+
function isStringLiteral(node) {
|
|
68
|
+
return node.type === "Literal" && typeof node.value === "string";
|
|
69
|
+
}
|
|
70
|
+
function isStaticMemberExpression(node) {
|
|
71
|
+
return node.type === "MemberExpression" && !node.computed && node.property.type === "Identifier";
|
|
72
|
+
}
|
|
73
|
+
function isIdentifierReference(node) {
|
|
74
|
+
return node.type === "Identifier";
|
|
75
|
+
}
|
|
76
|
+
function isHeadersIdentifierName(name) {
|
|
77
|
+
return name === "headers" || name.endsWith("Headers");
|
|
78
|
+
}
|
|
79
|
+
function isNewHeadersExpression(node) {
|
|
80
|
+
return node.type === "NewExpression" && isIdentifierReference(node.callee) && node.callee.name === "Headers";
|
|
81
|
+
}
|
|
82
|
+
function isLikelyHeadersReceiver(node) {
|
|
83
|
+
if (isIdentifierReference(node)) {
|
|
84
|
+
return isHeadersIdentifierName(node.name);
|
|
85
|
+
}
|
|
86
|
+
if (isStaticMemberExpression(node)) {
|
|
87
|
+
return node.property.name === "headers";
|
|
88
|
+
}
|
|
89
|
+
return isNewHeadersExpression(node);
|
|
90
|
+
}
|
|
91
|
+
function quoteLike(raw, value) {
|
|
92
|
+
const quote = raw?.startsWith('"') ? '"' : "'";
|
|
93
|
+
const escaped = value.replaceAll("\\", "\\\\").replaceAll(quote, `\\${quote}`);
|
|
94
|
+
return `${quote}${escaped}${quote}`;
|
|
95
|
+
}
|
|
96
|
+
function getStaticPropertyName(node) {
|
|
97
|
+
if (node.computed) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
if (node.key.type === "Identifier") {
|
|
101
|
+
return node.key.name;
|
|
102
|
+
}
|
|
103
|
+
if (node.key.type === "Literal" && typeof node.key.value === "string") {
|
|
104
|
+
return node.key.value;
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
function getHeaderPropertyKeyFixText(node, canonicalName) {
|
|
109
|
+
if (node.type === "Literal") {
|
|
110
|
+
return quoteLike(node.raw, canonicalName);
|
|
111
|
+
}
|
|
112
|
+
return canonicalName;
|
|
113
|
+
}
|
|
114
|
+
function isHeaderPropertyKey(node) {
|
|
115
|
+
return node.type === "Identifier" || node.type === "Literal" && typeof node.value === "string";
|
|
116
|
+
}
|
|
117
|
+
function reportHeaderName(context, node, name) {
|
|
118
|
+
if (!headerNamePattern.test(name)) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const canonicalName = canonicalHeaderName(name);
|
|
122
|
+
if (name === canonicalName) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
context.report({
|
|
126
|
+
node,
|
|
127
|
+
message: `Use canonical HTTP header name '${canonicalName}'.`,
|
|
128
|
+
fix(fixer) {
|
|
129
|
+
return fixer.replaceText(node, getHeaderPropertyKeyFixText(node, canonicalName));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function checkHeadersInitObject(context, node) {
|
|
134
|
+
for (const property of node.properties) {
|
|
135
|
+
if (property.type !== "Property") {
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
const headerName = getStaticPropertyName(property);
|
|
139
|
+
if (headerName === null) {
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (!isHeaderPropertyKey(property.key)) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
reportHeaderName(context, property.key, headerName);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function isHeadersInitPropertyValue(node) {
|
|
149
|
+
const { parent } = node;
|
|
150
|
+
if (parent.type !== "Property" || parent.value !== node) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
return getStaticPropertyName(parent) === "headers";
|
|
154
|
+
}
|
|
155
|
+
var canonicalHeaderNames = defineRule({
|
|
156
|
+
meta: {
|
|
157
|
+
type: "suggestion",
|
|
158
|
+
fixable: "code"
|
|
159
|
+
},
|
|
160
|
+
create(context) {
|
|
161
|
+
return {
|
|
162
|
+
CallExpression(node) {
|
|
163
|
+
if (!isStaticMemberExpression(node.callee)) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const methodName = node.callee.property.name;
|
|
167
|
+
if (!headerMethods.has(methodName)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (!isLikelyHeadersReceiver(node.callee.object)) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const [headerName] = node.arguments;
|
|
174
|
+
if (!headerName || !isStringLiteral(headerName)) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
reportHeaderName(context, headerName, headerName.value);
|
|
178
|
+
},
|
|
179
|
+
NewExpression(node) {
|
|
180
|
+
if (!isNewHeadersExpression(node)) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const [headersInit] = node.arguments;
|
|
184
|
+
if (headersInit?.type !== "ObjectExpression") {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
checkHeadersInitObject(context, headersInit);
|
|
188
|
+
},
|
|
189
|
+
ObjectExpression(node) {
|
|
190
|
+
if (!isHeadersInitPropertyValue(node)) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
checkHeadersInitObject(context, node);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// tools/oxlint/rules/interface-pascal-case/index.ts
|
|
200
|
+
var pascalCasePattern = /^[A-Z][A-Za-z0-9]*$/u;
|
|
201
|
+
function toPascalCase(name) {
|
|
202
|
+
return name.replaceAll(/(?<lower>[a-z0-9])(?<upper>[A-Z])/gu, "$<lower> $<upper>").split(/[\s_-]+/u).filter((word) => word.length > 0).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
203
|
+
}
|
|
204
|
+
function isExported(node) {
|
|
205
|
+
return node.parent?.type === "ExportNamedDeclaration";
|
|
206
|
+
}
|
|
207
|
+
function renameFix(context, node, newName) {
|
|
208
|
+
if (isExported(node))
|
|
209
|
+
return;
|
|
210
|
+
try {
|
|
211
|
+
const [variable] = context.sourceCode.getDeclaredVariables(node);
|
|
212
|
+
if (!variable)
|
|
213
|
+
return;
|
|
214
|
+
return (fixer) => [
|
|
215
|
+
...variable.defs.map((definition) => fixer.replaceText(definition.name, newName)),
|
|
216
|
+
...variable.references.map((reference) => fixer.replaceText(reference.identifier, newName))
|
|
217
|
+
];
|
|
218
|
+
} catch {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
var interfacePascalCase = defineRule({
|
|
223
|
+
meta: {
|
|
224
|
+
fixable: "code",
|
|
225
|
+
messages: {
|
|
226
|
+
interface: "Unexpected interface name {{name}}. Use {{newName}} instead",
|
|
227
|
+
exported: "Unexpected interface name {{name}}. Use {{newName}} instead. It is exported, so rename its usages in every file manually; no autofix is available",
|
|
228
|
+
pascalCase: "Interface name {{name}} must use PascalCase"
|
|
229
|
+
},
|
|
230
|
+
type: "suggestion"
|
|
231
|
+
},
|
|
232
|
+
create(context) {
|
|
233
|
+
return {
|
|
234
|
+
TSInterfaceDeclaration(node) {
|
|
235
|
+
const { name } = node.id;
|
|
236
|
+
if (pascalCasePattern.test(name)) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const newName = toPascalCase(name);
|
|
240
|
+
const renameable = newName !== name && pascalCasePattern.test(newName);
|
|
241
|
+
const exported = renameable && isExported(node);
|
|
242
|
+
const fixable = renameable && !exported;
|
|
243
|
+
let messageId = "pascalCase";
|
|
244
|
+
if (fixable) {
|
|
245
|
+
messageId = "interface";
|
|
246
|
+
} else if (exported) {
|
|
247
|
+
messageId = "exported";
|
|
248
|
+
}
|
|
249
|
+
context.report({
|
|
250
|
+
data: { name, newName },
|
|
251
|
+
fix: fixable ? renameFix(context, node, newName) : undefined,
|
|
252
|
+
messageId,
|
|
253
|
+
node: node.id
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// tools/oxlint/rules/no-ts-accessibility/index.ts
|
|
261
|
+
var noTypescriptAccessibility = defineRule({
|
|
262
|
+
meta: {
|
|
263
|
+
type: "problem"
|
|
264
|
+
},
|
|
265
|
+
create(context) {
|
|
266
|
+
return {
|
|
267
|
+
PropertyDefinition(node) {
|
|
268
|
+
if (node.accessibility == null) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
context.report({
|
|
272
|
+
node,
|
|
273
|
+
message: "Use native class fields: omit 'public' and use '#private' for private state."
|
|
274
|
+
});
|
|
275
|
+
},
|
|
276
|
+
MethodDefinition(node) {
|
|
277
|
+
if (node.accessibility == null) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (node.kind !== "constructor") {
|
|
281
|
+
context.report({
|
|
282
|
+
node,
|
|
283
|
+
message: "Use native methods: omit 'public'; for private behavior use '#private' fields/methods."
|
|
284
|
+
});
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (node.accessibility === "public") {
|
|
288
|
+
context.report({
|
|
289
|
+
node,
|
|
290
|
+
message: "Omit 'public' on constructors; it's the default."
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
TSParameterProperty(node) {
|
|
295
|
+
if (node.accessibility == null) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
context.report({
|
|
299
|
+
node,
|
|
300
|
+
message: "Avoid TS parameter properties; declare fields explicitly and use '#private' when needed."
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
|
|
52
307
|
// tools/oxlint/rules/prefer-alias/rule.ts
|
|
53
308
|
import fs2 from "node:fs";
|
|
54
309
|
import path2 from "node:path";
|
|
@@ -474,7 +729,12 @@ var preferAlias = defineRule({
|
|
|
474
729
|
// tools/oxlint/rules/index.ts
|
|
475
730
|
var plugin = definePlugin({
|
|
476
731
|
meta: { name: "lazuee" },
|
|
477
|
-
rules: {
|
|
732
|
+
rules: {
|
|
733
|
+
"prefer-alias": preferAlias,
|
|
734
|
+
"no-ts-accessibility": noTypescriptAccessibility,
|
|
735
|
+
"interface-pascal-case": interfacePascalCase,
|
|
736
|
+
"canonical-header-names": canonicalHeaderNames
|
|
737
|
+
}
|
|
478
738
|
});
|
|
479
739
|
var rules_default = plugin;
|
|
480
740
|
export {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export interface AliasConfig {
|
|
2
|
+
/** Glob patterns for path aliases, mapped to their replacement targets */
|
|
2
3
|
aliasPatterns: Record<string, string[]>;
|
|
3
|
-
/** Directory that `paths` entries are resolved against
|
|
4
|
+
/** Directory that `paths` entries are resolved against */
|
|
4
5
|
basePath: string;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Removes `//` and block comments plus trailing commas, skipping the contents
|
|
8
|
-
* of string literals so values like "http://localhost" survive
|
|
9
|
+
* of string literals so values like "http://localhost" survive
|
|
9
10
|
*/
|
|
10
11
|
export declare function stripJsonComments(source: string): string;
|
|
11
12
|
export declare function loadTsConfigAliases(cwd: string): AliasConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nekoyasuii/config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Shared TypeScript, Oxlint, and Oxfmt configs for my projects.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"import": "./dist/tools/oxlint/config/anti-slop/index.js",
|
|
24
24
|
"default": "./dist/tools/oxlint/config/anti-slop/index.js"
|
|
25
25
|
},
|
|
26
|
+
"./oxlint/no-comment-slop": {
|
|
27
|
+
"types": "./dist/tools/oxlint/config/no-comment-slop/index.d.ts",
|
|
28
|
+
"import": "./dist/tools/oxlint/config/no-comment-slop/index.js",
|
|
29
|
+
"default": "./dist/tools/oxlint/config/no-comment-slop/index.js"
|
|
30
|
+
},
|
|
26
31
|
"./oxlint/rules": {
|
|
27
32
|
"types": "./dist/tools/oxlint/rules/index.d.ts",
|
|
28
33
|
"import": "./dist/tools/oxlint/rules/index.js",
|