@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.
Files changed (157) hide show
  1. package/LICENSE +21 -0
  2. package/dist/@types/preset.d.ts +25 -0
  3. package/dist/constants/default.d.ts +8 -0
  4. package/dist/constants/default.js +10 -0
  5. package/dist/constants/default.js.map +1 -0
  6. package/dist/constants/default.mjs +9 -0
  7. package/dist/constants/default.mjs.map +1 -0
  8. package/dist/constants/ignore-patterns.d.ts +3 -0
  9. package/dist/constants/ignore-patterns.js +26 -0
  10. package/dist/constants/ignore-patterns.js.map +1 -0
  11. package/dist/constants/ignore-patterns.mjs +24 -0
  12. package/dist/constants/ignore-patterns.mjs.map +1 -0
  13. package/dist/functions/define.d.ts +46 -0
  14. package/dist/functions/define.js +19 -0
  15. package/dist/functions/define.js.map +1 -0
  16. package/dist/functions/define.mjs +19 -0
  17. package/dist/functions/define.mjs.map +1 -0
  18. package/dist/functions/merge.js +11 -0
  19. package/dist/functions/merge.js.map +1 -0
  20. package/dist/functions/merge.mjs +11 -0
  21. package/dist/functions/merge.mjs.map +1 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/index.js +4 -0
  24. package/dist/index.mjs +3 -0
  25. package/dist/presets/common/index.d.ts +9 -0
  26. package/dist/presets/common/index.js +45 -0
  27. package/dist/presets/common/index.mjs +10 -0
  28. package/dist/presets/common/plugin/index.d.ts +3 -0
  29. package/dist/presets/common/plugin/index.js +12 -0
  30. package/dist/presets/common/plugin/index.js.map +1 -0
  31. package/dist/presets/common/plugin/index.mjs +11 -0
  32. package/dist/presets/common/plugin/index.mjs.map +1 -0
  33. package/dist/presets/common/preset/index.d.ts +4 -0
  34. package/dist/presets/common/preset/index.js +27 -0
  35. package/dist/presets/common/preset/index.js.map +1 -0
  36. package/dist/presets/common/preset/index.mjs +27 -0
  37. package/dist/presets/common/preset/index.mjs.map +1 -0
  38. package/dist/presets/common/rules/eslint.d.ts +174 -0
  39. package/dist/presets/common/rules/eslint.js +93 -0
  40. package/dist/presets/common/rules/eslint.js.map +1 -0
  41. package/dist/presets/common/rules/eslint.mjs +86 -0
  42. package/dist/presets/common/rules/eslint.mjs.map +1 -0
  43. package/dist/presets/common/rules/import.d.ts +64 -0
  44. package/dist/presets/common/rules/import.js +55 -0
  45. package/dist/presets/common/rules/import.js.map +1 -0
  46. package/dist/presets/common/rules/import.mjs +49 -0
  47. package/dist/presets/common/rules/import.mjs.map +1 -0
  48. package/dist/presets/common/rules/oxc.d.ts +15 -0
  49. package/dist/presets/common/rules/oxc.js +18 -0
  50. package/dist/presets/common/rules/oxc.js.map +1 -0
  51. package/dist/presets/common/rules/oxc.mjs +15 -0
  52. package/dist/presets/common/rules/oxc.mjs.map +1 -0
  53. package/dist/presets/common/rules/promise.d.ts +34 -0
  54. package/dist/presets/common/rules/promise.js +30 -0
  55. package/dist/presets/common/rules/promise.js.map +1 -0
  56. package/dist/presets/common/rules/promise.mjs +24 -0
  57. package/dist/presets/common/rules/promise.mjs.map +1 -0
  58. package/dist/presets/common/rules/typescript.d.ts +288 -0
  59. package/dist/presets/common/rules/typescript.js +149 -0
  60. package/dist/presets/common/rules/typescript.js.map +1 -0
  61. package/dist/presets/common/rules/typescript.mjs +143 -0
  62. package/dist/presets/common/rules/typescript.mjs.map +1 -0
  63. package/dist/presets/common/rules/unicorn.d.ts +168 -0
  64. package/dist/presets/common/rules/unicorn.js +90 -0
  65. package/dist/presets/common/rules/unicorn.js.map +1 -0
  66. package/dist/presets/common/rules/unicorn.mjs +85 -0
  67. package/dist/presets/common/rules/unicorn.mjs.map +1 -0
  68. package/dist/presets/jsx/index.d.ts +4 -0
  69. package/dist/presets/jsx/index.js +9 -0
  70. package/dist/presets/jsx/index.mjs +5 -0
  71. package/dist/presets/jsx/plugin/index.d.ts +3 -0
  72. package/dist/presets/jsx/plugin/index.js +5 -0
  73. package/dist/presets/jsx/plugin/index.js.map +1 -0
  74. package/dist/presets/jsx/plugin/index.mjs +4 -0
  75. package/dist/presets/jsx/plugin/index.mjs.map +1 -0
  76. package/dist/presets/jsx/preset/index.d.ts +4 -0
  77. package/dist/presets/jsx/preset/index.js +15 -0
  78. package/dist/presets/jsx/preset/index.js.map +1 -0
  79. package/dist/presets/jsx/preset/index.mjs +15 -0
  80. package/dist/presets/jsx/preset/index.mjs.map +1 -0
  81. package/dist/presets/jsx/rules/jsx-a11y.d.ts +36 -0
  82. package/dist/presets/jsx/rules/jsx-a11y.js +23 -0
  83. package/dist/presets/jsx/rules/jsx-a11y.js.map +1 -0
  84. package/dist/presets/jsx/rules/jsx-a11y.mjs +21 -0
  85. package/dist/presets/jsx/rules/jsx-a11y.mjs.map +1 -0
  86. package/dist/presets/next/index.d.ts +3 -0
  87. package/dist/presets/next/index.js +6 -0
  88. package/dist/presets/next/index.mjs +4 -0
  89. package/dist/presets/next/plugin/index.d.ts +3 -0
  90. package/dist/presets/next/plugin/index.js +5 -0
  91. package/dist/presets/next/plugin/index.js.map +1 -0
  92. package/dist/presets/next/plugin/index.mjs +4 -0
  93. package/dist/presets/next/plugin/index.mjs.map +1 -0
  94. package/dist/presets/next/preset/index.d.ts +4 -0
  95. package/dist/presets/next/preset/index.js +15 -0
  96. package/dist/presets/next/preset/index.js.map +1 -0
  97. package/dist/presets/next/preset/index.mjs +15 -0
  98. package/dist/presets/next/preset/index.mjs.map +1 -0
  99. package/dist/presets/next/rules/nextjs.js +26 -0
  100. package/dist/presets/next/rules/nextjs.js.map +1 -0
  101. package/dist/presets/next/rules/nextjs.mjs +25 -0
  102. package/dist/presets/next/rules/nextjs.mjs.map +1 -0
  103. package/dist/presets/node/index.d.ts +4 -0
  104. package/dist/presets/node/index.js +10 -0
  105. package/dist/presets/node/index.mjs +5 -0
  106. package/dist/presets/node/plugin/index.d.ts +3 -0
  107. package/dist/presets/node/plugin/index.js +5 -0
  108. package/dist/presets/node/plugin/index.js.map +1 -0
  109. package/dist/presets/node/plugin/index.mjs +4 -0
  110. package/dist/presets/node/plugin/index.mjs.map +1 -0
  111. package/dist/presets/node/preset/index.d.ts +4 -0
  112. package/dist/presets/node/preset/index.js +15 -0
  113. package/dist/presets/node/preset/index.js.map +1 -0
  114. package/dist/presets/node/preset/index.mjs +15 -0
  115. package/dist/presets/node/preset/index.mjs.map +1 -0
  116. package/dist/presets/node/rules/node.d.ts +16 -0
  117. package/dist/presets/node/rules/node.js +16 -0
  118. package/dist/presets/node/rules/node.js.map +1 -0
  119. package/dist/presets/node/rules/node.mjs +13 -0
  120. package/dist/presets/node/rules/node.mjs.map +1 -0
  121. package/dist/presets/react/index.d.ts +4 -0
  122. package/dist/presets/react/index.js +14 -0
  123. package/dist/presets/react/index.mjs +5 -0
  124. package/dist/presets/react/plugin/index.d.ts +3 -0
  125. package/dist/presets/react/plugin/index.js +5 -0
  126. package/dist/presets/react/plugin/index.js.map +1 -0
  127. package/dist/presets/react/plugin/index.mjs +4 -0
  128. package/dist/presets/react/plugin/index.mjs.map +1 -0
  129. package/dist/presets/react/preset/index.d.ts +4 -0
  130. package/dist/presets/react/preset/index.js +15 -0
  131. package/dist/presets/react/preset/index.js.map +1 -0
  132. package/dist/presets/react/preset/index.mjs +15 -0
  133. package/dist/presets/react/preset/index.mjs.map +1 -0
  134. package/dist/presets/react/rules/react.d.ts +130 -0
  135. package/dist/presets/react/rules/react.js +83 -0
  136. package/dist/presets/react/rules/react.js.map +1 -0
  137. package/dist/presets/react/rules/react.mjs +76 -0
  138. package/dist/presets/react/rules/react.mjs.map +1 -0
  139. package/dist/presets/vitest/index.d.ts +4 -0
  140. package/dist/presets/vitest/index.js +10 -0
  141. package/dist/presets/vitest/index.mjs +5 -0
  142. package/dist/presets/vitest/plugin/index.d.ts +3 -0
  143. package/dist/presets/vitest/plugin/index.js +5 -0
  144. package/dist/presets/vitest/plugin/index.js.map +1 -0
  145. package/dist/presets/vitest/plugin/index.mjs +4 -0
  146. package/dist/presets/vitest/plugin/index.mjs.map +1 -0
  147. package/dist/presets/vitest/preset/index.d.ts +4 -0
  148. package/dist/presets/vitest/preset/index.js +15 -0
  149. package/dist/presets/vitest/preset/index.js.map +1 -0
  150. package/dist/presets/vitest/preset/index.mjs +15 -0
  151. package/dist/presets/vitest/preset/index.mjs.map +1 -0
  152. package/dist/presets/vitest/rules/vitest.d.ts +42 -0
  153. package/dist/presets/vitest/rules/vitest.js +27 -0
  154. package/dist/presets/vitest/rules/vitest.js.map +1 -0
  155. package/dist/presets/vitest/rules/vitest.mjs +24 -0
  156. package/dist/presets/vitest/rules/vitest.mjs.map +1 -0
  157. package/package.json +97 -0
@@ -0,0 +1,143 @@
1
+ const RULES_TYPESCRIPT_NURSERY = {
2
+ "typescript/consistent-return": ["error", { treatUndefinedAsUnspecified: false }],
3
+ "typescript/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: false }],
4
+ "typescript/dot-notation": ["error", {
5
+ allowIndexSignaturePropertyAccess: false,
6
+ allowKeywords: true,
7
+ allowPrivateClassPropertyAccess: false,
8
+ allowProtectedClassPropertyAccess: false
9
+ }],
10
+ "typescript/no-unnecessary-type-conversion": "error",
11
+ "typescript/no-unnecessary-type-parameters": "error",
12
+ "typescript/no-useless-default-assignment": "error",
13
+ "typescript/prefer-optional-chain": ["error", {
14
+ allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
15
+ checkAny: true,
16
+ checkBigInt: true,
17
+ checkBoolean: true,
18
+ checkNumber: true,
19
+ checkString: true,
20
+ checkUnknown: true,
21
+ requireNullish: false
22
+ }],
23
+ "typescript/prefer-readonly": ["error", { onlyInlineLambdas: false }],
24
+ "typescript/prefer-regexp-exec": "error",
25
+ "typescript/strict-void-return": ["error", { allowReturnAny: false }]
26
+ };
27
+ const RULES_TYPESCRIPT_PEDANTIC = {
28
+ "typescript/no-misused-promises": ["error", {
29
+ checksConditionals: true,
30
+ checksSpreads: true,
31
+ checksVoidReturn: {
32
+ arguments: true,
33
+ attributes: true,
34
+ inheritedMethods: true,
35
+ properties: true,
36
+ returns: true,
37
+ variables: true
38
+ }
39
+ }],
40
+ "typescript/no-mixed-enums": "error",
41
+ "typescript/no-unsafe-argument": "error",
42
+ "typescript/no-unsafe-assignment": "error",
43
+ "typescript/no-unsafe-call": "error",
44
+ "typescript/no-unsafe-function-type": "error",
45
+ "typescript/no-unsafe-member-access": "error",
46
+ "typescript/no-unsafe-return": "error",
47
+ "typescript/only-throw-error": "error",
48
+ "typescript/prefer-includes": "error",
49
+ "typescript/prefer-nullish-coalescing": ["error", {
50
+ ignoreBooleanCoercion: false,
51
+ ignoreConditionalTests: false,
52
+ ignoreIfStatements: false,
53
+ ignoreMixedLogicalExpressions: false,
54
+ ignorePrimitives: {
55
+ bigint: false,
56
+ boolean: false,
57
+ number: false,
58
+ string: false
59
+ },
60
+ ignoreTernaryTests: false
61
+ }],
62
+ "typescript/prefer-promise-reject-errors": ["error", {
63
+ allowEmptyReject: false,
64
+ allowThrowingAny: false,
65
+ allowThrowingUnknown: false
66
+ }],
67
+ "typescript/prefer-ts-expect-error": "error",
68
+ "typescript/restrict-plus-operands": ["error", {
69
+ allowAny: true,
70
+ allowBoolean: true,
71
+ allowNullish: true,
72
+ allowNumberAndString: true,
73
+ allowRegExp: true,
74
+ skipCompoundAssignments: false
75
+ }],
76
+ "typescript/return-await": ["error", "always"],
77
+ "typescript/strict-boolean-expressions": ["error", {
78
+ allowAny: true,
79
+ allowNullableBoolean: false,
80
+ allowNullableEnum: false,
81
+ allowNullableNumber: false,
82
+ allowNullableObject: true,
83
+ allowNullableString: false,
84
+ allowNumber: true,
85
+ allowString: true
86
+ }],
87
+ "typescript/switch-exhaustiveness-check": ["error", {
88
+ allowDefaultCaseForExhaustiveSwitch: true,
89
+ considerDefaultExhaustiveForUnions: true,
90
+ requireDefaultForNonUnion: false
91
+ }]
92
+ };
93
+ const RULES_TYPESCRIPT_RESTRICTION = {
94
+ "typescript/no-empty-object-type": ["error", {
95
+ allowInterfaces: "with-single-extends",
96
+ allowObjectTypes: "never"
97
+ }],
98
+ "typescript/no-import-type-side-effects": "error",
99
+ "typescript/no-namespace": ["error", {
100
+ allowDeclarations: false,
101
+ allowDefinitionFiles: true
102
+ }],
103
+ "typescript/no-non-null-asserted-nullish-coalescing": "error",
104
+ "typescript/no-non-null-assertion": "error",
105
+ "typescript/promise-function-async": ["error", {
106
+ allowAny: true,
107
+ checkArrowFunctions: true,
108
+ checkFunctionDeclarations: true,
109
+ checkFunctionExpressions: true,
110
+ checkMethodDeclarations: true
111
+ }],
112
+ "typescript/use-unknown-in-catch-callback-variable": "error"
113
+ };
114
+ const RULES_TYPESCRIPT_STYLE = {
115
+ "typescript/consistent-type-assertions": ["error", { assertionStyle: "as" }],
116
+ "typescript/consistent-type-definitions": ["error", "type"],
117
+ "typescript/consistent-type-imports": ["error", {
118
+ disallowTypeImports: true,
119
+ fixStyle: "separate-type-imports",
120
+ prefer: "type-imports"
121
+ }],
122
+ "typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
123
+ "typescript/parameter-properties": ["error", { prefer: "class-property" }],
124
+ "typescript/prefer-function-type": "error",
125
+ "typescript/prefer-reduce-type-parametertypescript/prefer-reduce-type-parameter": "error",
126
+ "typescript/prefer-return-this-type": "error"
127
+ };
128
+ const RULES_TYPESCRIPT_SUSPICIOUS = {
129
+ "typescript/no-confusing-non-null-assertion": "error",
130
+ "typescript/no-unnecessary-template-expression": "error",
131
+ "typescript/no-unnecessary-type-constraint": "error",
132
+ "typescript/no-unsafe-enum-comparison": "error"
133
+ };
134
+ const RULES_TYPESCRIPT = {
135
+ ...RULES_TYPESCRIPT_NURSERY,
136
+ ...RULES_TYPESCRIPT_PEDANTIC,
137
+ ...RULES_TYPESCRIPT_RESTRICTION,
138
+ ...RULES_TYPESCRIPT_STYLE,
139
+ ...RULES_TYPESCRIPT_SUSPICIOUS
140
+ };
141
+
142
+ export { RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS };
143
+ //# sourceMappingURL=typescript.mjs.map
@@ -0,0 +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/consistent-return\": [\n \"error\",\n {\n treatUndefinedAsUnspecified: false,\n },\n ],\n \"typescript/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: false,\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/no-unnecessary-type-conversion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\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 \"typescript/prefer-readonly\": [\n \"error\",\n {\n onlyInlineLambdas: false,\n },\n ],\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/strict-void-return\": [\n \"error\",\n {\n allowReturnAny: 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/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/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-imports\": [\n \"error\",\n {\n disallowTypeImports: true,\n fixStyle: \"separate-type-imports\",\n prefer: \"type-imports\",\n },\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-parametertypescript/prefer-reduce-type-parameter\":\n \"error\",\n \"typescript/prefer-return-this-type\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_SUSPICIOUS = {\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-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,gCAAgC,CAC5B,SACA,EACI,6BAA6B,OAChC,CACJ;CACD,sCAAsC,CAClC,SACA,EACI,wCAAwC,OAC3C,CACJ;CACD,2BAA2B,CACvB,SACA;EACI,mCAAmC;EACnC,eAAe;EACf,iCAAiC;EACjC,mCAAmC;EACtC,CACJ;CACD,6CAA6C;CAC7C,6CAA6C;CAC7C,4CAA4C;CAC5C,oCAAoC,CAChC,SACA;EACI,oEAAoE;EACpE,UAAU;EACV,aAAa;EACb,cAAc;EACd,aAAa;EACb,aAAa;EACb,cAAc;EACd,gBAAgB;EACnB,CACJ;CACD,8BAA8B,CAC1B,SACA,EACI,mBAAmB,OACtB,CACJ;CACD,iCAAiC;CACjC,iCAAiC,CAC7B,SACA,EACI,gBAAgB,OACnB,CACJ;CACJ;AAED,MAAM,4BAA4B;CAC9B,kCAAkC,CAC9B,SACA;EACI,oBAAoB;EACpB,eAAe;EACf,kBAAkB;GACd,WAAW;GACX,YAAY;GACZ,kBAAkB;GAClB,YAAY;GACZ,SAAS;GACT,WAAW;GACd;EACJ,CACJ;CACD,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;GACX;EACD,oBAAoB;EACvB,CACJ;CACD,2CAA2C,CACvC,SACA;EACI,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;EACzB,CACJ;CACD,qCAAqC;CACrC,qCAAqC,CACjC,SACA;EACI,UAAU;EACV,cAAc;EACd,cAAc;EACd,sBAAsB;EACtB,aAAa;EACb,yBAAyB;EAC5B,CACJ;CACD,2BAA2B,CACvB,SACA,SACH;CACD,yCAAyC,CACrC,SACA;EACI,UAAU;EACV,sBAAsB;EACtB,mBAAmB;EACnB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,aAAa;EACb,aAAa;EAChB,CACJ;CACD,0CAA0C,CACtC,SACA;EACI,qCAAqC;EACrC,oCAAoC;EACpC,2BAA2B;EAC9B,CACJ;CACJ;AAED,MAAM,+BAA+B;CACjC,mCAAmC,CAC/B,SACA;EACI,iBAAiB;EACjB,kBAAkB;EACrB,CACJ;CACD,0CAA0C;CAC1C,2BAA2B,CACvB,SACA;EACI,mBAAmB;EACnB,sBAAsB;EACzB,CACJ;CACD,sDAAsD;CACtD,oCAAoC;CACpC,qCAAqC,CACjC,SACA;EACI,UAAU;EACV,qBAAqB;EACrB,2BAA2B;EAC3B,0BAA0B;EAC1B,yBAAyB;EAC5B,CACJ;CACD,qDAAqD;CACxD;AAED,MAAM,yBAAyB;CAC3B,yCAAyC,CACrC,SACA,EACI,gBAAgB,MACnB,CACJ;CACD,0CAA0C,CACtC,SACA,OACH;CACD,sCAAsC,CAClC,SACA;EACI,qBAAqB;EACrB,UAAU;EACV,QAAQ;EACX,CACJ;CACD,iCAAiC,CAC7B,SACA,EACI,oBAAoB,MACvB,CACJ;CACD,mCAAmC,CAC/B,SACA,EACI,QAAQ,kBACX,CACJ;CACD,mCAAmC;CACnC,kFACI;CACJ,sCAAsC;CACzC;AAED,MAAM,8BAA8B;CAChC,8CAA8C;CAC9C,iDAAiD;CACjD,6CAA6C;CAC7C,wCAAwC;CAC3C;AAED,MAAM,mBAAmB;CACrB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
@@ -0,0 +1,168 @@
1
+ declare const RULES_UNICORN_PEDANTIC: {
2
+ readonly "unicorn/consistent-empty-array-spread": "error";
3
+ readonly "unicorn/explicit-length-check": ["error", {
4
+ readonly "non-zero": "greater-than";
5
+ }];
6
+ readonly "unicorn/new-for-builtins": "error";
7
+ readonly "unicorn/no-instanceof-array": "error";
8
+ readonly "unicorn/no-new-buffer": "error";
9
+ readonly "unicorn/no-unnecessary-array-flat-depth": "error";
10
+ readonly "unicorn/no-unnecessary-array-splice-count": "error";
11
+ readonly "unicorn/no-unnecessary-slice-end": "error";
12
+ readonly "unicorn/no-useless-promise-resolve-reject": ["error", {
13
+ readonly allowReject: false;
14
+ }];
15
+ readonly "unicorn/prefer-date-now": "error";
16
+ readonly "unicorn/prefer-math-min-max": "error";
17
+ readonly "unicorn/prefer-type-error": "error";
18
+ readonly "unicorn/require-number-to-fixed-digits-argument": "error";
19
+ };
20
+ declare const RULES_UNICORN_RESTRICTION: {
21
+ readonly "unicorn/no-length-as-slice-end": "error";
22
+ readonly "unicorn/prefer-node-protocol": "error";
23
+ readonly "unicorn/prefer-number-properties": ["error", {
24
+ readonly checkInfinity: true;
25
+ readonly checkNaN: true;
26
+ }];
27
+ };
28
+ declare const RULES_UNICORN_STYLE: {
29
+ readonly "unicorn/consistent-date-clone": "error";
30
+ readonly "unicorn/consistent-existence-index-check": "error";
31
+ readonly "unicorn/empty-brace-spaces": "error";
32
+ readonly "unicorn/error-message": "error";
33
+ readonly "unicorn/no-array-method-this-argument": "error";
34
+ readonly "unicorn/no-null": ["error", {
35
+ readonly checkStrictEquality: true;
36
+ }];
37
+ readonly "unicorn/no-unreadable-array-destructuring": "error";
38
+ readonly "unicorn/no-useless-collection-argument": "error";
39
+ readonly "unicorn/numeric-separators-style": ["error", {
40
+ readonly binary: {
41
+ readonly groupLength: 3;
42
+ readonly minimumDigits: 5;
43
+ };
44
+ readonly hexadecimal: {
45
+ readonly groupLength: 3;
46
+ readonly minimumDigits: 5;
47
+ };
48
+ readonly number: {
49
+ readonly groupLength: 3;
50
+ readonly minimumDigits: 5;
51
+ };
52
+ readonly octal: {
53
+ readonly groupLength: 3;
54
+ readonly minimumDigits: 5;
55
+ };
56
+ readonly onlyIfContainsSeparator: false;
57
+ }];
58
+ readonly "unicorn/prefer-classlist-toggle": "error";
59
+ readonly "unicorn/prefer-dom-node-text-content": "error";
60
+ readonly "unicorn/prefer-global-this": "error";
61
+ readonly "unicorn/prefer-includes": "error";
62
+ readonly "unicorn/prefer-keyboard-event-key": "error";
63
+ readonly "unicorn/prefer-modern-dom-apis": "error";
64
+ readonly "unicorn/prefer-object-from-entries": "error";
65
+ readonly "unicorn/prefer-response-static-json": "error";
66
+ readonly "unicorn/prefer-string-trim-start-end": "error";
67
+ readonly "unicorn/relative-url-style": ["error", "always"];
68
+ readonly "unicorn/require-module-attributes": "error";
69
+ readonly "unicorn/switch-case-braces": "error";
70
+ readonly "unicorn/text-encoding-identifier-case": ["error", {
71
+ readonly withDash: true;
72
+ }];
73
+ readonly "unicorn/throw-new-error": "error";
74
+ };
75
+ declare const RULES_UNICORN_SUSPICIOUS: {
76
+ readonly "unicorn/consistent-function-scoping": "error";
77
+ readonly "unicorn/no-accessor-recursion": "error";
78
+ readonly "unicorn/no-array-reverse": "error";
79
+ readonly "unicorn/no-array-sort": ["error", {
80
+ readonly allowExpressionStatement: true;
81
+ }];
82
+ readonly "unicorn/no-instanceof-builtins": ["error", {
83
+ readonly strategy: "strict";
84
+ readonly useErrorIsError: false;
85
+ }];
86
+ };
87
+ declare const RULES_UNICORN: {
88
+ readonly "unicorn/consistent-function-scoping": "error";
89
+ readonly "unicorn/no-accessor-recursion": "error";
90
+ readonly "unicorn/no-array-reverse": "error";
91
+ readonly "unicorn/no-array-sort": ["error", {
92
+ readonly allowExpressionStatement: true;
93
+ }];
94
+ readonly "unicorn/no-instanceof-builtins": ["error", {
95
+ readonly strategy: "strict";
96
+ readonly useErrorIsError: false;
97
+ }];
98
+ readonly "unicorn/consistent-date-clone": "error";
99
+ readonly "unicorn/consistent-existence-index-check": "error";
100
+ readonly "unicorn/empty-brace-spaces": "error";
101
+ readonly "unicorn/error-message": "error";
102
+ readonly "unicorn/no-array-method-this-argument": "error";
103
+ readonly "unicorn/no-null": ["error", {
104
+ readonly checkStrictEquality: true;
105
+ }];
106
+ readonly "unicorn/no-unreadable-array-destructuring": "error";
107
+ readonly "unicorn/no-useless-collection-argument": "error";
108
+ readonly "unicorn/numeric-separators-style": ["error", {
109
+ readonly binary: {
110
+ readonly groupLength: 3;
111
+ readonly minimumDigits: 5;
112
+ };
113
+ readonly hexadecimal: {
114
+ readonly groupLength: 3;
115
+ readonly minimumDigits: 5;
116
+ };
117
+ readonly number: {
118
+ readonly groupLength: 3;
119
+ readonly minimumDigits: 5;
120
+ };
121
+ readonly octal: {
122
+ readonly groupLength: 3;
123
+ readonly minimumDigits: 5;
124
+ };
125
+ readonly onlyIfContainsSeparator: false;
126
+ }];
127
+ readonly "unicorn/prefer-classlist-toggle": "error";
128
+ readonly "unicorn/prefer-dom-node-text-content": "error";
129
+ readonly "unicorn/prefer-global-this": "error";
130
+ readonly "unicorn/prefer-includes": "error";
131
+ readonly "unicorn/prefer-keyboard-event-key": "error";
132
+ readonly "unicorn/prefer-modern-dom-apis": "error";
133
+ readonly "unicorn/prefer-object-from-entries": "error";
134
+ readonly "unicorn/prefer-response-static-json": "error";
135
+ readonly "unicorn/prefer-string-trim-start-end": "error";
136
+ readonly "unicorn/relative-url-style": ["error", "always"];
137
+ readonly "unicorn/require-module-attributes": "error";
138
+ readonly "unicorn/switch-case-braces": "error";
139
+ readonly "unicorn/text-encoding-identifier-case": ["error", {
140
+ readonly withDash: true;
141
+ }];
142
+ readonly "unicorn/throw-new-error": "error";
143
+ readonly "unicorn/no-length-as-slice-end": "error";
144
+ readonly "unicorn/prefer-node-protocol": "error";
145
+ readonly "unicorn/prefer-number-properties": ["error", {
146
+ readonly checkInfinity: true;
147
+ readonly checkNaN: true;
148
+ }];
149
+ readonly "unicorn/consistent-empty-array-spread": "error";
150
+ readonly "unicorn/explicit-length-check": ["error", {
151
+ readonly "non-zero": "greater-than";
152
+ }];
153
+ readonly "unicorn/new-for-builtins": "error";
154
+ readonly "unicorn/no-instanceof-array": "error";
155
+ readonly "unicorn/no-new-buffer": "error";
156
+ readonly "unicorn/no-unnecessary-array-flat-depth": "error";
157
+ readonly "unicorn/no-unnecessary-array-splice-count": "error";
158
+ readonly "unicorn/no-unnecessary-slice-end": "error";
159
+ readonly "unicorn/no-useless-promise-resolve-reject": ["error", {
160
+ readonly allowReject: false;
161
+ }];
162
+ readonly "unicorn/prefer-date-now": "error";
163
+ readonly "unicorn/prefer-math-min-max": "error";
164
+ readonly "unicorn/prefer-type-error": "error";
165
+ readonly "unicorn/require-number-to-fixed-digits-argument": "error";
166
+ };
167
+ export { RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS };
168
+ //# sourceMappingURL=unicorn.d.ts.map
@@ -0,0 +1,90 @@
1
+
2
+ const RULES_UNICORN_PEDANTIC = {
3
+ "unicorn/consistent-empty-array-spread": "error",
4
+ "unicorn/explicit-length-check": ["error", { "non-zero": "greater-than" }],
5
+ "unicorn/new-for-builtins": "error",
6
+ "unicorn/no-instanceof-array": "error",
7
+ "unicorn/no-new-buffer": "error",
8
+ "unicorn/no-unnecessary-array-flat-depth": "error",
9
+ "unicorn/no-unnecessary-array-splice-count": "error",
10
+ "unicorn/no-unnecessary-slice-end": "error",
11
+ "unicorn/no-useless-promise-resolve-reject": ["error", { allowReject: false }],
12
+ "unicorn/prefer-date-now": "error",
13
+ "unicorn/prefer-math-min-max": "error",
14
+ "unicorn/prefer-type-error": "error",
15
+ "unicorn/require-number-to-fixed-digits-argument": "error"
16
+ };
17
+ const RULES_UNICORN_RESTRICTION = {
18
+ "unicorn/no-length-as-slice-end": "error",
19
+ "unicorn/prefer-node-protocol": "error",
20
+ "unicorn/prefer-number-properties": ["error", {
21
+ checkInfinity: true,
22
+ checkNaN: true
23
+ }]
24
+ };
25
+ const RULES_UNICORN_STYLE = {
26
+ "unicorn/consistent-date-clone": "error",
27
+ "unicorn/consistent-existence-index-check": "error",
28
+ "unicorn/empty-brace-spaces": "error",
29
+ "unicorn/error-message": "error",
30
+ "unicorn/no-array-method-this-argument": "error",
31
+ "unicorn/no-null": ["error", { checkStrictEquality: true }],
32
+ "unicorn/no-unreadable-array-destructuring": "error",
33
+ "unicorn/no-useless-collection-argument": "error",
34
+ "unicorn/numeric-separators-style": ["error", {
35
+ binary: {
36
+ groupLength: 3,
37
+ minimumDigits: 5
38
+ },
39
+ hexadecimal: {
40
+ groupLength: 3,
41
+ minimumDigits: 5
42
+ },
43
+ number: {
44
+ groupLength: 3,
45
+ minimumDigits: 5
46
+ },
47
+ octal: {
48
+ groupLength: 3,
49
+ minimumDigits: 5
50
+ },
51
+ onlyIfContainsSeparator: false
52
+ }],
53
+ "unicorn/prefer-classlist-toggle": "error",
54
+ "unicorn/prefer-dom-node-text-content": "error",
55
+ "unicorn/prefer-global-this": "error",
56
+ "unicorn/prefer-includes": "error",
57
+ "unicorn/prefer-keyboard-event-key": "error",
58
+ "unicorn/prefer-modern-dom-apis": "error",
59
+ "unicorn/prefer-object-from-entries": "error",
60
+ "unicorn/prefer-response-static-json": "error",
61
+ "unicorn/prefer-string-trim-start-end": "error",
62
+ "unicorn/relative-url-style": ["error", "always"],
63
+ "unicorn/require-module-attributes": "error",
64
+ "unicorn/switch-case-braces": "error",
65
+ "unicorn/text-encoding-identifier-case": ["error", { withDash: true }],
66
+ "unicorn/throw-new-error": "error"
67
+ };
68
+ const RULES_UNICORN_SUSPICIOUS = {
69
+ "unicorn/consistent-function-scoping": "error",
70
+ "unicorn/no-accessor-recursion": "error",
71
+ "unicorn/no-array-reverse": "error",
72
+ "unicorn/no-array-sort": ["error", { allowExpressionStatement: true }],
73
+ "unicorn/no-instanceof-builtins": ["error", {
74
+ strategy: "strict",
75
+ useErrorIsError: false
76
+ }]
77
+ };
78
+ const RULES_UNICORN = {
79
+ ...RULES_UNICORN_PEDANTIC,
80
+ ...RULES_UNICORN_RESTRICTION,
81
+ ...RULES_UNICORN_STYLE,
82
+ ...RULES_UNICORN_SUSPICIOUS
83
+ };
84
+
85
+ exports.RULES_UNICORN = RULES_UNICORN;
86
+ exports.RULES_UNICORN_PEDANTIC = RULES_UNICORN_PEDANTIC;
87
+ exports.RULES_UNICORN_RESTRICTION = RULES_UNICORN_RESTRICTION;
88
+ exports.RULES_UNICORN_STYLE = RULES_UNICORN_STYLE;
89
+ exports.RULES_UNICORN_SUSPICIOUS = RULES_UNICORN_SUSPICIOUS;
90
+ //# sourceMappingURL=unicorn.js.map
@@ -0,0 +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-null\": [\n \"error\",\n {\n checkStrictEquality: true,\n },\n ],\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 \"unicorn/no-instanceof-builtins\": [\n \"error\",\n {\n strategy: \"strict\",\n useErrorIsError: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\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_PEDANTIC,\n RULES_UNICORN_RESTRICTION,\n RULES_UNICORN_STYLE,\n RULES_UNICORN_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,yBAAyB;CAC3B,yCAAyC;CACzC,iCAAiC,CAC7B,SACA,EACI,YAAY,gBACf,CACJ;CACD,4BAA4B;CAC5B,+BAA+B;CAC/B,yBAAyB;CACzB,2CAA2C;CAC3C,6CAA6C;CAC7C,oCAAoC;CACpC,6CAA6C,CACzC,SACA,EACI,aAAa,OAChB,CACJ;CACD,2BAA2B;CAC3B,+BAA+B;CAC/B,6BAA6B;CAC7B,mDAAmD;CACtD;AAED,MAAM,4BAA4B;CAC9B,kCAAkC;CAClC,gCAAgC;CAChC,oCAAoC,CAChC,SACA;EACI,eAAe;EACf,UAAU;EACb,CACJ;CACJ;AAED,MAAM,sBAAsB;CACxB,iCAAiC;CACjC,4CAA4C;CAC5C,8BAA8B;CAC9B,yBAAyB;CACzB,yCAAyC;CACzC,mBAAmB,CACf,SACA,EACI,qBAAqB,MACxB,CACJ;CACD,6CAA6C;CAC7C,0CAA0C;CAC1C,oCAAoC,CAChC,SACA;EACI,QAAQ;GACJ,aAAa;GACb,eAAe;GAClB;EACD,aAAa;GACT,aAAa;GACb,eAAe;GAClB;EACD,QAAQ;GACJ,aAAa;GACb,eAAe;GAClB;EACD,OAAO;GACH,aAAa;GACb,eAAe;GAClB;EACD,yBAAyB;EAC5B,CACJ;CACD,mCAAmC;CACnC,wCAAwC;CACxC,8BAA8B;CAC9B,2BAA2B;CAC3B,qCAAqC;CACrC,kCAAkC;CAClC,sCAAsC;CACtC,uCAAuC;CACvC,wCAAwC;CACxC,8BAA8B,CAC1B,SACA,SACH;CACD,qCAAqC;CACrC,8BAA8B;CAC9B,yCAAyC,CACrC,SACA,EACI,UAAU,MACb,CACJ;CACD,2BAA2B;CAC9B;AAED,MAAM,2BAA2B;CAC7B,uCAAuC;CACvC,iCAAiC;CACjC,4BAA4B;CAC5B,yBAAyB,CACrB,SACA,EACI,0BAA0B,MAC7B,CACJ;CACD,kCAAkC,CAC9B,SACA;EACI,UAAU;EACV,iBAAiB;EACpB,CACJ;CACJ;AAED,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
@@ -0,0 +1,85 @@
1
+ const RULES_UNICORN_PEDANTIC = {
2
+ "unicorn/consistent-empty-array-spread": "error",
3
+ "unicorn/explicit-length-check": ["error", { "non-zero": "greater-than" }],
4
+ "unicorn/new-for-builtins": "error",
5
+ "unicorn/no-instanceof-array": "error",
6
+ "unicorn/no-new-buffer": "error",
7
+ "unicorn/no-unnecessary-array-flat-depth": "error",
8
+ "unicorn/no-unnecessary-array-splice-count": "error",
9
+ "unicorn/no-unnecessary-slice-end": "error",
10
+ "unicorn/no-useless-promise-resolve-reject": ["error", { allowReject: false }],
11
+ "unicorn/prefer-date-now": "error",
12
+ "unicorn/prefer-math-min-max": "error",
13
+ "unicorn/prefer-type-error": "error",
14
+ "unicorn/require-number-to-fixed-digits-argument": "error"
15
+ };
16
+ const RULES_UNICORN_RESTRICTION = {
17
+ "unicorn/no-length-as-slice-end": "error",
18
+ "unicorn/prefer-node-protocol": "error",
19
+ "unicorn/prefer-number-properties": ["error", {
20
+ checkInfinity: true,
21
+ checkNaN: true
22
+ }]
23
+ };
24
+ const RULES_UNICORN_STYLE = {
25
+ "unicorn/consistent-date-clone": "error",
26
+ "unicorn/consistent-existence-index-check": "error",
27
+ "unicorn/empty-brace-spaces": "error",
28
+ "unicorn/error-message": "error",
29
+ "unicorn/no-array-method-this-argument": "error",
30
+ "unicorn/no-null": ["error", { checkStrictEquality: true }],
31
+ "unicorn/no-unreadable-array-destructuring": "error",
32
+ "unicorn/no-useless-collection-argument": "error",
33
+ "unicorn/numeric-separators-style": ["error", {
34
+ binary: {
35
+ groupLength: 3,
36
+ minimumDigits: 5
37
+ },
38
+ hexadecimal: {
39
+ groupLength: 3,
40
+ minimumDigits: 5
41
+ },
42
+ number: {
43
+ groupLength: 3,
44
+ minimumDigits: 5
45
+ },
46
+ octal: {
47
+ groupLength: 3,
48
+ minimumDigits: 5
49
+ },
50
+ onlyIfContainsSeparator: false
51
+ }],
52
+ "unicorn/prefer-classlist-toggle": "error",
53
+ "unicorn/prefer-dom-node-text-content": "error",
54
+ "unicorn/prefer-global-this": "error",
55
+ "unicorn/prefer-includes": "error",
56
+ "unicorn/prefer-keyboard-event-key": "error",
57
+ "unicorn/prefer-modern-dom-apis": "error",
58
+ "unicorn/prefer-object-from-entries": "error",
59
+ "unicorn/prefer-response-static-json": "error",
60
+ "unicorn/prefer-string-trim-start-end": "error",
61
+ "unicorn/relative-url-style": ["error", "always"],
62
+ "unicorn/require-module-attributes": "error",
63
+ "unicorn/switch-case-braces": "error",
64
+ "unicorn/text-encoding-identifier-case": ["error", { withDash: true }],
65
+ "unicorn/throw-new-error": "error"
66
+ };
67
+ const RULES_UNICORN_SUSPICIOUS = {
68
+ "unicorn/consistent-function-scoping": "error",
69
+ "unicorn/no-accessor-recursion": "error",
70
+ "unicorn/no-array-reverse": "error",
71
+ "unicorn/no-array-sort": ["error", { allowExpressionStatement: true }],
72
+ "unicorn/no-instanceof-builtins": ["error", {
73
+ strategy: "strict",
74
+ useErrorIsError: false
75
+ }]
76
+ };
77
+ const RULES_UNICORN = {
78
+ ...RULES_UNICORN_PEDANTIC,
79
+ ...RULES_UNICORN_RESTRICTION,
80
+ ...RULES_UNICORN_STYLE,
81
+ ...RULES_UNICORN_SUSPICIOUS
82
+ };
83
+
84
+ export { RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS };
85
+ //# sourceMappingURL=unicorn.mjs.map
@@ -0,0 +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-null\": [\n \"error\",\n {\n checkStrictEquality: true,\n },\n ],\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 \"unicorn/no-instanceof-builtins\": [\n \"error\",\n {\n strategy: \"strict\",\n useErrorIsError: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\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_PEDANTIC,\n RULES_UNICORN_RESTRICTION,\n RULES_UNICORN_STYLE,\n RULES_UNICORN_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,yBAAyB;CAC3B,yCAAyC;CACzC,iCAAiC,CAC7B,SACA,EACI,YAAY,gBACf,CACJ;CACD,4BAA4B;CAC5B,+BAA+B;CAC/B,yBAAyB;CACzB,2CAA2C;CAC3C,6CAA6C;CAC7C,oCAAoC;CACpC,6CAA6C,CACzC,SACA,EACI,aAAa,OAChB,CACJ;CACD,2BAA2B;CAC3B,+BAA+B;CAC/B,6BAA6B;CAC7B,mDAAmD;CACtD;AAED,MAAM,4BAA4B;CAC9B,kCAAkC;CAClC,gCAAgC;CAChC,oCAAoC,CAChC,SACA;EACI,eAAe;EACf,UAAU;EACb,CACJ;CACJ;AAED,MAAM,sBAAsB;CACxB,iCAAiC;CACjC,4CAA4C;CAC5C,8BAA8B;CAC9B,yBAAyB;CACzB,yCAAyC;CACzC,mBAAmB,CACf,SACA,EACI,qBAAqB,MACxB,CACJ;CACD,6CAA6C;CAC7C,0CAA0C;CAC1C,oCAAoC,CAChC,SACA;EACI,QAAQ;GACJ,aAAa;GACb,eAAe;GAClB;EACD,aAAa;GACT,aAAa;GACb,eAAe;GAClB;EACD,QAAQ;GACJ,aAAa;GACb,eAAe;GAClB;EACD,OAAO;GACH,aAAa;GACb,eAAe;GAClB;EACD,yBAAyB;EAC5B,CACJ;CACD,mCAAmC;CACnC,wCAAwC;CACxC,8BAA8B;CAC9B,2BAA2B;CAC3B,qCAAqC;CACrC,kCAAkC;CAClC,sCAAsC;CACtC,uCAAuC;CACvC,wCAAwC;CACxC,8BAA8B,CAC1B,SACA,SACH;CACD,qCAAqC;CACrC,8BAA8B;CAC9B,yCAAyC,CACrC,SACA,EACI,UAAU,MACb,CACJ;CACD,2BAA2B;CAC9B;AAED,MAAM,2BAA2B;CAC7B,uCAAuC;CACvC,iCAAiC;CACjC,4BAA4B;CAC5B,yBAAyB,CACrB,SACA,EACI,0BAA0B,MAC7B,CACJ;CACD,kCAAkC,CAC9B,SACA;EACI,UAAU;EACV,iBAAiB;EACpB,CACJ;CACJ;AAED,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
@@ -0,0 +1,4 @@
1
+ import { PLUGIN_JSX } from "./plugin/index.js";
2
+ import { jsxPreset } from "./preset/index.js";
3
+ import { RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS } from "./rules/jsx-a11y.js";
4
+ export { PLUGIN_JSX, RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS, jsxPreset };
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_index = require('./plugin/index.js');
3
+ const require_jsx_a11y = require('./rules/jsx-a11y.js');
4
+ const require_index$1 = require('./preset/index.js');
5
+
6
+ exports.PLUGIN_JSX = require_index.PLUGIN_JSX;
7
+ exports.RULES_JSX_A11Y = require_jsx_a11y.RULES_JSX_A11Y;
8
+ exports.RULES_JSX_A11Y_CORRECTNESS = require_jsx_a11y.RULES_JSX_A11Y_CORRECTNESS;
9
+ exports.jsxPreset = require_index$1.jsxPreset;
@@ -0,0 +1,5 @@
1
+ import { PLUGIN_JSX } from "./plugin/index.mjs";
2
+ import { RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS } from "./rules/jsx-a11y.mjs";
3
+ import { jsxPreset } from "./preset/index.mjs";
4
+
5
+ export { PLUGIN_JSX, RULES_JSX_A11Y, RULES_JSX_A11Y_CORRECTNESS, jsxPreset };
@@ -0,0 +1,3 @@
1
+ declare const PLUGIN_JSX: ["jsx-a11y"];
2
+ export { PLUGIN_JSX };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+
2
+ const PLUGIN_JSX = ["jsx-a11y"];
3
+
4
+ exports.PLUGIN_JSX = PLUGIN_JSX;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/presets/jsx/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_JSX = [\n \"jsx-a11y\",\n] as const satisfies LintPlugins;\n\nexport { PLUGIN_JSX };\n"],"mappings":";AAEA,MAAM,aAAa,CACf,WACH"}
@@ -0,0 +1,4 @@
1
+ const PLUGIN_JSX = ["jsx-a11y"];
2
+
3
+ export { PLUGIN_JSX };
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/jsx/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_JSX = [\n \"jsx-a11y\",\n] as const satisfies LintPlugins;\n\nexport { PLUGIN_JSX };\n"],"mappings":"AAEA,MAAM,aAAa,CACf,WACH"}
@@ -0,0 +1,4 @@
1
+ import { Preset } from "../../../@types/preset.js";
2
+ declare const jsxPreset: () => Preset;
3
+ export { jsxPreset };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ const require_index = require('../plugin/index.js');
2
+ const require_jsx_a11y = require('../rules/jsx-a11y.js');
3
+ let es_toolkit = require("es-toolkit");
4
+
5
+ const jsxPreset = () => {
6
+ return ({ config: internalConfig }) => {
7
+ return { config: (0, es_toolkit.toMerged)(internalConfig, {
8
+ plugins: [...require_index.PLUGIN_JSX],
9
+ rules: { ...require_jsx_a11y.RULES_JSX_A11Y }
10
+ }) };
11
+ };
12
+ };
13
+
14
+ exports.jsxPreset = jsxPreset;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["PLUGIN_JSX","RULES_JSX_A11Y"],"sources":["../../../../src/presets/jsx/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_JSX } from \"#/presets/jsx/plugin\";\nimport { RULES_JSX_A11Y } from \"#/presets/jsx/rules/jsx-a11y\";\n\nconst jsxPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_JSX,\n ],\n rules: {\n ...RULES_JSX_A11Y,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { jsxPreset };\n"],"mappings":";;;;AASA,MAAM,kBAA0B;AAC5B,SAAQ,EAAE,QAAQ,qBAAmC;AAUjD,SAAO,EACH,iCAVkC,gBAAgB;GAClD,SAAS,CACL,GAAGA,yBACN;GACD,OAAO,EACH,GAAGC,iCACN;GACJ,CAAwB,EAIxB"}
@@ -0,0 +1,15 @@
1
+ import { PLUGIN_JSX } from "../plugin/index.mjs";
2
+ import { RULES_JSX_A11Y } from "../rules/jsx-a11y.mjs";
3
+ import { toMerged } from "es-toolkit";
4
+
5
+ const jsxPreset = () => {
6
+ return ({ config: internalConfig }) => {
7
+ return { config: toMerged(internalConfig, {
8
+ plugins: [...PLUGIN_JSX],
9
+ rules: { ...RULES_JSX_A11Y }
10
+ }) };
11
+ };
12
+ };
13
+
14
+ export { jsxPreset };
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/jsx/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_JSX } from \"#/presets/jsx/plugin\";\nimport { RULES_JSX_A11Y } from \"#/presets/jsx/rules/jsx-a11y\";\n\nconst jsxPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_JSX,\n ],\n rules: {\n ...RULES_JSX_A11Y,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { jsxPreset };\n"],"mappings":";;;;AASA,MAAM,kBAA0B;AAC5B,SAAQ,EAAE,QAAQ,qBAAmC;AAUjD,SAAO,EACH,QAVyB,SAAS,gBAAgB;GAClD,SAAS,CACL,GAAG,WACN;GACD,OAAO,EACH,GAAG,gBACN;GACJ,CAAwB,EAIxB"}