@apst/oxlint 0.0.0-dev.20260324.019d1d21
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 +21 -0
- package/dist/@types/preset.d.ts +25 -0
- package/dist/constants/default.d.ts +8 -0
- package/dist/constants/default.js +10 -0
- package/dist/constants/default.js.map +1 -0
- package/dist/constants/default.mjs +9 -0
- package/dist/constants/default.mjs.map +1 -0
- package/dist/constants/ignore-patterns.d.ts +3 -0
- package/dist/constants/ignore-patterns.js +26 -0
- package/dist/constants/ignore-patterns.js.map +1 -0
- package/dist/constants/ignore-patterns.mjs +24 -0
- package/dist/constants/ignore-patterns.mjs.map +1 -0
- package/dist/functions/define.d.ts +46 -0
- package/dist/functions/define.js +19 -0
- package/dist/functions/define.js.map +1 -0
- package/dist/functions/define.mjs +19 -0
- package/dist/functions/define.mjs.map +1 -0
- package/dist/functions/merge.js +11 -0
- package/dist/functions/merge.js.map +1 -0
- package/dist/functions/merge.mjs +11 -0
- package/dist/functions/merge.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +3 -0
- package/dist/presets/common/index.d.ts +9 -0
- package/dist/presets/common/index.js +45 -0
- package/dist/presets/common/index.mjs +10 -0
- package/dist/presets/common/plugin/index.d.ts +3 -0
- package/dist/presets/common/plugin/index.js +12 -0
- package/dist/presets/common/plugin/index.js.map +1 -0
- package/dist/presets/common/plugin/index.mjs +11 -0
- package/dist/presets/common/plugin/index.mjs.map +1 -0
- package/dist/presets/common/preset/index.d.ts +4 -0
- package/dist/presets/common/preset/index.js +27 -0
- package/dist/presets/common/preset/index.js.map +1 -0
- package/dist/presets/common/preset/index.mjs +27 -0
- package/dist/presets/common/preset/index.mjs.map +1 -0
- package/dist/presets/common/rules/eslint.d.ts +174 -0
- package/dist/presets/common/rules/eslint.js +93 -0
- package/dist/presets/common/rules/eslint.js.map +1 -0
- package/dist/presets/common/rules/eslint.mjs +86 -0
- package/dist/presets/common/rules/eslint.mjs.map +1 -0
- package/dist/presets/common/rules/import.d.ts +64 -0
- package/dist/presets/common/rules/import.js +55 -0
- package/dist/presets/common/rules/import.js.map +1 -0
- package/dist/presets/common/rules/import.mjs +49 -0
- package/dist/presets/common/rules/import.mjs.map +1 -0
- package/dist/presets/common/rules/oxc.d.ts +15 -0
- package/dist/presets/common/rules/oxc.js +18 -0
- package/dist/presets/common/rules/oxc.js.map +1 -0
- package/dist/presets/common/rules/oxc.mjs +15 -0
- package/dist/presets/common/rules/oxc.mjs.map +1 -0
- package/dist/presets/common/rules/promise.d.ts +34 -0
- package/dist/presets/common/rules/promise.js +30 -0
- package/dist/presets/common/rules/promise.js.map +1 -0
- package/dist/presets/common/rules/promise.mjs +24 -0
- package/dist/presets/common/rules/promise.mjs.map +1 -0
- package/dist/presets/common/rules/typescript.d.ts +288 -0
- package/dist/presets/common/rules/typescript.js +149 -0
- package/dist/presets/common/rules/typescript.js.map +1 -0
- package/dist/presets/common/rules/typescript.mjs +143 -0
- package/dist/presets/common/rules/typescript.mjs.map +1 -0
- package/dist/presets/common/rules/unicorn.d.ts +168 -0
- package/dist/presets/common/rules/unicorn.js +90 -0
- package/dist/presets/common/rules/unicorn.js.map +1 -0
- package/dist/presets/common/rules/unicorn.mjs +85 -0
- package/dist/presets/common/rules/unicorn.mjs.map +1 -0
- package/dist/presets/jsx/index.d.ts +4 -0
- package/dist/presets/jsx/index.js +9 -0
- package/dist/presets/jsx/index.mjs +5 -0
- package/dist/presets/jsx/plugin/index.d.ts +3 -0
- package/dist/presets/jsx/plugin/index.js +5 -0
- package/dist/presets/jsx/plugin/index.js.map +1 -0
- package/dist/presets/jsx/plugin/index.mjs +4 -0
- package/dist/presets/jsx/plugin/index.mjs.map +1 -0
- package/dist/presets/jsx/preset/index.d.ts +4 -0
- package/dist/presets/jsx/preset/index.js +15 -0
- package/dist/presets/jsx/preset/index.js.map +1 -0
- package/dist/presets/jsx/preset/index.mjs +15 -0
- package/dist/presets/jsx/preset/index.mjs.map +1 -0
- package/dist/presets/jsx/rules/jsx-a11y.d.ts +36 -0
- package/dist/presets/jsx/rules/jsx-a11y.js +23 -0
- package/dist/presets/jsx/rules/jsx-a11y.js.map +1 -0
- package/dist/presets/jsx/rules/jsx-a11y.mjs +21 -0
- package/dist/presets/jsx/rules/jsx-a11y.mjs.map +1 -0
- package/dist/presets/next/index.d.ts +3 -0
- package/dist/presets/next/index.js +6 -0
- package/dist/presets/next/index.mjs +4 -0
- package/dist/presets/next/plugin/index.d.ts +3 -0
- package/dist/presets/next/plugin/index.js +5 -0
- package/dist/presets/next/plugin/index.js.map +1 -0
- package/dist/presets/next/plugin/index.mjs +4 -0
- package/dist/presets/next/plugin/index.mjs.map +1 -0
- package/dist/presets/next/preset/index.d.ts +4 -0
- package/dist/presets/next/preset/index.js +15 -0
- package/dist/presets/next/preset/index.js.map +1 -0
- package/dist/presets/next/preset/index.mjs +15 -0
- package/dist/presets/next/preset/index.mjs.map +1 -0
- package/dist/presets/next/rules/nextjs.js +26 -0
- package/dist/presets/next/rules/nextjs.js.map +1 -0
- package/dist/presets/next/rules/nextjs.mjs +25 -0
- package/dist/presets/next/rules/nextjs.mjs.map +1 -0
- package/dist/presets/node/index.d.ts +4 -0
- package/dist/presets/node/index.js +10 -0
- package/dist/presets/node/index.mjs +5 -0
- package/dist/presets/node/plugin/index.d.ts +3 -0
- package/dist/presets/node/plugin/index.js +5 -0
- package/dist/presets/node/plugin/index.js.map +1 -0
- package/dist/presets/node/plugin/index.mjs +4 -0
- package/dist/presets/node/plugin/index.mjs.map +1 -0
- package/dist/presets/node/preset/index.d.ts +4 -0
- package/dist/presets/node/preset/index.js +15 -0
- package/dist/presets/node/preset/index.js.map +1 -0
- package/dist/presets/node/preset/index.mjs +15 -0
- package/dist/presets/node/preset/index.mjs.map +1 -0
- package/dist/presets/node/rules/node.d.ts +16 -0
- package/dist/presets/node/rules/node.js +16 -0
- package/dist/presets/node/rules/node.js.map +1 -0
- package/dist/presets/node/rules/node.mjs +13 -0
- package/dist/presets/node/rules/node.mjs.map +1 -0
- package/dist/presets/react/index.d.ts +4 -0
- package/dist/presets/react/index.js +14 -0
- package/dist/presets/react/index.mjs +5 -0
- package/dist/presets/react/plugin/index.d.ts +3 -0
- package/dist/presets/react/plugin/index.js +5 -0
- package/dist/presets/react/plugin/index.js.map +1 -0
- package/dist/presets/react/plugin/index.mjs +4 -0
- package/dist/presets/react/plugin/index.mjs.map +1 -0
- package/dist/presets/react/preset/index.d.ts +4 -0
- package/dist/presets/react/preset/index.js +15 -0
- package/dist/presets/react/preset/index.js.map +1 -0
- package/dist/presets/react/preset/index.mjs +15 -0
- package/dist/presets/react/preset/index.mjs.map +1 -0
- package/dist/presets/react/rules/react.d.ts +130 -0
- package/dist/presets/react/rules/react.js +83 -0
- package/dist/presets/react/rules/react.js.map +1 -0
- package/dist/presets/react/rules/react.mjs +76 -0
- package/dist/presets/react/rules/react.mjs.map +1 -0
- package/dist/presets/vitest/index.d.ts +4 -0
- package/dist/presets/vitest/index.js +10 -0
- package/dist/presets/vitest/index.mjs +5 -0
- package/dist/presets/vitest/plugin/index.d.ts +3 -0
- package/dist/presets/vitest/plugin/index.js +5 -0
- package/dist/presets/vitest/plugin/index.js.map +1 -0
- package/dist/presets/vitest/plugin/index.mjs +4 -0
- package/dist/presets/vitest/plugin/index.mjs.map +1 -0
- package/dist/presets/vitest/preset/index.d.ts +4 -0
- package/dist/presets/vitest/preset/index.js +15 -0
- package/dist/presets/vitest/preset/index.js.map +1 -0
- package/dist/presets/vitest/preset/index.mjs +15 -0
- package/dist/presets/vitest/preset/index.mjs.map +1 -0
- package/dist/presets/vitest/rules/vitest.d.ts +42 -0
- package/dist/presets/vitest/rules/vitest.js +27 -0
- package/dist/presets/vitest/rules/vitest.js.map +1 -0
- package/dist/presets/vitest/rules/vitest.mjs +24 -0
- package/dist/presets/vitest/rules/vitest.mjs.map +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
declare const RULES_REACT_CORRECTNESS: {
|
|
2
|
+
readonly "react/exhaustive-deps": "error";
|
|
3
|
+
readonly "react/forward-ref-uses-ref": "error";
|
|
4
|
+
readonly "react/jsx-key": ["error", {
|
|
5
|
+
readonly checkFragmentShorthand: true;
|
|
6
|
+
readonly checkKeyMustBeforeSpread: false;
|
|
7
|
+
readonly warnOnDuplicates: true;
|
|
8
|
+
}];
|
|
9
|
+
readonly "react/jsx-no-duplicate-props": "error";
|
|
10
|
+
readonly "react/jsx-no-undef": "error";
|
|
11
|
+
readonly "react/jsx-props-no-spread-multi": "error";
|
|
12
|
+
readonly "react/no-children-prop": "error";
|
|
13
|
+
readonly "react/no-danger-with-children": "error";
|
|
14
|
+
readonly "react/no-render-return-value": "error";
|
|
15
|
+
readonly "react/no-string-refs": ["error", {
|
|
16
|
+
readonly noTemplateLiterals: true;
|
|
17
|
+
}];
|
|
18
|
+
readonly "react/no-this-in-sfc": "error";
|
|
19
|
+
readonly "react/void-dom-elements-no-children": "error";
|
|
20
|
+
};
|
|
21
|
+
declare const RULES_REACT_PEDANTIC: {
|
|
22
|
+
readonly "react/checked-requires-onchange-or-readonly": ["error", {
|
|
23
|
+
readonly ignoreExclusiveCheckedAttribute: false;
|
|
24
|
+
readonly ignoreMissingProperties: false;
|
|
25
|
+
}];
|
|
26
|
+
readonly "react/jsx-no-target-blank": ["error", {
|
|
27
|
+
readonly allowReferrer: false;
|
|
28
|
+
readonly enforceDynamicLinks: "always";
|
|
29
|
+
readonly forms: true;
|
|
30
|
+
readonly links: true;
|
|
31
|
+
readonly warnOnSpreadAttributes: false;
|
|
32
|
+
}];
|
|
33
|
+
readonly "react/jsx-no-useless-fragment": ["error", {
|
|
34
|
+
readonly allowExpressions: true;
|
|
35
|
+
}];
|
|
36
|
+
readonly "react/no-unescaped-entities": "error";
|
|
37
|
+
readonly "react/rules-of-hooks": "error";
|
|
38
|
+
};
|
|
39
|
+
declare const RULES_REACT_PERF: {
|
|
40
|
+
readonly "react/jsx-no-constructed-context-values": "error";
|
|
41
|
+
readonly "react/no-array-index-key": "error";
|
|
42
|
+
};
|
|
43
|
+
declare const RULES_REACT_RESTRICTION: {
|
|
44
|
+
readonly "react/button-has-type": ["error", {
|
|
45
|
+
readonly button: true;
|
|
46
|
+
readonly reset: true;
|
|
47
|
+
readonly submit: true;
|
|
48
|
+
}];
|
|
49
|
+
readonly "react/no-react-children": "error";
|
|
50
|
+
};
|
|
51
|
+
declare const RULES_REACT_STYLE: {
|
|
52
|
+
readonly "react/jsx-boolean-value": ["error", "never"];
|
|
53
|
+
readonly "react/jsx-curly-brace-presence": ["error", "always"];
|
|
54
|
+
readonly "react/jsx-fragments": ["error", "syntax"];
|
|
55
|
+
readonly "react/jsx-pascal-case": ["error", {
|
|
56
|
+
readonly allowAllCaps: false;
|
|
57
|
+
readonly allowLeadingUnderscore: false;
|
|
58
|
+
readonly allowNamespace: true;
|
|
59
|
+
}];
|
|
60
|
+
readonly "react/self-closing-comp": ["error", {
|
|
61
|
+
readonly component: true;
|
|
62
|
+
readonly html: true;
|
|
63
|
+
}];
|
|
64
|
+
};
|
|
65
|
+
declare const RULES_REACT_SUSPICIOUS: {
|
|
66
|
+
readonly "react/iframe-missing-sandbox": "error";
|
|
67
|
+
readonly "react/jsx-no-comment-textnodes": "error";
|
|
68
|
+
readonly "react/no-namespace": "error";
|
|
69
|
+
};
|
|
70
|
+
declare const RULES_REACT: {
|
|
71
|
+
readonly "react/iframe-missing-sandbox": "error";
|
|
72
|
+
readonly "react/jsx-no-comment-textnodes": "error";
|
|
73
|
+
readonly "react/no-namespace": "error";
|
|
74
|
+
readonly "react/jsx-boolean-value": ["error", "never"];
|
|
75
|
+
readonly "react/jsx-curly-brace-presence": ["error", "always"];
|
|
76
|
+
readonly "react/jsx-fragments": ["error", "syntax"];
|
|
77
|
+
readonly "react/jsx-pascal-case": ["error", {
|
|
78
|
+
readonly allowAllCaps: false;
|
|
79
|
+
readonly allowLeadingUnderscore: false;
|
|
80
|
+
readonly allowNamespace: true;
|
|
81
|
+
}];
|
|
82
|
+
readonly "react/self-closing-comp": ["error", {
|
|
83
|
+
readonly component: true;
|
|
84
|
+
readonly html: true;
|
|
85
|
+
}];
|
|
86
|
+
readonly "react/button-has-type": ["error", {
|
|
87
|
+
readonly button: true;
|
|
88
|
+
readonly reset: true;
|
|
89
|
+
readonly submit: true;
|
|
90
|
+
}];
|
|
91
|
+
readonly "react/no-react-children": "error";
|
|
92
|
+
readonly "react/jsx-no-constructed-context-values": "error";
|
|
93
|
+
readonly "react/no-array-index-key": "error";
|
|
94
|
+
readonly "react/checked-requires-onchange-or-readonly": ["error", {
|
|
95
|
+
readonly ignoreExclusiveCheckedAttribute: false;
|
|
96
|
+
readonly ignoreMissingProperties: false;
|
|
97
|
+
}];
|
|
98
|
+
readonly "react/jsx-no-target-blank": ["error", {
|
|
99
|
+
readonly allowReferrer: false;
|
|
100
|
+
readonly enforceDynamicLinks: "always";
|
|
101
|
+
readonly forms: true;
|
|
102
|
+
readonly links: true;
|
|
103
|
+
readonly warnOnSpreadAttributes: false;
|
|
104
|
+
}];
|
|
105
|
+
readonly "react/jsx-no-useless-fragment": ["error", {
|
|
106
|
+
readonly allowExpressions: true;
|
|
107
|
+
}];
|
|
108
|
+
readonly "react/no-unescaped-entities": "error";
|
|
109
|
+
readonly "react/rules-of-hooks": "error";
|
|
110
|
+
readonly "react/exhaustive-deps": "error";
|
|
111
|
+
readonly "react/forward-ref-uses-ref": "error";
|
|
112
|
+
readonly "react/jsx-key": ["error", {
|
|
113
|
+
readonly checkFragmentShorthand: true;
|
|
114
|
+
readonly checkKeyMustBeforeSpread: false;
|
|
115
|
+
readonly warnOnDuplicates: true;
|
|
116
|
+
}];
|
|
117
|
+
readonly "react/jsx-no-duplicate-props": "error";
|
|
118
|
+
readonly "react/jsx-no-undef": "error";
|
|
119
|
+
readonly "react/jsx-props-no-spread-multi": "error";
|
|
120
|
+
readonly "react/no-children-prop": "error";
|
|
121
|
+
readonly "react/no-danger-with-children": "error";
|
|
122
|
+
readonly "react/no-render-return-value": "error";
|
|
123
|
+
readonly "react/no-string-refs": ["error", {
|
|
124
|
+
readonly noTemplateLiterals: true;
|
|
125
|
+
}];
|
|
126
|
+
readonly "react/no-this-in-sfc": "error";
|
|
127
|
+
readonly "react/void-dom-elements-no-children": "error";
|
|
128
|
+
};
|
|
129
|
+
export { RULES_REACT, RULES_REACT_CORRECTNESS, RULES_REACT_PEDANTIC, RULES_REACT_PERF, RULES_REACT_RESTRICTION, RULES_REACT_STYLE, RULES_REACT_SUSPICIOUS };
|
|
130
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_REACT_CORRECTNESS = {
|
|
3
|
+
"react/exhaustive-deps": "error",
|
|
4
|
+
"react/forward-ref-uses-ref": "error",
|
|
5
|
+
"react/jsx-key": ["error", {
|
|
6
|
+
checkFragmentShorthand: true,
|
|
7
|
+
checkKeyMustBeforeSpread: false,
|
|
8
|
+
warnOnDuplicates: true
|
|
9
|
+
}],
|
|
10
|
+
"react/jsx-no-duplicate-props": "error",
|
|
11
|
+
"react/jsx-no-undef": "error",
|
|
12
|
+
"react/jsx-props-no-spread-multi": "error",
|
|
13
|
+
"react/no-children-prop": "error",
|
|
14
|
+
"react/no-danger-with-children": "error",
|
|
15
|
+
"react/no-render-return-value": "error",
|
|
16
|
+
"react/no-string-refs": ["error", { noTemplateLiterals: true }],
|
|
17
|
+
"react/no-this-in-sfc": "error",
|
|
18
|
+
"react/void-dom-elements-no-children": "error"
|
|
19
|
+
};
|
|
20
|
+
const RULES_REACT_PEDANTIC = {
|
|
21
|
+
"react/checked-requires-onchange-or-readonly": ["error", {
|
|
22
|
+
ignoreExclusiveCheckedAttribute: false,
|
|
23
|
+
ignoreMissingProperties: false
|
|
24
|
+
}],
|
|
25
|
+
"react/jsx-no-target-blank": ["error", {
|
|
26
|
+
allowReferrer: false,
|
|
27
|
+
enforceDynamicLinks: "always",
|
|
28
|
+
forms: true,
|
|
29
|
+
links: true,
|
|
30
|
+
warnOnSpreadAttributes: false
|
|
31
|
+
}],
|
|
32
|
+
"react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
|
|
33
|
+
"react/no-unescaped-entities": "error",
|
|
34
|
+
"react/rules-of-hooks": "error"
|
|
35
|
+
};
|
|
36
|
+
const RULES_REACT_PERF = {
|
|
37
|
+
"react/jsx-no-constructed-context-values": "error",
|
|
38
|
+
"react/no-array-index-key": "error"
|
|
39
|
+
};
|
|
40
|
+
const RULES_REACT_RESTRICTION = {
|
|
41
|
+
"react/button-has-type": ["error", {
|
|
42
|
+
button: true,
|
|
43
|
+
reset: true,
|
|
44
|
+
submit: true
|
|
45
|
+
}],
|
|
46
|
+
"react/no-react-children": "error"
|
|
47
|
+
};
|
|
48
|
+
const RULES_REACT_STYLE = {
|
|
49
|
+
"react/jsx-boolean-value": ["error", "never"],
|
|
50
|
+
"react/jsx-curly-brace-presence": ["error", "always"],
|
|
51
|
+
"react/jsx-fragments": ["error", "syntax"],
|
|
52
|
+
"react/jsx-pascal-case": ["error", {
|
|
53
|
+
allowAllCaps: false,
|
|
54
|
+
allowLeadingUnderscore: false,
|
|
55
|
+
allowNamespace: true
|
|
56
|
+
}],
|
|
57
|
+
"react/self-closing-comp": ["error", {
|
|
58
|
+
component: true,
|
|
59
|
+
html: true
|
|
60
|
+
}]
|
|
61
|
+
};
|
|
62
|
+
const RULES_REACT_SUSPICIOUS = {
|
|
63
|
+
"react/iframe-missing-sandbox": "error",
|
|
64
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
65
|
+
"react/no-namespace": "error"
|
|
66
|
+
};
|
|
67
|
+
const RULES_REACT = {
|
|
68
|
+
...RULES_REACT_CORRECTNESS,
|
|
69
|
+
...RULES_REACT_PEDANTIC,
|
|
70
|
+
...RULES_REACT_PERF,
|
|
71
|
+
...RULES_REACT_RESTRICTION,
|
|
72
|
+
...RULES_REACT_STYLE,
|
|
73
|
+
...RULES_REACT_SUSPICIOUS
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.RULES_REACT = RULES_REACT;
|
|
77
|
+
exports.RULES_REACT_CORRECTNESS = RULES_REACT_CORRECTNESS;
|
|
78
|
+
exports.RULES_REACT_PEDANTIC = RULES_REACT_PEDANTIC;
|
|
79
|
+
exports.RULES_REACT_PERF = RULES_REACT_PERF;
|
|
80
|
+
exports.RULES_REACT_RESTRICTION = RULES_REACT_RESTRICTION;
|
|
81
|
+
exports.RULES_REACT_STYLE = RULES_REACT_STYLE;
|
|
82
|
+
exports.RULES_REACT_SUSPICIOUS = RULES_REACT_SUSPICIOUS;
|
|
83
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","names":[],"sources":["../../../../src/presets/react/rules/react.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_REACT_CORRECTNESS = {\n \"react/exhaustive-deps\": \"error\",\n \"react/forward-ref-uses-ref\": \"error\",\n \"react/jsx-key\": [\n \"error\",\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: false,\n warnOnDuplicates: true,\n },\n ],\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-props-no-spread-multi\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-render-return-value\": \"error\",\n \"react/no-string-refs\": [\n \"error\",\n {\n noTemplateLiterals: true,\n },\n ],\n \"react/no-this-in-sfc\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PEDANTIC = {\n \"react/checked-requires-onchange-or-readonly\": [\n \"error\",\n {\n ignoreExclusiveCheckedAttribute: false,\n ignoreMissingProperties: false,\n },\n ],\n \"react/jsx-no-target-blank\": [\n \"error\",\n {\n allowReferrer: false,\n enforceDynamicLinks: \"always\",\n forms: true,\n links: true,\n warnOnSpreadAttributes: false,\n },\n ],\n \"react/jsx-no-useless-fragment\": [\n \"error\",\n {\n allowExpressions: true,\n },\n ],\n \"react/no-unescaped-entities\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PERF = {\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/no-array-index-key\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_RESTRICTION = {\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: true,\n submit: true,\n },\n ],\n \"react/no-react-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_STYLE = {\n \"react/jsx-boolean-value\": [\n \"error\",\n \"never\",\n ],\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n \"always\",\n ],\n \"react/jsx-fragments\": [\n \"error\",\n \"syntax\",\n ],\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: false,\n allowLeadingUnderscore: false,\n allowNamespace: true,\n },\n ],\n \"react/self-closing-comp\": [\n \"error\",\n {\n component: true,\n html: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT_SUSPICIOUS = {\n \"react/iframe-missing-sandbox\": \"error\",\n \"react/jsx-no-comment-textnodes\": \"error\",\n \"react/no-namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT = {\n ...RULES_REACT_CORRECTNESS,\n ...RULES_REACT_PEDANTIC,\n ...RULES_REACT_PERF,\n ...RULES_REACT_RESTRICTION,\n ...RULES_REACT_STYLE,\n ...RULES_REACT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_REACT,\n RULES_REACT_CORRECTNESS,\n RULES_REACT_PEDANTIC,\n RULES_REACT_PERF,\n RULES_REACT_RESTRICTION,\n RULES_REACT_STYLE,\n RULES_REACT_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,0BAA0B;CAC5B,yBAAyB;CACzB,8BAA8B;CAC9B,iBAAiB,CACb,SACA;EACI,wBAAwB;EACxB,0BAA0B;EAC1B,kBAAkB;EACrB,CACJ;CACD,gCAAgC;CAChC,sBAAsB;CACtB,mCAAmC;CACnC,0BAA0B;CAC1B,iCAAiC;CACjC,gCAAgC;CAChC,wBAAwB,CACpB,SACA,EACI,oBAAoB,MACvB,CACJ;CACD,wBAAwB;CACxB,uCAAuC;CAC1C;AAED,MAAM,uBAAuB;CACzB,+CAA+C,CAC3C,SACA;EACI,iCAAiC;EACjC,yBAAyB;EAC5B,CACJ;CACD,6BAA6B,CACzB,SACA;EACI,eAAe;EACf,qBAAqB;EACrB,OAAO;EACP,OAAO;EACP,wBAAwB;EAC3B,CACJ;CACD,iCAAiC,CAC7B,SACA,EACI,kBAAkB,MACrB,CACJ;CACD,+BAA+B;CAC/B,wBAAwB;CAC3B;AAED,MAAM,mBAAmB;CACrB,2CAA2C;CAC3C,4BAA4B;CAC/B;AAED,MAAM,0BAA0B;CAC5B,yBAAyB,CACrB,SACA;EACI,QAAQ;EACR,OAAO;EACP,QAAQ;EACX,CACJ;CACD,2BAA2B;CAC9B;AAED,MAAM,oBAAoB;CACtB,2BAA2B,CACvB,SACA,QACH;CACD,kCAAkC,CAC9B,SACA,SACH;CACD,uBAAuB,CACnB,SACA,SACH;CACD,yBAAyB,CACrB,SACA;EACI,cAAc;EACd,wBAAwB;EACxB,gBAAgB;EACnB,CACJ;CACD,2BAA2B,CACvB,SACA;EACI,WAAW;EACX,MAAM;EACT,CACJ;CACJ;AAED,MAAM,yBAAyB;CAC3B,gCAAgC;CAChC,kCAAkC;CAClC,sBAAsB;CACzB;AAED,MAAM,cAAc;CAChB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const RULES_REACT_CORRECTNESS = {
|
|
2
|
+
"react/exhaustive-deps": "error",
|
|
3
|
+
"react/forward-ref-uses-ref": "error",
|
|
4
|
+
"react/jsx-key": ["error", {
|
|
5
|
+
checkFragmentShorthand: true,
|
|
6
|
+
checkKeyMustBeforeSpread: false,
|
|
7
|
+
warnOnDuplicates: true
|
|
8
|
+
}],
|
|
9
|
+
"react/jsx-no-duplicate-props": "error",
|
|
10
|
+
"react/jsx-no-undef": "error",
|
|
11
|
+
"react/jsx-props-no-spread-multi": "error",
|
|
12
|
+
"react/no-children-prop": "error",
|
|
13
|
+
"react/no-danger-with-children": "error",
|
|
14
|
+
"react/no-render-return-value": "error",
|
|
15
|
+
"react/no-string-refs": ["error", { noTemplateLiterals: true }],
|
|
16
|
+
"react/no-this-in-sfc": "error",
|
|
17
|
+
"react/void-dom-elements-no-children": "error"
|
|
18
|
+
};
|
|
19
|
+
const RULES_REACT_PEDANTIC = {
|
|
20
|
+
"react/checked-requires-onchange-or-readonly": ["error", {
|
|
21
|
+
ignoreExclusiveCheckedAttribute: false,
|
|
22
|
+
ignoreMissingProperties: false
|
|
23
|
+
}],
|
|
24
|
+
"react/jsx-no-target-blank": ["error", {
|
|
25
|
+
allowReferrer: false,
|
|
26
|
+
enforceDynamicLinks: "always",
|
|
27
|
+
forms: true,
|
|
28
|
+
links: true,
|
|
29
|
+
warnOnSpreadAttributes: false
|
|
30
|
+
}],
|
|
31
|
+
"react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
|
|
32
|
+
"react/no-unescaped-entities": "error",
|
|
33
|
+
"react/rules-of-hooks": "error"
|
|
34
|
+
};
|
|
35
|
+
const RULES_REACT_PERF = {
|
|
36
|
+
"react/jsx-no-constructed-context-values": "error",
|
|
37
|
+
"react/no-array-index-key": "error"
|
|
38
|
+
};
|
|
39
|
+
const RULES_REACT_RESTRICTION = {
|
|
40
|
+
"react/button-has-type": ["error", {
|
|
41
|
+
button: true,
|
|
42
|
+
reset: true,
|
|
43
|
+
submit: true
|
|
44
|
+
}],
|
|
45
|
+
"react/no-react-children": "error"
|
|
46
|
+
};
|
|
47
|
+
const RULES_REACT_STYLE = {
|
|
48
|
+
"react/jsx-boolean-value": ["error", "never"],
|
|
49
|
+
"react/jsx-curly-brace-presence": ["error", "always"],
|
|
50
|
+
"react/jsx-fragments": ["error", "syntax"],
|
|
51
|
+
"react/jsx-pascal-case": ["error", {
|
|
52
|
+
allowAllCaps: false,
|
|
53
|
+
allowLeadingUnderscore: false,
|
|
54
|
+
allowNamespace: true
|
|
55
|
+
}],
|
|
56
|
+
"react/self-closing-comp": ["error", {
|
|
57
|
+
component: true,
|
|
58
|
+
html: true
|
|
59
|
+
}]
|
|
60
|
+
};
|
|
61
|
+
const RULES_REACT_SUSPICIOUS = {
|
|
62
|
+
"react/iframe-missing-sandbox": "error",
|
|
63
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
64
|
+
"react/no-namespace": "error"
|
|
65
|
+
};
|
|
66
|
+
const RULES_REACT = {
|
|
67
|
+
...RULES_REACT_CORRECTNESS,
|
|
68
|
+
...RULES_REACT_PEDANTIC,
|
|
69
|
+
...RULES_REACT_PERF,
|
|
70
|
+
...RULES_REACT_RESTRICTION,
|
|
71
|
+
...RULES_REACT_STYLE,
|
|
72
|
+
...RULES_REACT_SUSPICIOUS
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { RULES_REACT, RULES_REACT_CORRECTNESS, RULES_REACT_PEDANTIC, RULES_REACT_PERF, RULES_REACT_RESTRICTION, RULES_REACT_STYLE, RULES_REACT_SUSPICIOUS };
|
|
76
|
+
//# sourceMappingURL=react.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.mjs","names":[],"sources":["../../../../src/presets/react/rules/react.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_REACT_CORRECTNESS = {\n \"react/exhaustive-deps\": \"error\",\n \"react/forward-ref-uses-ref\": \"error\",\n \"react/jsx-key\": [\n \"error\",\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: false,\n warnOnDuplicates: true,\n },\n ],\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-props-no-spread-multi\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-render-return-value\": \"error\",\n \"react/no-string-refs\": [\n \"error\",\n {\n noTemplateLiterals: true,\n },\n ],\n \"react/no-this-in-sfc\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PEDANTIC = {\n \"react/checked-requires-onchange-or-readonly\": [\n \"error\",\n {\n ignoreExclusiveCheckedAttribute: false,\n ignoreMissingProperties: false,\n },\n ],\n \"react/jsx-no-target-blank\": [\n \"error\",\n {\n allowReferrer: false,\n enforceDynamicLinks: \"always\",\n forms: true,\n links: true,\n warnOnSpreadAttributes: false,\n },\n ],\n \"react/jsx-no-useless-fragment\": [\n \"error\",\n {\n allowExpressions: true,\n },\n ],\n \"react/no-unescaped-entities\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PERF = {\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/no-array-index-key\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_RESTRICTION = {\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: true,\n submit: true,\n },\n ],\n \"react/no-react-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_STYLE = {\n \"react/jsx-boolean-value\": [\n \"error\",\n \"never\",\n ],\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n \"always\",\n ],\n \"react/jsx-fragments\": [\n \"error\",\n \"syntax\",\n ],\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: false,\n allowLeadingUnderscore: false,\n allowNamespace: true,\n },\n ],\n \"react/self-closing-comp\": [\n \"error\",\n {\n component: true,\n html: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT_SUSPICIOUS = {\n \"react/iframe-missing-sandbox\": \"error\",\n \"react/jsx-no-comment-textnodes\": \"error\",\n \"react/no-namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT = {\n ...RULES_REACT_CORRECTNESS,\n ...RULES_REACT_PEDANTIC,\n ...RULES_REACT_PERF,\n ...RULES_REACT_RESTRICTION,\n ...RULES_REACT_STYLE,\n ...RULES_REACT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_REACT,\n RULES_REACT_CORRECTNESS,\n RULES_REACT_PEDANTIC,\n RULES_REACT_PERF,\n RULES_REACT_RESTRICTION,\n RULES_REACT_STYLE,\n RULES_REACT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,0BAA0B;CAC5B,yBAAyB;CACzB,8BAA8B;CAC9B,iBAAiB,CACb,SACA;EACI,wBAAwB;EACxB,0BAA0B;EAC1B,kBAAkB;EACrB,CACJ;CACD,gCAAgC;CAChC,sBAAsB;CACtB,mCAAmC;CACnC,0BAA0B;CAC1B,iCAAiC;CACjC,gCAAgC;CAChC,wBAAwB,CACpB,SACA,EACI,oBAAoB,MACvB,CACJ;CACD,wBAAwB;CACxB,uCAAuC;CAC1C;AAED,MAAM,uBAAuB;CACzB,+CAA+C,CAC3C,SACA;EACI,iCAAiC;EACjC,yBAAyB;EAC5B,CACJ;CACD,6BAA6B,CACzB,SACA;EACI,eAAe;EACf,qBAAqB;EACrB,OAAO;EACP,OAAO;EACP,wBAAwB;EAC3B,CACJ;CACD,iCAAiC,CAC7B,SACA,EACI,kBAAkB,MACrB,CACJ;CACD,+BAA+B;CAC/B,wBAAwB;CAC3B;AAED,MAAM,mBAAmB;CACrB,2CAA2C;CAC3C,4BAA4B;CAC/B;AAED,MAAM,0BAA0B;CAC5B,yBAAyB,CACrB,SACA;EACI,QAAQ;EACR,OAAO;EACP,QAAQ;EACX,CACJ;CACD,2BAA2B;CAC9B;AAED,MAAM,oBAAoB;CACtB,2BAA2B,CACvB,SACA,QACH;CACD,kCAAkC,CAC9B,SACA,SACH;CACD,uBAAuB,CACnB,SACA,SACH;CACD,yBAAyB,CACrB,SACA;EACI,cAAc;EACd,wBAAwB;EACxB,gBAAgB;EACnB,CACJ;CACD,2BAA2B,CACvB,SACA;EACI,WAAW;EACX,MAAM;EACT,CACJ;CACJ;AAED,MAAM,yBAAyB;CAC3B,gCAAgC;CAChC,kCAAkC;CAClC,sBAAsB;CACzB;AAED,MAAM,cAAc;CAChB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PLUGIN_VITEST } from "./plugin/index.js";
|
|
2
|
+
import { vitestPreset } from "./preset/index.js";
|
|
3
|
+
import { RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE } from "./rules/vitest.js";
|
|
4
|
+
export { PLUGIN_VITEST, RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE, vitestPreset };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_index = require('./plugin/index.js');
|
|
3
|
+
const require_vitest = require('./rules/vitest.js');
|
|
4
|
+
const require_index$1 = require('./preset/index.js');
|
|
5
|
+
|
|
6
|
+
exports.PLUGIN_VITEST = require_index.PLUGIN_VITEST;
|
|
7
|
+
exports.RULES_VITEST = require_vitest.RULES_VITEST;
|
|
8
|
+
exports.RULES_VITEST_CORRECTNESS = require_vitest.RULES_VITEST_CORRECTNESS;
|
|
9
|
+
exports.RULES_VITEST_STYLE = require_vitest.RULES_VITEST_STYLE;
|
|
10
|
+
exports.vitestPreset = require_index$1.vitestPreset;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PLUGIN_VITEST } from "./plugin/index.mjs";
|
|
2
|
+
import { RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE } from "./rules/vitest.mjs";
|
|
3
|
+
import { vitestPreset } from "./preset/index.mjs";
|
|
4
|
+
|
|
5
|
+
export { PLUGIN_VITEST, RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE, vitestPreset };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/presets/vitest/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_VITEST = [\n \"vitest\",\n] as const satisfies LintPlugins;\n\nexport { PLUGIN_VITEST };\n"],"mappings":";AAEA,MAAM,gBAAgB,CAClB,SACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/vitest/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_VITEST = [\n \"vitest\",\n] as const satisfies LintPlugins;\n\nexport { PLUGIN_VITEST };\n"],"mappings":"AAEA,MAAM,gBAAgB,CAClB,SACH"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_index = require('../plugin/index.js');
|
|
2
|
+
const require_vitest = require('../rules/vitest.js');
|
|
3
|
+
let es_toolkit = require("es-toolkit");
|
|
4
|
+
|
|
5
|
+
const vitestPreset = () => {
|
|
6
|
+
return ({ config: internalConfig }) => {
|
|
7
|
+
return { config: (0, es_toolkit.toMerged)(internalConfig, {
|
|
8
|
+
plugins: [...require_index.PLUGIN_VITEST],
|
|
9
|
+
rules: { ...require_vitest.RULES_VITEST }
|
|
10
|
+
}) };
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.vitestPreset = vitestPreset;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_VITEST","RULES_VITEST"],"sources":["../../../../src/presets/vitest/preset/index.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\nimport type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { toMerged } from \"es-toolkit\";\n\nimport { PLUGIN_VITEST } from \"#/presets/vitest/plugin\";\nimport { RULES_VITEST } from \"#/presets/vitest/rules/vitest\";\n\nconst vitestPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_VITEST,\n ],\n rules: {\n ...RULES_VITEST,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { vitestPreset };\n"],"mappings":";;;;AASA,MAAM,qBAA6B;AAC/B,SAAQ,EAAE,QAAQ,qBAAmC;AAUjD,SAAO,EACH,iCAVkC,gBAAgB;GAClD,SAAS,CACL,GAAGA,4BACN;GACD,OAAO,EACH,GAAGC,6BACN;GACJ,CAAwB,EAIxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PLUGIN_VITEST } from "../plugin/index.mjs";
|
|
2
|
+
import { RULES_VITEST } from "../rules/vitest.mjs";
|
|
3
|
+
import { toMerged } from "es-toolkit";
|
|
4
|
+
|
|
5
|
+
const vitestPreset = () => {
|
|
6
|
+
return ({ config: internalConfig }) => {
|
|
7
|
+
return { config: toMerged(internalConfig, {
|
|
8
|
+
plugins: [...PLUGIN_VITEST],
|
|
9
|
+
rules: { ...RULES_VITEST }
|
|
10
|
+
}) };
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { vitestPreset };
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/vitest/preset/index.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\nimport type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { toMerged } from \"es-toolkit\";\n\nimport { PLUGIN_VITEST } from \"#/presets/vitest/plugin\";\nimport { RULES_VITEST } from \"#/presets/vitest/rules/vitest\";\n\nconst vitestPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_VITEST,\n ],\n rules: {\n ...RULES_VITEST,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { vitestPreset };\n"],"mappings":";;;;AASA,MAAM,qBAA6B;AAC/B,SAAQ,EAAE,QAAQ,qBAAmC;AAUjD,SAAO,EACH,QAVyB,SAAS,gBAAgB;GAClD,SAAS,CACL,GAAG,cACN;GACD,OAAO,EACH,GAAG,cACN;GACJ,CAAwB,EAIxB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const RULES_VITEST_CORRECTNESS: {
|
|
2
|
+
readonly "vitest/consistent-each-for": ["error", {
|
|
3
|
+
readonly describe: "for";
|
|
4
|
+
readonly it: "for";
|
|
5
|
+
readonly suite: "for";
|
|
6
|
+
readonly test: "for";
|
|
7
|
+
}];
|
|
8
|
+
readonly "vitest/hoisted-apis-on-top": "error";
|
|
9
|
+
readonly "vitest/no-conditional-tests": "error";
|
|
10
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
11
|
+
};
|
|
12
|
+
declare const RULES_VITEST_STYLE: {
|
|
13
|
+
readonly "vitest/consistent-vitest-vi": ["error", {
|
|
14
|
+
readonly fn: "vi";
|
|
15
|
+
}];
|
|
16
|
+
readonly "vitest/no-import-node-test": "error";
|
|
17
|
+
readonly "vitest/prefer-called-times": "error";
|
|
18
|
+
readonly "vitest/prefer-import-in-mock": ["error", {
|
|
19
|
+
readonly fixable: true;
|
|
20
|
+
}];
|
|
21
|
+
};
|
|
22
|
+
declare const RULES_VITEST: {
|
|
23
|
+
readonly "vitest/consistent-vitest-vi": ["error", {
|
|
24
|
+
readonly fn: "vi";
|
|
25
|
+
}];
|
|
26
|
+
readonly "vitest/no-import-node-test": "error";
|
|
27
|
+
readonly "vitest/prefer-called-times": "error";
|
|
28
|
+
readonly "vitest/prefer-import-in-mock": ["error", {
|
|
29
|
+
readonly fixable: true;
|
|
30
|
+
}];
|
|
31
|
+
readonly "vitest/consistent-each-for": ["error", {
|
|
32
|
+
readonly describe: "for";
|
|
33
|
+
readonly it: "for";
|
|
34
|
+
readonly suite: "for";
|
|
35
|
+
readonly test: "for";
|
|
36
|
+
}];
|
|
37
|
+
readonly "vitest/hoisted-apis-on-top": "error";
|
|
38
|
+
readonly "vitest/no-conditional-tests": "error";
|
|
39
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
40
|
+
};
|
|
41
|
+
export { RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE };
|
|
42
|
+
//# sourceMappingURL=vitest.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_VITEST_CORRECTNESS = {
|
|
3
|
+
"vitest/consistent-each-for": ["error", {
|
|
4
|
+
describe: "for",
|
|
5
|
+
it: "for",
|
|
6
|
+
suite: "for",
|
|
7
|
+
test: "for"
|
|
8
|
+
}],
|
|
9
|
+
"vitest/hoisted-apis-on-top": "error",
|
|
10
|
+
"vitest/no-conditional-tests": "error",
|
|
11
|
+
"vitest/require-local-test-context-for-concurrent-snapshots": "error"
|
|
12
|
+
};
|
|
13
|
+
const RULES_VITEST_STYLE = {
|
|
14
|
+
"vitest/consistent-vitest-vi": ["error", { fn: "vi" }],
|
|
15
|
+
"vitest/no-import-node-test": "error",
|
|
16
|
+
"vitest/prefer-called-times": "error",
|
|
17
|
+
"vitest/prefer-import-in-mock": ["error", { fixable: true }]
|
|
18
|
+
};
|
|
19
|
+
const RULES_VITEST = {
|
|
20
|
+
...RULES_VITEST_CORRECTNESS,
|
|
21
|
+
...RULES_VITEST_STYLE
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.RULES_VITEST = RULES_VITEST;
|
|
25
|
+
exports.RULES_VITEST_CORRECTNESS = RULES_VITEST_CORRECTNESS;
|
|
26
|
+
exports.RULES_VITEST_STYLE = RULES_VITEST_STYLE;
|
|
27
|
+
//# sourceMappingURL=vitest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.js","names":[],"sources":["../../../../src/presets/vitest/rules/vitest.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_VITEST_CORRECTNESS = {\n \"vitest/consistent-each-for\": [\n \"error\",\n {\n describe: \"for\",\n it: \"for\",\n suite: \"for\",\n test: \"for\",\n },\n ],\n \"vitest/hoisted-apis-on-top\": \"error\",\n \"vitest/no-conditional-tests\": \"error\",\n \"vitest/require-local-test-context-for-concurrent-snapshots\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_VITEST_STYLE = {\n \"vitest/consistent-vitest-vi\": [\n \"error\",\n {\n fn: \"vi\",\n },\n ],\n \"vitest/no-import-node-test\": \"error\",\n \"vitest/prefer-called-times\": \"error\",\n \"vitest/prefer-import-in-mock\": [\n \"error\",\n {\n fixable: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_VITEST = {\n ...RULES_VITEST_CORRECTNESS,\n ...RULES_VITEST_STYLE,\n} as const satisfies LintRules;\n\nexport { RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE };\n"],"mappings":";AAEA,MAAM,2BAA2B;CAC7B,8BAA8B,CAC1B,SACA;EACI,UAAU;EACV,IAAI;EACJ,OAAO;EACP,MAAM;EACT,CACJ;CACD,8BAA8B;CAC9B,+BAA+B;CAC/B,8DAA8D;CACjE;AAED,MAAM,qBAAqB;CACvB,+BAA+B,CAC3B,SACA,EACI,IAAI,MACP,CACJ;CACD,8BAA8B;CAC9B,8BAA8B;CAC9B,gCAAgC,CAC5B,SACA,EACI,SAAS,MACZ,CACJ;CACJ;AAED,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const RULES_VITEST_CORRECTNESS = {
|
|
2
|
+
"vitest/consistent-each-for": ["error", {
|
|
3
|
+
describe: "for",
|
|
4
|
+
it: "for",
|
|
5
|
+
suite: "for",
|
|
6
|
+
test: "for"
|
|
7
|
+
}],
|
|
8
|
+
"vitest/hoisted-apis-on-top": "error",
|
|
9
|
+
"vitest/no-conditional-tests": "error",
|
|
10
|
+
"vitest/require-local-test-context-for-concurrent-snapshots": "error"
|
|
11
|
+
};
|
|
12
|
+
const RULES_VITEST_STYLE = {
|
|
13
|
+
"vitest/consistent-vitest-vi": ["error", { fn: "vi" }],
|
|
14
|
+
"vitest/no-import-node-test": "error",
|
|
15
|
+
"vitest/prefer-called-times": "error",
|
|
16
|
+
"vitest/prefer-import-in-mock": ["error", { fixable: true }]
|
|
17
|
+
};
|
|
18
|
+
const RULES_VITEST = {
|
|
19
|
+
...RULES_VITEST_CORRECTNESS,
|
|
20
|
+
...RULES_VITEST_STYLE
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE };
|
|
24
|
+
//# sourceMappingURL=vitest.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.mjs","names":[],"sources":["../../../../src/presets/vitest/rules/vitest.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_VITEST_CORRECTNESS = {\n \"vitest/consistent-each-for\": [\n \"error\",\n {\n describe: \"for\",\n it: \"for\",\n suite: \"for\",\n test: \"for\",\n },\n ],\n \"vitest/hoisted-apis-on-top\": \"error\",\n \"vitest/no-conditional-tests\": \"error\",\n \"vitest/require-local-test-context-for-concurrent-snapshots\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_VITEST_STYLE = {\n \"vitest/consistent-vitest-vi\": [\n \"error\",\n {\n fn: \"vi\",\n },\n ],\n \"vitest/no-import-node-test\": \"error\",\n \"vitest/prefer-called-times\": \"error\",\n \"vitest/prefer-import-in-mock\": [\n \"error\",\n {\n fixable: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_VITEST = {\n ...RULES_VITEST_CORRECTNESS,\n ...RULES_VITEST_STYLE,\n} as const satisfies LintRules;\n\nexport { RULES_VITEST, RULES_VITEST_CORRECTNESS, RULES_VITEST_STYLE };\n"],"mappings":"AAEA,MAAM,2BAA2B;CAC7B,8BAA8B,CAC1B,SACA;EACI,UAAU;EACV,IAAI;EACJ,OAAO;EACP,MAAM;EACT,CACJ;CACD,8BAA8B;CAC9B,+BAA+B;CAC/B,8DAA8D;CACjE;AAED,MAAM,qBAAqB;CACvB,+BAA+B,CAC3B,SACA,EACI,IAAI,MACP,CACJ;CACD,8BAA8B;CAC9B,8BAA8B;CAC9B,gCAAgC,CAC5B,SACA,EACI,SAAS,MACZ,CACJ;CACJ;AAED,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACN"}
|
package/package.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@apst/oxlint",
|
|
3
|
+
"version": "0.0.0-dev.20260324.019d1d21",
|
|
4
|
+
"description": "A shareable Oxlint configuration",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"oxlint",
|
|
7
|
+
"configuration",
|
|
8
|
+
"config",
|
|
9
|
+
"oxc",
|
|
10
|
+
"ts",
|
|
11
|
+
"typescript",
|
|
12
|
+
"js",
|
|
13
|
+
"javascript"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/alpheuscfg/oxlint",
|
|
16
|
+
"bugs": "https://github.com/alpheuscfg/oxlint/issues",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/alpheuscfg/oxlint.git",
|
|
20
|
+
"directory": "package"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Alpheus",
|
|
25
|
+
"email": "contact@alphe.us"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"require": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./constants/default": {
|
|
34
|
+
"types": "./dist/constants/default.d.ts",
|
|
35
|
+
"import": "./dist/constants/default.mjs",
|
|
36
|
+
"require": "./dist/constants/default.js"
|
|
37
|
+
},
|
|
38
|
+
"./constants/ignore-patterns": {
|
|
39
|
+
"types": "./dist/constants/ignore-patterns.d.ts",
|
|
40
|
+
"import": "./dist/constants/ignore-patterns.mjs",
|
|
41
|
+
"require": "./dist/constants/ignore-patterns.js"
|
|
42
|
+
},
|
|
43
|
+
"./presets/common": {
|
|
44
|
+
"types": "./dist/presets/common/index.d.ts",
|
|
45
|
+
"import": "./dist/presets/common/index.mjs",
|
|
46
|
+
"require": "./dist/presets/common/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./presets/node": {
|
|
49
|
+
"types": "./dist/presets/common/index.d.ts",
|
|
50
|
+
"import": "./dist/presets/common/index.mjs",
|
|
51
|
+
"require": "./dist/presets/common/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./presets/jsx": {
|
|
54
|
+
"types": "./dist/presets/common/index.d.ts",
|
|
55
|
+
"import": "./dist/presets/common/index.mjs",
|
|
56
|
+
"require": "./dist/presets/common/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./presets/react": {
|
|
59
|
+
"types": "./dist/presets/common/index.d.ts",
|
|
60
|
+
"import": "./dist/presets/common/index.mjs",
|
|
61
|
+
"require": "./dist/presets/common/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./presets/next": {
|
|
64
|
+
"types": "./dist/presets/common/index.d.ts",
|
|
65
|
+
"import": "./dist/presets/common/index.mjs",
|
|
66
|
+
"require": "./dist/presets/common/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./presets/vitest": {
|
|
69
|
+
"types": "./dist/presets/common/index.d.ts",
|
|
70
|
+
"import": "./dist/presets/common/index.mjs",
|
|
71
|
+
"require": "./dist/presets/common/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./package.json": "./package.json"
|
|
74
|
+
},
|
|
75
|
+
"main": "./dist/index.js",
|
|
76
|
+
"module": "./dist/index.mjs",
|
|
77
|
+
"types": "./dist/index.d.ts",
|
|
78
|
+
"files": [
|
|
79
|
+
"dist"
|
|
80
|
+
],
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"es-toolkit": "^1.40.0",
|
|
83
|
+
"oxlint-tsgolint": "*",
|
|
84
|
+
"ts-vista": "~0.2.3"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"oxlint": "1.56.0"
|
|
88
|
+
},
|
|
89
|
+
"peerDependencies": {
|
|
90
|
+
"oxlint": "^1.56.0"
|
|
91
|
+
},
|
|
92
|
+
"peerDependenciesMeta": {
|
|
93
|
+
"oxlint": {
|
|
94
|
+
"optional": true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|