@apst/oxlint 0.2.0 → 0.4.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/README.md +0 -34
- package/dist/constants/default.d.ts +1 -1
- package/dist/constants/ignore-patterns.d.ts +16 -2
- package/dist/constants/ignore-patterns.js +58 -16
- package/dist/constants/ignore-patterns.js.map +1 -1
- package/dist/constants/ignore-patterns.mjs +49 -17
- package/dist/constants/ignore-patterns.mjs.map +1 -1
- package/dist/functions/define.js +2 -2
- package/dist/functions/define.js.map +1 -1
- package/dist/functions/define.mjs +4 -4
- package/dist/functions/define.mjs.map +1 -1
- package/dist/functions/merge.js +20 -4
- package/dist/functions/merge.js.map +1 -1
- package/dist/functions/merge.mjs +19 -4
- package/dist/functions/merge.mjs.map +1 -1
- package/dist/presets/common/index.d.ts +3 -3
- package/dist/presets/common/index.js +2 -0
- package/dist/presets/common/index.mjs +3 -3
- package/dist/presets/common/preset/index.js +3 -4
- package/dist/presets/common/preset/index.js.map +1 -1
- package/dist/presets/common/preset/index.mjs +3 -4
- package/dist/presets/common/preset/index.mjs.map +1 -1
- package/dist/presets/common/rules/eslint.d.ts +8 -4
- package/dist/presets/common/rules/eslint.js +4 -4
- package/dist/presets/common/rules/eslint.js.map +1 -1
- package/dist/presets/common/rules/eslint.mjs +4 -4
- package/dist/presets/common/rules/eslint.mjs.map +1 -1
- package/dist/presets/common/rules/import.d.ts +10 -0
- package/dist/presets/common/rules/import.js +5 -0
- package/dist/presets/common/rules/import.js.map +1 -1
- package/dist/presets/common/rules/import.mjs +5 -0
- package/dist/presets/common/rules/import.mjs.map +1 -1
- package/dist/presets/common/rules/oxc.d.ts +6 -1
- package/dist/presets/common/rules/oxc.js +1 -0
- package/dist/presets/common/rules/oxc.js.map +1 -1
- package/dist/presets/common/rules/oxc.mjs +1 -1
- package/dist/presets/common/rules/oxc.mjs.map +1 -1
- package/dist/presets/common/rules/typescript.d.ts +56 -42
- package/dist/presets/common/rules/typescript.js +19 -14
- package/dist/presets/common/rules/typescript.js.map +1 -1
- package/dist/presets/common/rules/typescript.mjs +19 -14
- package/dist/presets/common/rules/typescript.mjs.map +1 -1
- package/dist/presets/common/rules/unicorn.d.ts +11 -3
- package/dist/presets/common/rules/unicorn.js +7 -2
- package/dist/presets/common/rules/unicorn.js.map +1 -1
- package/dist/presets/common/rules/unicorn.mjs +7 -3
- package/dist/presets/common/rules/unicorn.mjs.map +1 -1
- package/dist/presets/jsx/preset/index.js +3 -4
- package/dist/presets/jsx/preset/index.js.map +1 -1
- package/dist/presets/jsx/preset/index.mjs +3 -4
- package/dist/presets/jsx/preset/index.mjs.map +1 -1
- package/dist/presets/jsx/rules/jsx-a11y.d.ts +16 -0
- package/dist/presets/jsx/rules/jsx-a11y.js +15 -0
- package/dist/presets/jsx/rules/jsx-a11y.js.map +1 -1
- package/dist/presets/jsx/rules/jsx-a11y.mjs +15 -0
- package/dist/presets/jsx/rules/jsx-a11y.mjs.map +1 -1
- package/dist/presets/next/index.d.ts +2 -1
- package/dist/presets/next/index.js +3 -0
- package/dist/presets/next/index.mjs +2 -1
- package/dist/presets/next/preset/index.js +3 -4
- package/dist/presets/next/preset/index.js.map +1 -1
- package/dist/presets/next/preset/index.mjs +3 -4
- package/dist/presets/next/preset/index.mjs.map +1 -1
- package/dist/presets/next/rules/nextjs.d.ts +48 -0
- package/dist/presets/next/rules/nextjs.js +4 -1
- package/dist/presets/next/rules/nextjs.js.map +1 -1
- package/dist/presets/next/rules/nextjs.mjs +4 -2
- package/dist/presets/next/rules/nextjs.mjs.map +1 -1
- package/dist/presets/node/preset/index.js +3 -4
- package/dist/presets/node/preset/index.js.map +1 -1
- package/dist/presets/node/preset/index.mjs +3 -4
- package/dist/presets/node/preset/index.mjs.map +1 -1
- package/dist/presets/react/index.d.ts +2 -2
- package/dist/presets/react/index.js +1 -0
- package/dist/presets/react/index.mjs +2 -2
- package/dist/presets/react/preset/index.js +3 -4
- package/dist/presets/react/preset/index.js.map +1 -1
- package/dist/presets/react/preset/index.mjs +3 -4
- package/dist/presets/react/preset/index.mjs.map +1 -1
- package/dist/presets/react/rules/react.d.ts +32 -1
- package/dist/presets/react/rules/react.js +15 -2
- package/dist/presets/react/rules/react.js.map +1 -1
- package/dist/presets/react/rules/react.mjs +15 -3
- package/dist/presets/react/rules/react.mjs.map +1 -1
- package/dist/presets/vitest/preset/index.js +3 -4
- package/dist/presets/vitest/preset/index.js.map +1 -1
- package/dist/presets/vitest/preset/index.mjs +3 -4
- package/dist/presets/vitest/preset/index.mjs.map +1 -1
- package/dist/presets/vitest/rules/vitest.d.ts +4 -0
- package/dist/presets/vitest/rules/vitest.js +3 -1
- package/dist/presets/vitest/rules/vitest.js.map +1 -1
- package/dist/presets/vitest/rules/vitest.mjs +3 -1
- package/dist/presets/vitest/rules/vitest.mjs.map +1 -1
- package/dist/presets/vue/index.d.ts +4 -0
- package/dist/presets/vue/index.js +12 -0
- package/dist/presets/vue/index.mjs +5 -0
- package/dist/presets/vue/plugin/index.d.ts +3 -0
- package/dist/presets/vue/plugin/index.js +5 -0
- package/dist/presets/vue/plugin/index.js.map +1 -0
- package/dist/presets/vue/plugin/index.mjs +4 -0
- package/dist/presets/vue/plugin/index.mjs.map +1 -0
- package/dist/presets/vue/preset/index.d.ts +4 -0
- package/dist/presets/vue/preset/index.js +14 -0
- package/dist/presets/vue/preset/index.js.map +1 -0
- package/dist/presets/vue/preset/index.mjs +14 -0
- package/dist/presets/vue/preset/index.mjs.map +1 -0
- package/dist/presets/vue/rules/vue.d.ts +47 -0
- package/dist/presets/vue/rules/vue.js +32 -0
- package/dist/presets/vue/rules/vue.js.map +1 -0
- package/dist/presets/vue/rules/vue.mjs +27 -0
- package/dist/presets/vue/rules/vue.mjs.map +1 -0
- package/package.json +11 -41
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
const RULES_TYPESCRIPT_NURSERY = {
|
|
2
|
-
"typescript/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
allowIndexSignaturePropertyAccess: false,
|
|
6
|
-
allowKeywords: true,
|
|
7
|
-
allowPrivateClassPropertyAccess: false,
|
|
8
|
-
allowProtectedClassPropertyAccess: false
|
|
2
|
+
"typescript/no-unnecessary-condition": ["error", {
|
|
3
|
+
allowConstantLoopConditions: true,
|
|
4
|
+
checkTypePredicates: true
|
|
9
5
|
}],
|
|
10
|
-
"typescript/no-unnecessary-type-conversion": "error",
|
|
11
|
-
"typescript/no-unnecessary-type-parameters": "error",
|
|
12
|
-
"typescript/no-useless-default-assignment": "error",
|
|
13
6
|
"typescript/prefer-optional-chain": ["error", {
|
|
14
7
|
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
|
|
15
8
|
checkAny: true,
|
|
@@ -19,10 +12,7 @@ const RULES_TYPESCRIPT_NURSERY = {
|
|
|
19
12
|
checkString: true,
|
|
20
13
|
checkUnknown: true,
|
|
21
14
|
requireNullish: false
|
|
22
|
-
}]
|
|
23
|
-
"typescript/prefer-readonly": ["error", { onlyInlineLambdas: false }],
|
|
24
|
-
"typescript/prefer-regexp-exec": "error",
|
|
25
|
-
"typescript/strict-void-return": ["error", { allowReturnAny: false }]
|
|
15
|
+
}]
|
|
26
16
|
};
|
|
27
17
|
const RULES_TYPESCRIPT_PEDANTIC = {
|
|
28
18
|
"typescript/no-misused-promises": ["error", {
|
|
@@ -84,6 +74,7 @@ const RULES_TYPESCRIPT_PEDANTIC = {
|
|
|
84
74
|
allowNumber: true,
|
|
85
75
|
allowString: true
|
|
86
76
|
}],
|
|
77
|
+
"typescript/strict-void-return": ["error", { allowReturnAny: false }],
|
|
87
78
|
"typescript/switch-exhaustiveness-check": ["error", {
|
|
88
79
|
allowDefaultCaseForExhaustiveSwitch: true,
|
|
89
80
|
considerDefaultExhaustiveForUnions: true,
|
|
@@ -91,6 +82,7 @@ const RULES_TYPESCRIPT_PEDANTIC = {
|
|
|
91
82
|
}]
|
|
92
83
|
};
|
|
93
84
|
const RULES_TYPESCRIPT_RESTRICTION = {
|
|
85
|
+
"typescript/explicit-member-accessibility": ["error", { accessibility: "explicit" }],
|
|
94
86
|
"typescript/no-empty-object-type": ["error", {
|
|
95
87
|
allowInterfaces: "with-single-extends",
|
|
96
88
|
allowObjectTypes: "never"
|
|
@@ -114,21 +106,34 @@ const RULES_TYPESCRIPT_RESTRICTION = {
|
|
|
114
106
|
const RULES_TYPESCRIPT_STYLE = {
|
|
115
107
|
"typescript/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
116
108
|
"typescript/consistent-type-definitions": ["error", "type"],
|
|
109
|
+
"typescript/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: false }],
|
|
117
110
|
"typescript/consistent-type-imports": ["error", {
|
|
118
111
|
disallowTypeAnnotations: true,
|
|
119
112
|
fixStyle: "separate-type-imports",
|
|
120
113
|
prefer: "type-imports"
|
|
121
114
|
}],
|
|
115
|
+
"typescript/dot-notation": ["error", {
|
|
116
|
+
allowIndexSignaturePropertyAccess: false,
|
|
117
|
+
allowKeywords: true,
|
|
118
|
+
allowPrivateClassPropertyAccess: false,
|
|
119
|
+
allowProtectedClassPropertyAccess: false
|
|
120
|
+
}],
|
|
121
|
+
"typescript/method-signature-style": ["error", "property"],
|
|
122
122
|
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
123
123
|
"typescript/parameter-properties": ["error", { prefer: "class-property" }],
|
|
124
124
|
"typescript/prefer-function-type": "error",
|
|
125
125
|
"typescript/prefer-reduce-type-parameter": "error",
|
|
126
|
+
"typescript/prefer-readonly": ["error", { onlyInlineLambdas: false }],
|
|
127
|
+
"typescript/prefer-regexp-exec": "error",
|
|
126
128
|
"typescript/prefer-return-this-type": "error"
|
|
127
129
|
};
|
|
128
130
|
const RULES_TYPESCRIPT_SUSPICIOUS = {
|
|
131
|
+
"typescript/consistent-return": ["error", { treatUndefinedAsUnspecified: false }],
|
|
129
132
|
"typescript/no-confusing-non-null-assertion": "error",
|
|
130
133
|
"typescript/no-unnecessary-template-expression": "error",
|
|
131
134
|
"typescript/no-unnecessary-type-constraint": "error",
|
|
135
|
+
"typescript/no-unnecessary-type-conversion": "error",
|
|
136
|
+
"typescript/no-unnecessary-type-parameters": "error",
|
|
132
137
|
"typescript/no-unsafe-enum-comparison": "error"
|
|
133
138
|
};
|
|
134
139
|
const RULES_TYPESCRIPT = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/
|
|
1
|
+
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/no-unnecessary-condition\": [\n \"error\",\n {\n allowConstantLoopConditions: true,\n checkTypePredicates: true,\n },\n ],\n \"typescript/prefer-optional-chain\": [\n \"error\",\n {\n allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,\n checkAny: true,\n checkBigInt: true,\n checkBoolean: true,\n checkNumber: true,\n checkString: true,\n checkUnknown: true,\n requireNullish: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_PEDANTIC = {\n \"typescript/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksSpreads: true,\n checksVoidReturn: {\n arguments: true,\n attributes: true,\n inheritedMethods: true,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreBooleanCoercion: false,\n ignoreConditionalTests: false,\n ignoreIfStatements: false,\n ignoreMixedLogicalExpressions: false,\n ignorePrimitives: {\n bigint: false,\n boolean: false,\n number: false,\n string: false,\n },\n ignoreTernaryTests: false,\n },\n ],\n \"typescript/prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n allowThrowingAny: false,\n allowThrowingUnknown: false,\n },\n ],\n \"typescript/prefer-ts-expect-error\": \"error\",\n \"typescript/restrict-plus-operands\": [\n \"error\",\n {\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumberAndString: true,\n allowRegExp: true,\n skipCompoundAssignments: false,\n },\n ],\n \"typescript/return-await\": [\n \"error\",\n \"always\",\n ],\n \"typescript/strict-boolean-expressions\": [\n \"error\",\n {\n allowAny: true,\n allowNullableBoolean: false,\n allowNullableEnum: false,\n allowNullableNumber: false,\n allowNullableObject: true,\n allowNullableString: false,\n allowNumber: true,\n allowString: true,\n },\n ],\n \"typescript/strict-void-return\": [\n \"error\",\n {\n allowReturnAny: false,\n },\n ],\n \"typescript/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true,\n requireDefaultForNonUnion: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_RESTRICTION = {\n \"typescript/explicit-member-accessibility\": [\n \"error\",\n {\n accessibility: \"explicit\",\n },\n ],\n \"typescript/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\",\n },\n ],\n \"typescript/no-import-type-side-effects\": \"error\",\n \"typescript/no-namespace\": [\n \"error\",\n {\n allowDeclarations: false,\n allowDefinitionFiles: true,\n },\n ],\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/promise-function-async\": [\n \"error\",\n {\n allowAny: true,\n checkArrowFunctions: true,\n checkFunctionDeclarations: true,\n checkFunctionExpressions: true,\n checkMethodDeclarations: true,\n },\n ],\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_STYLE = {\n \"typescript/consistent-type-assertions\": [\n \"error\",\n {\n assertionStyle: \"as\",\n },\n ],\n \"typescript/consistent-type-definitions\": [\n \"error\",\n \"type\",\n ],\n \"typescript/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: false,\n },\n ],\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeAnnotations: true,\n fixStyle: \"separate-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"typescript/dot-notation\": [\n \"error\",\n {\n allowIndexSignaturePropertyAccess: false,\n allowKeywords: true,\n allowPrivateClassPropertyAccess: false,\n allowProtectedClassPropertyAccess: false,\n },\n ],\n \"typescript/method-signature-style\": [\n \"error\",\n \"property\",\n ],\n \"typescript/no-empty-interface\": [\n \"error\",\n {\n allowSingleExtends: true,\n },\n ],\n \"typescript/parameter-properties\": [\n \"error\",\n {\n prefer: \"class-property\",\n },\n ],\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-reduce-type-parameter\": \"error\",\n \"typescript/prefer-readonly\": [\n \"error\",\n {\n onlyInlineLambdas: false,\n },\n ],\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/prefer-return-this-type\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_SUSPICIOUS = {\n \"typescript/consistent-return\": [\n \"error\",\n {\n treatUndefinedAsUnspecified: false,\n },\n ],\n \"typescript/no-confusing-non-null-assertion\": \"error\",\n \"typescript/no-unnecessary-template-expression\": \"error\",\n \"typescript/no-unnecessary-type-constraint\": \"error\",\n \"typescript/no-unnecessary-type-conversion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-unsafe-enum-comparison\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT = {\n ...RULES_TYPESCRIPT_NURSERY,\n ...RULES_TYPESCRIPT_PEDANTIC,\n ...RULES_TYPESCRIPT_RESTRICTION,\n ...RULES_TYPESCRIPT_STYLE,\n ...RULES_TYPESCRIPT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_TYPESCRIPT,\n RULES_TYPESCRIPT_NURSERY,\n RULES_TYPESCRIPT_PEDANTIC,\n RULES_TYPESCRIPT_RESTRICTION,\n RULES_TYPESCRIPT_STYLE,\n RULES_TYPESCRIPT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,2BAA2B;CAC7B,uCAAuC,CACnC,SACA;EACI,6BAA6B;EAC7B,qBAAqB;CACzB,CACJ;CACA,oCAAoC,CAChC,SACA;EACI,oEAAoE;EACpE,UAAU;EACV,aAAa;EACb,cAAc;EACd,aAAa;EACb,aAAa;EACb,cAAc;EACd,gBAAgB;CACpB,CACJ;AACJ;AAEA,MAAM,4BAA4B;CAC9B,kCAAkC,CAC9B,SACA;EACI,oBAAoB;EACpB,eAAe;EACf,kBAAkB;GACd,WAAW;GACX,YAAY;GACZ,kBAAkB;GAClB,YAAY;GACZ,SAAS;GACT,WAAW;EACf;CACJ,CACJ;CACA,6BAA6B;CAC7B,iCAAiC;CACjC,mCAAmC;CACnC,6BAA6B;CAC7B,sCAAsC;CACtC,sCAAsC;CACtC,+BAA+B;CAC/B,+BAA+B;CAC/B,8BAA8B;CAC9B,wCAAwC,CACpC,SACA;EACI,uBAAuB;EACvB,wBAAwB;EACxB,oBAAoB;EACpB,+BAA+B;EAC/B,kBAAkB;GACd,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,QAAQ;EACZ;EACA,oBAAoB;CACxB,CACJ;CACA,2CAA2C,CACvC,SACA;EACI,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;CAC1B,CACJ;CACA,qCAAqC;CACrC,qCAAqC,CACjC,SACA;EACI,UAAU;EACV,cAAc;EACd,cAAc;EACd,sBAAsB;EACtB,aAAa;EACb,yBAAyB;CAC7B,CACJ;CACA,2BAA2B,CACvB,SACA,QACJ;CACA,yCAAyC,CACrC,SACA;EACI,UAAU;EACV,sBAAsB;EACtB,mBAAmB;EACnB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,aAAa;EACb,aAAa;CACjB,CACJ;CACA,iCAAiC,CAC7B,SACA,EACI,gBAAgB,MACpB,CACJ;CACA,0CAA0C,CACtC,SACA;EACI,qCAAqC;EACrC,oCAAoC;EACpC,2BAA2B;CAC/B,CACJ;AACJ;AAEA,MAAM,+BAA+B;CACjC,4CAA4C,CACxC,SACA,EACI,eAAe,WACnB,CACJ;CACA,mCAAmC,CAC/B,SACA;EACI,iBAAiB;EACjB,kBAAkB;CACtB,CACJ;CACA,0CAA0C;CAC1C,2BAA2B,CACvB,SACA;EACI,mBAAmB;EACnB,sBAAsB;CAC1B,CACJ;CACA,sDAAsD;CACtD,oCAAoC;CACpC,qCAAqC,CACjC,SACA;EACI,UAAU;EACV,qBAAqB;EACrB,2BAA2B;EAC3B,0BAA0B;EAC1B,yBAAyB;CAC7B,CACJ;CACA,qDAAqD;AACzD;AAEA,MAAM,yBAAyB;CAC3B,yCAAyC,CACrC,SACA,EACI,gBAAgB,KACpB,CACJ;CACA,0CAA0C,CACtC,SACA,MACJ;CACA,sCAAsC,CAClC,SACA,EACI,wCAAwC,MAC5C,CACJ;CACA,sCAAsC,CAClC,SACA;EACI,yBAAyB;EACzB,UAAU;EACV,QAAQ;CACZ,CACJ;CACA,2BAA2B,CACvB,SACA;EACI,mCAAmC;EACnC,eAAe;EACf,iCAAiC;EACjC,mCAAmC;CACvC,CACJ;CACA,qCAAqC,CACjC,SACA,UACJ;CACA,iCAAiC,CAC7B,SACA,EACI,oBAAoB,KACxB,CACJ;CACA,mCAAmC,CAC/B,SACA,EACI,QAAQ,iBACZ,CACJ;CACA,mCAAmC;CACnC,2CAA2C;CAC3C,8BAA8B,CAC1B,SACA,EACI,mBAAmB,MACvB,CACJ;CACA,iCAAiC;CACjC,sCAAsC;AAC1C;AAEA,MAAM,8BAA8B;CAChC,gCAAgC,CAC5B,SACA,EACI,6BAA6B,MACjC,CACJ;CACA,8CAA8C;CAC9C,iDAAiD;CACjD,6CAA6C;CAC7C,6CAA6C;CAC7C,6CAA6C;CAC7C,wCAAwC;AAC5C;AAEA,MAAM,mBAAmB;CACrB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
declare const RULES_UNICORN_NURSERY: {
|
|
2
|
+
readonly "unicorn/no-useless-iterator-to-array": "error";
|
|
3
|
+
};
|
|
1
4
|
declare const RULES_UNICORN_PEDANTIC: {
|
|
2
5
|
readonly "unicorn/consistent-empty-array-spread": "error";
|
|
3
6
|
readonly "unicorn/explicit-length-check": ["error", {
|
|
@@ -28,6 +31,8 @@ declare const RULES_UNICORN_RESTRICTION: {
|
|
|
28
31
|
declare const RULES_UNICORN_STYLE: {
|
|
29
32
|
readonly "unicorn/consistent-date-clone": "error";
|
|
30
33
|
readonly "unicorn/consistent-existence-index-check": "error";
|
|
34
|
+
readonly "unicorn/consistent-template-literal-escape": "error";
|
|
35
|
+
readonly "unicorn/custom-error-definition": "error";
|
|
31
36
|
readonly "unicorn/empty-brace-spaces": "error";
|
|
32
37
|
readonly "unicorn/error-message": "error";
|
|
33
38
|
readonly "unicorn/no-array-method-this-argument": "error";
|
|
@@ -64,6 +69,7 @@ declare const RULES_UNICORN_STYLE: {
|
|
|
64
69
|
readonly "unicorn/relative-url-style": ["error", "always"];
|
|
65
70
|
readonly "unicorn/require-module-attributes": "error";
|
|
66
71
|
readonly "unicorn/switch-case-braces": "error";
|
|
72
|
+
readonly "unicorn/switch-case-break-position": "error";
|
|
67
73
|
readonly "unicorn/text-encoding-identifier-case": ["error", {
|
|
68
74
|
readonly withDash: true;
|
|
69
75
|
}];
|
|
@@ -76,7 +82,6 @@ declare const RULES_UNICORN_SUSPICIOUS: {
|
|
|
76
82
|
readonly "unicorn/no-array-sort": ["error", {
|
|
77
83
|
readonly allowExpressionStatement: true;
|
|
78
84
|
}];
|
|
79
|
-
readonly "unicorn/no-instanceof-builtins": ["allow"];
|
|
80
85
|
};
|
|
81
86
|
declare const RULES_UNICORN: {
|
|
82
87
|
readonly "unicorn/consistent-function-scoping": "error";
|
|
@@ -85,9 +90,10 @@ declare const RULES_UNICORN: {
|
|
|
85
90
|
readonly "unicorn/no-array-sort": ["error", {
|
|
86
91
|
readonly allowExpressionStatement: true;
|
|
87
92
|
}];
|
|
88
|
-
readonly "unicorn/no-instanceof-builtins": ["allow"];
|
|
89
93
|
readonly "unicorn/consistent-date-clone": "error";
|
|
90
94
|
readonly "unicorn/consistent-existence-index-check": "error";
|
|
95
|
+
readonly "unicorn/consistent-template-literal-escape": "error";
|
|
96
|
+
readonly "unicorn/custom-error-definition": "error";
|
|
91
97
|
readonly "unicorn/empty-brace-spaces": "error";
|
|
92
98
|
readonly "unicorn/error-message": "error";
|
|
93
99
|
readonly "unicorn/no-array-method-this-argument": "error";
|
|
@@ -124,6 +130,7 @@ declare const RULES_UNICORN: {
|
|
|
124
130
|
readonly "unicorn/relative-url-style": ["error", "always"];
|
|
125
131
|
readonly "unicorn/require-module-attributes": "error";
|
|
126
132
|
readonly "unicorn/switch-case-braces": "error";
|
|
133
|
+
readonly "unicorn/switch-case-break-position": "error";
|
|
127
134
|
readonly "unicorn/text-encoding-identifier-case": ["error", {
|
|
128
135
|
readonly withDash: true;
|
|
129
136
|
}];
|
|
@@ -151,6 +158,7 @@ declare const RULES_UNICORN: {
|
|
|
151
158
|
readonly "unicorn/prefer-math-min-max": "error";
|
|
152
159
|
readonly "unicorn/prefer-type-error": "error";
|
|
153
160
|
readonly "unicorn/require-number-to-fixed-digits-argument": "error";
|
|
161
|
+
readonly "unicorn/no-useless-iterator-to-array": "error";
|
|
154
162
|
};
|
|
155
|
-
export { RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS };
|
|
163
|
+
export { RULES_UNICORN, RULES_UNICORN_NURSERY, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS };
|
|
156
164
|
//# sourceMappingURL=unicorn.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
const RULES_UNICORN_NURSERY = { "unicorn/no-useless-iterator-to-array": "error" };
|
|
2
3
|
const RULES_UNICORN_PEDANTIC = {
|
|
3
4
|
"unicorn/consistent-empty-array-spread": "error",
|
|
4
5
|
"unicorn/explicit-length-check": ["error", { "non-zero": "greater-than" }],
|
|
@@ -25,6 +26,8 @@ const RULES_UNICORN_RESTRICTION = {
|
|
|
25
26
|
const RULES_UNICORN_STYLE = {
|
|
26
27
|
"unicorn/consistent-date-clone": "error",
|
|
27
28
|
"unicorn/consistent-existence-index-check": "error",
|
|
29
|
+
"unicorn/consistent-template-literal-escape": "error",
|
|
30
|
+
"unicorn/custom-error-definition": "error",
|
|
28
31
|
"unicorn/empty-brace-spaces": "error",
|
|
29
32
|
"unicorn/error-message": "error",
|
|
30
33
|
"unicorn/no-array-method-this-argument": "error",
|
|
@@ -61,6 +64,7 @@ const RULES_UNICORN_STYLE = {
|
|
|
61
64
|
"unicorn/relative-url-style": ["error", "always"],
|
|
62
65
|
"unicorn/require-module-attributes": "error",
|
|
63
66
|
"unicorn/switch-case-braces": "error",
|
|
67
|
+
"unicorn/switch-case-break-position": "error",
|
|
64
68
|
"unicorn/text-encoding-identifier-case": ["error", { withDash: true }],
|
|
65
69
|
"unicorn/throw-new-error": "error"
|
|
66
70
|
};
|
|
@@ -68,10 +72,10 @@ const RULES_UNICORN_SUSPICIOUS = {
|
|
|
68
72
|
"unicorn/consistent-function-scoping": "error",
|
|
69
73
|
"unicorn/no-accessor-recursion": "error",
|
|
70
74
|
"unicorn/no-array-reverse": "error",
|
|
71
|
-
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }]
|
|
72
|
-
"unicorn/no-instanceof-builtins": ["allow"]
|
|
75
|
+
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }]
|
|
73
76
|
};
|
|
74
77
|
const RULES_UNICORN = {
|
|
78
|
+
...RULES_UNICORN_NURSERY,
|
|
75
79
|
...RULES_UNICORN_PEDANTIC,
|
|
76
80
|
...RULES_UNICORN_RESTRICTION,
|
|
77
81
|
...RULES_UNICORN_STYLE,
|
|
@@ -79,6 +83,7 @@ const RULES_UNICORN = {
|
|
|
79
83
|
};
|
|
80
84
|
|
|
81
85
|
exports.RULES_UNICORN = RULES_UNICORN;
|
|
86
|
+
exports.RULES_UNICORN_NURSERY = RULES_UNICORN_NURSERY;
|
|
82
87
|
exports.RULES_UNICORN_PEDANTIC = RULES_UNICORN_PEDANTIC;
|
|
83
88
|
exports.RULES_UNICORN_RESTRICTION = RULES_UNICORN_RESTRICTION;
|
|
84
89
|
exports.RULES_UNICORN_STYLE = RULES_UNICORN_STYLE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.js","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n
|
|
1
|
+
{"version":3,"file":"unicorn.js","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_NURSERY = {\n \"unicorn/no-useless-iterator-to-array\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/consistent-template-literal-escape\": \"error\",\n \"unicorn/custom-error-definition\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/switch-case-break-position\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\n ...RULES_UNICORN_NURSERY,\n ...RULES_UNICORN_PEDANTIC,\n ...RULES_UNICORN_RESTRICTION,\n ...RULES_UNICORN_STYLE,\n ...RULES_UNICORN_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_UNICORN,\n RULES_UNICORN_NURSERY,\n RULES_UNICORN_PEDANTIC,\n RULES_UNICORN_RESTRICTION,\n RULES_UNICORN_STYLE,\n RULES_UNICORN_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,wBAAwB,EAC1B,wCAAwC,QAC5C;AAEA,MAAM,yBAAyB;CAC3B,yCAAyC;CACzC,iCAAiC,CAC7B,SACA,EACI,YAAY,eAChB,CACJ;CACA,4BAA4B;CAC5B,+BAA+B;CAC/B,yBAAyB;CACzB,2CAA2C;CAC3C,6CAA6C;CAC7C,oCAAoC;CACpC,6CAA6C,CACzC,SACA,EACI,aAAa,MACjB,CACJ;CACA,2BAA2B;CAC3B,+BAA+B;CAC/B,6BAA6B;CAC7B,mDAAmD;AACvD;AAEA,MAAM,4BAA4B;CAC9B,kCAAkC;CAClC,gCAAgC;CAChC,oCAAoC,CAChC,SACA;EACI,eAAe;EACf,UAAU;CACd,CACJ;AACJ;AAEA,MAAM,sBAAsB;CACxB,iCAAiC;CACjC,4CAA4C;CAC5C,8CAA8C;CAC9C,mCAAmC;CACnC,8BAA8B;CAC9B,yBAAyB;CACzB,yCAAyC;CACzC,6CAA6C;CAC7C,0CAA0C;CAC1C,oCAAoC,CAChC,SACA;EACI,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,aAAa;GACT,aAAa;GACb,eAAe;EACnB;EACA,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,OAAO;GACH,aAAa;GACb,eAAe;EACnB;EACA,yBAAyB;CAC7B,CACJ;CACA,mCAAmC;CACnC,wCAAwC;CACxC,8BAA8B;CAC9B,2BAA2B;CAC3B,qCAAqC;CACrC,kCAAkC;CAClC,sCAAsC;CACtC,uCAAuC;CACvC,wCAAwC;CACxC,8BAA8B,CAC1B,SACA,QACJ;CACA,qCAAqC;CACrC,8BAA8B;CAC9B,sCAAsC;CACtC,yCAAyC,CACrC,SACA,EACI,UAAU,KACd,CACJ;CACA,2BAA2B;AAC/B;AAEA,MAAM,2BAA2B;CAC7B,uCAAuC;CACvC,iCAAiC;CACjC,4BAA4B;CAC5B,yBAAyB,CACrB,SACA,EACI,0BAA0B,KAC9B,CACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const RULES_UNICORN_NURSERY = { "unicorn/no-useless-iterator-to-array": "error" };
|
|
1
2
|
const RULES_UNICORN_PEDANTIC = {
|
|
2
3
|
"unicorn/consistent-empty-array-spread": "error",
|
|
3
4
|
"unicorn/explicit-length-check": ["error", { "non-zero": "greater-than" }],
|
|
@@ -24,6 +25,8 @@ const RULES_UNICORN_RESTRICTION = {
|
|
|
24
25
|
const RULES_UNICORN_STYLE = {
|
|
25
26
|
"unicorn/consistent-date-clone": "error",
|
|
26
27
|
"unicorn/consistent-existence-index-check": "error",
|
|
28
|
+
"unicorn/consistent-template-literal-escape": "error",
|
|
29
|
+
"unicorn/custom-error-definition": "error",
|
|
27
30
|
"unicorn/empty-brace-spaces": "error",
|
|
28
31
|
"unicorn/error-message": "error",
|
|
29
32
|
"unicorn/no-array-method-this-argument": "error",
|
|
@@ -60,6 +63,7 @@ const RULES_UNICORN_STYLE = {
|
|
|
60
63
|
"unicorn/relative-url-style": ["error", "always"],
|
|
61
64
|
"unicorn/require-module-attributes": "error",
|
|
62
65
|
"unicorn/switch-case-braces": "error",
|
|
66
|
+
"unicorn/switch-case-break-position": "error",
|
|
63
67
|
"unicorn/text-encoding-identifier-case": ["error", { withDash: true }],
|
|
64
68
|
"unicorn/throw-new-error": "error"
|
|
65
69
|
};
|
|
@@ -67,15 +71,15 @@ const RULES_UNICORN_SUSPICIOUS = {
|
|
|
67
71
|
"unicorn/consistent-function-scoping": "error",
|
|
68
72
|
"unicorn/no-accessor-recursion": "error",
|
|
69
73
|
"unicorn/no-array-reverse": "error",
|
|
70
|
-
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }]
|
|
71
|
-
"unicorn/no-instanceof-builtins": ["allow"]
|
|
74
|
+
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }]
|
|
72
75
|
};
|
|
73
76
|
const RULES_UNICORN = {
|
|
77
|
+
...RULES_UNICORN_NURSERY,
|
|
74
78
|
...RULES_UNICORN_PEDANTIC,
|
|
75
79
|
...RULES_UNICORN_RESTRICTION,
|
|
76
80
|
...RULES_UNICORN_STYLE,
|
|
77
81
|
...RULES_UNICORN_SUSPICIOUS
|
|
78
82
|
};
|
|
79
83
|
|
|
80
|
-
export { RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS };
|
|
84
|
+
export { RULES_UNICORN, RULES_UNICORN_NURSERY, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS };
|
|
81
85
|
//# sourceMappingURL=unicorn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n
|
|
1
|
+
{"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_NURSERY = {\n \"unicorn/no-useless-iterator-to-array\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/consistent-template-literal-escape\": \"error\",\n \"unicorn/custom-error-definition\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/switch-case-break-position\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\n ...RULES_UNICORN_NURSERY,\n ...RULES_UNICORN_PEDANTIC,\n ...RULES_UNICORN_RESTRICTION,\n ...RULES_UNICORN_STYLE,\n ...RULES_UNICORN_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_UNICORN,\n RULES_UNICORN_NURSERY,\n RULES_UNICORN_PEDANTIC,\n RULES_UNICORN_RESTRICTION,\n RULES_UNICORN_STYLE,\n RULES_UNICORN_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,wBAAwB,EAC1B,wCAAwC,QAC5C;AAEA,MAAM,yBAAyB;CAC3B,yCAAyC;CACzC,iCAAiC,CAC7B,SACA,EACI,YAAY,eAChB,CACJ;CACA,4BAA4B;CAC5B,+BAA+B;CAC/B,yBAAyB;CACzB,2CAA2C;CAC3C,6CAA6C;CAC7C,oCAAoC;CACpC,6CAA6C,CACzC,SACA,EACI,aAAa,MACjB,CACJ;CACA,2BAA2B;CAC3B,+BAA+B;CAC/B,6BAA6B;CAC7B,mDAAmD;AACvD;AAEA,MAAM,4BAA4B;CAC9B,kCAAkC;CAClC,gCAAgC;CAChC,oCAAoC,CAChC,SACA;EACI,eAAe;EACf,UAAU;CACd,CACJ;AACJ;AAEA,MAAM,sBAAsB;CACxB,iCAAiC;CACjC,4CAA4C;CAC5C,8CAA8C;CAC9C,mCAAmC;CACnC,8BAA8B;CAC9B,yBAAyB;CACzB,yCAAyC;CACzC,6CAA6C;CAC7C,0CAA0C;CAC1C,oCAAoC,CAChC,SACA;EACI,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,aAAa;GACT,aAAa;GACb,eAAe;EACnB;EACA,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,OAAO;GACH,aAAa;GACb,eAAe;EACnB;EACA,yBAAyB;CAC7B,CACJ;CACA,mCAAmC;CACnC,wCAAwC;CACxC,8BAA8B;CAC9B,2BAA2B;CAC3B,qCAAqC;CACrC,kCAAkC;CAClC,sCAAsC;CACtC,uCAAuC;CACvC,wCAAwC;CACxC,8BAA8B,CAC1B,SACA,QACJ;CACA,qCAAqC;CACrC,8BAA8B;CAC9B,sCAAsC;CACtC,yCAAyC,CACrC,SACA,EACI,UAAU,KACd,CACJ;CACA,2BAA2B;AAC/B;AAEA,MAAM,2BAA2B;CAC7B,uCAAuC;CACvC,iCAAiC;CACjC,4BAA4B;CAC5B,yBAAyB,CACrB,SACA,EACI,0BAA0B,KAC9B,CACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
const require_index = require('../plugin/index.js');
|
|
2
2
|
const require_jsx_a11y = require('../rules/jsx-a11y.js');
|
|
3
|
-
let es_toolkit = require("es-toolkit");
|
|
4
3
|
|
|
5
4
|
const jsxPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...require_index.PLUGIN_JSX],
|
|
9
8
|
rules: { ...require_jsx_a11y.RULES_JSX_A11Y }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLUGIN_JSX","RULES_JSX_A11Y"],"sources":["../../../../src/presets/jsx/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_JSX","RULES_JSX_A11Y"],"sources":["../../../../src/presets/jsx/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_JSX } from \"#/presets/jsx/plugin\";\nimport { RULES_JSX_A11Y } from \"#/presets/jsx/rules/jsx-a11y\";\n\nconst jsxPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_JSX,\n ],\n rules: {\n ...RULES_JSX_A11Y,\n },\n },\n };\n };\n};\n\nexport { jsxPreset };\n"],"mappings":";;;AAKA,MAAM,kBAA0B;CAC5B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAGA,wBACP;GACA,OAAO,EACH,GAAGC,gCACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PLUGIN_JSX } from "../plugin/index.mjs";
|
|
2
2
|
import { RULES_JSX_A11Y } from "../rules/jsx-a11y.mjs";
|
|
3
|
-
import { toMerged } from "es-toolkit";
|
|
4
3
|
|
|
5
4
|
const jsxPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...PLUGIN_JSX],
|
|
9
8
|
rules: { ...RULES_JSX_A11Y }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/jsx/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/jsx/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_JSX } from \"#/presets/jsx/plugin\";\nimport { RULES_JSX_A11Y } from \"#/presets/jsx/rules/jsx-a11y\";\n\nconst jsxPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_JSX,\n ],\n rules: {\n ...RULES_JSX_A11Y,\n },\n },\n };\n };\n};\n\nexport { jsxPreset };\n"],"mappings":";;;AAKA,MAAM,kBAA0B;CAC5B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAG,UACP;GACA,OAAO,EACH,GAAG,eACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -9,9 +9,17 @@ declare const RULES_JSX_A11Y_CORRECTNESS: {
|
|
|
9
9
|
readonly "jsx-a11y/heading-has-content": "error";
|
|
10
10
|
readonly "jsx-a11y/html-has-lang": "error";
|
|
11
11
|
readonly "jsx-a11y/iframe-has-title": "error";
|
|
12
|
+
readonly "jsx-a11y/interactive-supports-focus": "error";
|
|
12
13
|
readonly "jsx-a11y/lang": "error";
|
|
13
14
|
readonly "jsx-a11y/mouse-events-have-key-events": "error";
|
|
14
15
|
readonly "jsx-a11y/no-aria-hidden-on-focusable": "error";
|
|
16
|
+
readonly "jsx-a11y/no-interactive-element-to-noninteractive-role": "error";
|
|
17
|
+
readonly "jsx-a11y/no-noninteractive-element-interactions": "error";
|
|
18
|
+
readonly "jsx-a11y/no-noninteractive-element-to-interactive-role": "error";
|
|
19
|
+
readonly "jsx-a11y/no-static-element-interactions": ["error", {
|
|
20
|
+
readonly allowExpressionValues: true;
|
|
21
|
+
readonly handlers: ["onClick", "onKeyPress", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp"];
|
|
22
|
+
}];
|
|
15
23
|
readonly "jsx-a11y/prefer-tag-over-role": "error";
|
|
16
24
|
readonly "jsx-a11y/tabindex-no-positive": "error";
|
|
17
25
|
};
|
|
@@ -26,9 +34,17 @@ declare const RULES_JSX_A11Y: {
|
|
|
26
34
|
readonly "jsx-a11y/heading-has-content": "error";
|
|
27
35
|
readonly "jsx-a11y/html-has-lang": "error";
|
|
28
36
|
readonly "jsx-a11y/iframe-has-title": "error";
|
|
37
|
+
readonly "jsx-a11y/interactive-supports-focus": "error";
|
|
29
38
|
readonly "jsx-a11y/lang": "error";
|
|
30
39
|
readonly "jsx-a11y/mouse-events-have-key-events": "error";
|
|
31
40
|
readonly "jsx-a11y/no-aria-hidden-on-focusable": "error";
|
|
41
|
+
readonly "jsx-a11y/no-interactive-element-to-noninteractive-role": "error";
|
|
42
|
+
readonly "jsx-a11y/no-noninteractive-element-interactions": "error";
|
|
43
|
+
readonly "jsx-a11y/no-noninteractive-element-to-interactive-role": "error";
|
|
44
|
+
readonly "jsx-a11y/no-static-element-interactions": ["error", {
|
|
45
|
+
readonly allowExpressionValues: true;
|
|
46
|
+
readonly handlers: ["onClick", "onKeyPress", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp"];
|
|
47
|
+
}];
|
|
32
48
|
readonly "jsx-a11y/prefer-tag-over-role": "error";
|
|
33
49
|
readonly "jsx-a11y/tabindex-no-positive": "error";
|
|
34
50
|
};
|
|
@@ -10,9 +10,24 @@ const RULES_JSX_A11Y_CORRECTNESS = {
|
|
|
10
10
|
"jsx-a11y/heading-has-content": "error",
|
|
11
11
|
"jsx-a11y/html-has-lang": "error",
|
|
12
12
|
"jsx-a11y/iframe-has-title": "error",
|
|
13
|
+
"jsx-a11y/interactive-supports-focus": "error",
|
|
13
14
|
"jsx-a11y/lang": "error",
|
|
14
15
|
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
15
16
|
"jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
17
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
18
|
+
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
19
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
20
|
+
"jsx-a11y/no-static-element-interactions": ["error", {
|
|
21
|
+
allowExpressionValues: true,
|
|
22
|
+
handlers: [
|
|
23
|
+
"onClick",
|
|
24
|
+
"onKeyPress",
|
|
25
|
+
"onKeyDown",
|
|
26
|
+
"onKeyUp",
|
|
27
|
+
"onMouseDown",
|
|
28
|
+
"onMouseUp"
|
|
29
|
+
]
|
|
30
|
+
}],
|
|
16
31
|
"jsx-a11y/prefer-tag-over-role": "error",
|
|
17
32
|
"jsx-a11y/tabindex-no-positive": "error"
|
|
18
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-a11y.js","names":[],"sources":["../../../../src/presets/jsx/rules/jsx-a11y.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_JSX_A11Y_CORRECTNESS = {\n \"jsx-a11y/alt-text\": \"error\",\n \"jsx-a11y/anchor-has-content\": \"error\",\n \"jsx-a11y/anchor-is-valid\": \"error\",\n \"jsx-a11y/aria-props\": \"error\",\n \"jsx-a11y/aria-proptypes\": \"error\",\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n \"jsx-a11y/heading-has-content\": \"error\",\n \"jsx-a11y/html-has-lang\": \"error\",\n \"jsx-a11y/iframe-has-title\": \"error\",\n \"jsx-a11y/lang\": \"error\",\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n \"jsx-a11y/no-aria-hidden-on-focusable\": \"error\",\n \"jsx-a11y/prefer-tag-over-role\": \"error\",\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_JSX_A11Y = {\n ...RULES_JSX_A11Y_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS };\n"],"mappings":";AAEA,MAAM,6BAA6B;CAC/B,qBAAqB;CACrB,+BAA+B;CAC/B,4BAA4B;CAC5B,uBAAuB;CACvB,2BAA2B;CAC3B,sCAAsC;CACtC,yCAAyC;CACzC,gCAAgC;CAChC,0BAA0B;CAC1B,6BAA6B;CAC7B,iBAAiB;CACjB,yCAAyC;CACzC,wCAAwC;CACxC,iCAAiC;CACjC,iCAAiC;AACrC;AAEA,MAAM,iBAAiB,EACnB,GAAG,2BACP"}
|
|
1
|
+
{"version":3,"file":"jsx-a11y.js","names":[],"sources":["../../../../src/presets/jsx/rules/jsx-a11y.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_JSX_A11Y_CORRECTNESS = {\n \"jsx-a11y/alt-text\": \"error\",\n \"jsx-a11y/anchor-has-content\": \"error\",\n \"jsx-a11y/anchor-is-valid\": \"error\",\n \"jsx-a11y/aria-props\": \"error\",\n \"jsx-a11y/aria-proptypes\": \"error\",\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n \"jsx-a11y/heading-has-content\": \"error\",\n \"jsx-a11y/html-has-lang\": \"error\",\n \"jsx-a11y/iframe-has-title\": \"error\",\n \"jsx-a11y/interactive-supports-focus\": \"error\",\n \"jsx-a11y/lang\": \"error\",\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n \"jsx-a11y/no-aria-hidden-on-focusable\": \"error\",\n \"jsx-a11y/no-interactive-element-to-noninteractive-role\": \"error\",\n \"jsx-a11y/no-noninteractive-element-interactions\": \"error\",\n \"jsx-a11y/no-noninteractive-element-to-interactive-role\": \"error\",\n \"jsx-a11y/no-static-element-interactions\": [\n \"error\",\n {\n allowExpressionValues: true,\n handlers: [\n \"onClick\",\n // key\n \"onKeyPress\",\n \"onKeyDown\",\n \"onKeyUp\",\n // mouse\n \"onMouseDown\",\n \"onMouseUp\",\n ],\n },\n ],\n \"jsx-a11y/prefer-tag-over-role\": \"error\",\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_JSX_A11Y = {\n ...RULES_JSX_A11Y_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS };\n"],"mappings":";AAEA,MAAM,6BAA6B;CAC/B,qBAAqB;CACrB,+BAA+B;CAC/B,4BAA4B;CAC5B,uBAAuB;CACvB,2BAA2B;CAC3B,sCAAsC;CACtC,yCAAyC;CACzC,gCAAgC;CAChC,0BAA0B;CAC1B,6BAA6B;CAC7B,uCAAuC;CACvC,iBAAiB;CACjB,yCAAyC;CACzC,wCAAwC;CACxC,0DAA0D;CAC1D,mDAAmD;CACnD,0DAA0D;CAC1D,2CAA2C,CACvC,SACA;EACI,uBAAuB;EACvB,UAAU;GACN;GAEA;GACA;GACA;GAEA;GACA;EACJ;CACJ,CACJ;CACA,iCAAiC;CACjC,iCAAiC;AACrC;AAEA,MAAM,iBAAiB,EACnB,GAAG,2BACP"}
|
|
@@ -9,9 +9,24 @@ const RULES_JSX_A11Y_CORRECTNESS = {
|
|
|
9
9
|
"jsx-a11y/heading-has-content": "error",
|
|
10
10
|
"jsx-a11y/html-has-lang": "error",
|
|
11
11
|
"jsx-a11y/iframe-has-title": "error",
|
|
12
|
+
"jsx-a11y/interactive-supports-focus": "error",
|
|
12
13
|
"jsx-a11y/lang": "error",
|
|
13
14
|
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
14
15
|
"jsx-a11y/no-aria-hidden-on-focusable": "error",
|
|
16
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
17
|
+
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
18
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
19
|
+
"jsx-a11y/no-static-element-interactions": ["error", {
|
|
20
|
+
allowExpressionValues: true,
|
|
21
|
+
handlers: [
|
|
22
|
+
"onClick",
|
|
23
|
+
"onKeyPress",
|
|
24
|
+
"onKeyDown",
|
|
25
|
+
"onKeyUp",
|
|
26
|
+
"onMouseDown",
|
|
27
|
+
"onMouseUp"
|
|
28
|
+
]
|
|
29
|
+
}],
|
|
15
30
|
"jsx-a11y/prefer-tag-over-role": "error",
|
|
16
31
|
"jsx-a11y/tabindex-no-positive": "error"
|
|
17
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-a11y.mjs","names":[],"sources":["../../../../src/presets/jsx/rules/jsx-a11y.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_JSX_A11Y_CORRECTNESS = {\n \"jsx-a11y/alt-text\": \"error\",\n \"jsx-a11y/anchor-has-content\": \"error\",\n \"jsx-a11y/anchor-is-valid\": \"error\",\n \"jsx-a11y/aria-props\": \"error\",\n \"jsx-a11y/aria-proptypes\": \"error\",\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n \"jsx-a11y/heading-has-content\": \"error\",\n \"jsx-a11y/html-has-lang\": \"error\",\n \"jsx-a11y/iframe-has-title\": \"error\",\n \"jsx-a11y/lang\": \"error\",\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n \"jsx-a11y/no-aria-hidden-on-focusable\": \"error\",\n \"jsx-a11y/prefer-tag-over-role\": \"error\",\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_JSX_A11Y = {\n ...RULES_JSX_A11Y_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS };\n"],"mappings":"AAEA,MAAM,6BAA6B;CAC/B,qBAAqB;CACrB,+BAA+B;CAC/B,4BAA4B;CAC5B,uBAAuB;CACvB,2BAA2B;CAC3B,sCAAsC;CACtC,yCAAyC;CACzC,gCAAgC;CAChC,0BAA0B;CAC1B,6BAA6B;CAC7B,iBAAiB;CACjB,yCAAyC;CACzC,wCAAwC;CACxC,iCAAiC;CACjC,iCAAiC;AACrC;AAEA,MAAM,iBAAiB,EACnB,GAAG,2BACP"}
|
|
1
|
+
{"version":3,"file":"jsx-a11y.mjs","names":[],"sources":["../../../../src/presets/jsx/rules/jsx-a11y.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_JSX_A11Y_CORRECTNESS = {\n \"jsx-a11y/alt-text\": \"error\",\n \"jsx-a11y/anchor-has-content\": \"error\",\n \"jsx-a11y/anchor-is-valid\": \"error\",\n \"jsx-a11y/aria-props\": \"error\",\n \"jsx-a11y/aria-proptypes\": \"error\",\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n \"jsx-a11y/heading-has-content\": \"error\",\n \"jsx-a11y/html-has-lang\": \"error\",\n \"jsx-a11y/iframe-has-title\": \"error\",\n \"jsx-a11y/interactive-supports-focus\": \"error\",\n \"jsx-a11y/lang\": \"error\",\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n \"jsx-a11y/no-aria-hidden-on-focusable\": \"error\",\n \"jsx-a11y/no-interactive-element-to-noninteractive-role\": \"error\",\n \"jsx-a11y/no-noninteractive-element-interactions\": \"error\",\n \"jsx-a11y/no-noninteractive-element-to-interactive-role\": \"error\",\n \"jsx-a11y/no-static-element-interactions\": [\n \"error\",\n {\n allowExpressionValues: true,\n handlers: [\n \"onClick\",\n // key\n \"onKeyPress\",\n \"onKeyDown\",\n \"onKeyUp\",\n // mouse\n \"onMouseDown\",\n \"onMouseUp\",\n ],\n },\n ],\n \"jsx-a11y/prefer-tag-over-role\": \"error\",\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_JSX_A11Y = {\n ...RULES_JSX_A11Y_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS };\n"],"mappings":"AAEA,MAAM,6BAA6B;CAC/B,qBAAqB;CACrB,+BAA+B;CAC/B,4BAA4B;CAC5B,uBAAuB;CACvB,2BAA2B;CAC3B,sCAAsC;CACtC,yCAAyC;CACzC,gCAAgC;CAChC,0BAA0B;CAC1B,6BAA6B;CAC7B,uCAAuC;CACvC,iBAAiB;CACjB,yCAAyC;CACzC,wCAAwC;CACxC,0DAA0D;CAC1D,mDAAmD;CACnD,0DAA0D;CAC1D,2CAA2C,CACvC,SACA;EACI,uBAAuB;EACvB,UAAU;GACN;GAEA;GACA;GACA;GAEA;GACA;EACJ;CACJ,CACJ;CACA,iCAAiC;CACjC,iCAAiC;AACrC;AAEA,MAAM,iBAAiB,EACnB,GAAG,2BACP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { PLUGIN_NEXT } from "./plugin/index.js";
|
|
2
2
|
import { nextPreset } from "./preset/index.js";
|
|
3
|
-
|
|
3
|
+
import { RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS } from "./rules/nextjs.js";
|
|
4
|
+
export { PLUGIN_NEXT, RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS, nextPreset };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_index = require('./plugin/index.js');
|
|
3
|
+
const require_nextjs = require('./rules/nextjs.js');
|
|
3
4
|
const require_index$1 = require('./preset/index.js');
|
|
4
5
|
|
|
5
6
|
exports.PLUGIN_NEXT = require_index.PLUGIN_NEXT;
|
|
7
|
+
exports.RULES_NEXTJS = require_nextjs.RULES_NEXTJS;
|
|
8
|
+
exports.RULES_NEXTJS_CORRECTNESS = require_nextjs.RULES_NEXTJS_CORRECTNESS;
|
|
6
9
|
exports.nextPreset = require_index$1.nextPreset;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PLUGIN_NEXT } from "./plugin/index.mjs";
|
|
2
|
+
import { RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS } from "./rules/nextjs.mjs";
|
|
2
3
|
import { nextPreset } from "./preset/index.mjs";
|
|
3
4
|
|
|
4
|
-
export { PLUGIN_NEXT, nextPreset };
|
|
5
|
+
export { PLUGIN_NEXT, RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS, nextPreset };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
const require_index = require('../plugin/index.js');
|
|
2
2
|
const require_nextjs = require('../rules/nextjs.js');
|
|
3
|
-
let es_toolkit = require("es-toolkit");
|
|
4
3
|
|
|
5
4
|
const nextPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...require_index.PLUGIN_NEXT],
|
|
9
8
|
rules: { ...require_nextjs.RULES_NEXTJS }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLUGIN_NEXT","RULES_NEXTJS"],"sources":["../../../../src/presets/next/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_NEXT","RULES_NEXTJS"],"sources":["../../../../src/presets/next/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_NEXT } from \"#/presets/next/plugin\";\nimport { RULES_NEXTJS } from \"#/presets/next/rules/nextjs\";\n\nconst nextPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_NEXT,\n ],\n rules: {\n ...RULES_NEXTJS,\n },\n },\n };\n };\n};\n\nexport { nextPreset };\n"],"mappings":";;;AAKA,MAAM,mBAA2B;CAC7B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAGA,yBACP;GACA,OAAO,EACH,GAAGC,4BACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PLUGIN_NEXT } from "../plugin/index.mjs";
|
|
2
2
|
import { RULES_NEXTJS } from "../rules/nextjs.mjs";
|
|
3
|
-
import { toMerged } from "es-toolkit";
|
|
4
3
|
|
|
5
4
|
const nextPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...PLUGIN_NEXT],
|
|
9
8
|
rules: { ...RULES_NEXTJS }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/next/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/next/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_NEXT } from \"#/presets/next/plugin\";\nimport { RULES_NEXTJS } from \"#/presets/next/rules/nextjs\";\n\nconst nextPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_NEXT,\n ],\n rules: {\n ...RULES_NEXTJS,\n },\n },\n };\n };\n};\n\nexport { nextPreset };\n"],"mappings":";;;AAKA,MAAM,mBAA2B;CAC7B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAG,WACP;GACA,OAAO,EACH,GAAG,aACP;EACJ,EACJ;CACJ;AACJ"}
|