@apst/oxlint 0.0.0-dev.20260624.019efa3b → 0.0.0-dev.20260625.ef70fed8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +2 -2
- package/dist/presets/common/index.js +1 -0
- package/dist/presets/common/index.mjs +2 -2
- 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/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/unicorn.d.ts +0 -2
- package/dist/presets/common/rules/unicorn.js +1 -2
- package/dist/presets/common/rules/unicorn.js.map +1 -1
- package/dist/presets/common/rules/unicorn.mjs +1 -2
- 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/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 +3 -1
- package/dist/presets/next/rules/nextjs.js.map +1 -1
- package/dist/presets/next/rules/nextjs.mjs +3 -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/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 +2 -2
- package/dist/presets/react/rules/react.js +1 -1
- package/dist/presets/react/rules/react.js.map +1 -1
- package/dist/presets/react/rules/react.mjs +1 -1
- 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/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 +1 -1
|
@@ -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_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
|
|
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"}
|
|
@@ -71,8 +71,7 @@ const RULES_UNICORN_SUSPICIOUS = {
|
|
|
71
71
|
"unicorn/consistent-function-scoping": "error",
|
|
72
72
|
"unicorn/no-accessor-recursion": "error",
|
|
73
73
|
"unicorn/no-array-reverse": "error",
|
|
74
|
-
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }]
|
|
75
|
-
"unicorn/no-instanceof-builtins": ["allow"]
|
|
74
|
+
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }]
|
|
76
75
|
};
|
|
77
76
|
const RULES_UNICORN = {
|
|
78
77
|
...RULES_UNICORN_NURSERY,
|
|
@@ -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_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
|
|
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"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare const RULES_NEXTJS_CORRECTNESS: {
|
|
2
|
+
readonly "nextjs/google-font-display": "error";
|
|
3
|
+
readonly "nextjs/google-font-preconnect": "error";
|
|
4
|
+
readonly "nextjs/inline-script-id": "error";
|
|
5
|
+
readonly "nextjs/next-script-for-ga": "error";
|
|
6
|
+
readonly "nextjs/no-assign-module-variable": "error";
|
|
7
|
+
readonly "nextjs/no-async-client-component": "error";
|
|
8
|
+
readonly "nextjs/no-before-interactive-script-outside-document": "error";
|
|
9
|
+
readonly "nextjs/no-css-tags": "error";
|
|
10
|
+
readonly "nextjs/no-document-import-in-page": "error";
|
|
11
|
+
readonly "nextjs/no-duplicate-head": "error";
|
|
12
|
+
readonly "nextjs/no-head-element": "error";
|
|
13
|
+
readonly "nextjs/no-head-import-in-document": "error";
|
|
14
|
+
readonly "nextjs/no-html-link-for-pages": "error";
|
|
15
|
+
readonly "nextjs/no-img-element": "allow";
|
|
16
|
+
readonly "nextjs/no-page-custom-font": "error";
|
|
17
|
+
readonly "nextjs/no-script-component-in-head": "error";
|
|
18
|
+
readonly "nextjs/no-styled-jsx-in-document": "error";
|
|
19
|
+
readonly "nextjs/no-sync-scripts": "error";
|
|
20
|
+
readonly "nextjs/no-title-in-document-head": "error";
|
|
21
|
+
readonly "nextjs/no-typos": "error";
|
|
22
|
+
readonly "nextjs/no-unwanted-polyfillio": "error";
|
|
23
|
+
};
|
|
24
|
+
declare const RULES_NEXTJS: {
|
|
25
|
+
readonly "nextjs/google-font-display": "error";
|
|
26
|
+
readonly "nextjs/google-font-preconnect": "error";
|
|
27
|
+
readonly "nextjs/inline-script-id": "error";
|
|
28
|
+
readonly "nextjs/next-script-for-ga": "error";
|
|
29
|
+
readonly "nextjs/no-assign-module-variable": "error";
|
|
30
|
+
readonly "nextjs/no-async-client-component": "error";
|
|
31
|
+
readonly "nextjs/no-before-interactive-script-outside-document": "error";
|
|
32
|
+
readonly "nextjs/no-css-tags": "error";
|
|
33
|
+
readonly "nextjs/no-document-import-in-page": "error";
|
|
34
|
+
readonly "nextjs/no-duplicate-head": "error";
|
|
35
|
+
readonly "nextjs/no-head-element": "error";
|
|
36
|
+
readonly "nextjs/no-head-import-in-document": "error";
|
|
37
|
+
readonly "nextjs/no-html-link-for-pages": "error";
|
|
38
|
+
readonly "nextjs/no-img-element": "allow";
|
|
39
|
+
readonly "nextjs/no-page-custom-font": "error";
|
|
40
|
+
readonly "nextjs/no-script-component-in-head": "error";
|
|
41
|
+
readonly "nextjs/no-styled-jsx-in-document": "error";
|
|
42
|
+
readonly "nextjs/no-sync-scripts": "error";
|
|
43
|
+
readonly "nextjs/no-title-in-document-head": "error";
|
|
44
|
+
readonly "nextjs/no-typos": "error";
|
|
45
|
+
readonly "nextjs/no-unwanted-polyfillio": "error";
|
|
46
|
+
};
|
|
47
|
+
export { RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS };
|
|
48
|
+
//# sourceMappingURL=nextjs.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
const
|
|
2
|
+
const RULES_NEXTJS_CORRECTNESS = {
|
|
3
3
|
"nextjs/google-font-display": "error",
|
|
4
4
|
"nextjs/google-font-preconnect": "error",
|
|
5
5
|
"nextjs/inline-script-id": "error",
|
|
@@ -22,6 +22,8 @@ const RULES_NEXTJS = {
|
|
|
22
22
|
"nextjs/no-typos": "error",
|
|
23
23
|
"nextjs/no-unwanted-polyfillio": "error"
|
|
24
24
|
};
|
|
25
|
+
const RULES_NEXTJS = { ...RULES_NEXTJS_CORRECTNESS };
|
|
25
26
|
|
|
26
27
|
exports.RULES_NEXTJS = RULES_NEXTJS;
|
|
28
|
+
exports.RULES_NEXTJS_CORRECTNESS = RULES_NEXTJS_CORRECTNESS;
|
|
27
29
|
//# sourceMappingURL=nextjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.js","names":[],"sources":["../../../../src/presets/next/rules/nextjs.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_NEXTJS_CORRECTNESS = {\n \"nextjs/google-font-display\": \"error\",\n \"nextjs/google-font-preconnect\": \"error\",\n \"nextjs/inline-script-id\": \"error\",\n \"nextjs/next-script-for-ga\": \"error\",\n \"nextjs/no-assign-module-variable\": \"error\",\n \"nextjs/no-async-client-component\": \"error\",\n \"nextjs/no-before-interactive-script-outside-document\": \"error\",\n \"nextjs/no-css-tags\": \"error\",\n \"nextjs/no-document-import-in-page\": \"error\",\n \"nextjs/no-duplicate-head\": \"error\",\n \"nextjs/no-head-element\": \"error\",\n \"nextjs/no-head-import-in-document\": \"error\",\n \"nextjs/no-html-link-for-pages\": \"error\",\n \"nextjs/no-img-element\": \"allow\",\n \"nextjs/no-page-custom-font\": \"error\",\n \"nextjs/no-script-component-in-head\": \"error\",\n \"nextjs/no-styled-jsx-in-document\": \"error\",\n \"nextjs/no-sync-scripts\": \"error\",\n \"nextjs/no-title-in-document-head\": \"error\",\n \"nextjs/no-typos\": \"error\",\n \"nextjs/no-unwanted-polyfillio\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_NEXTJS = {\n ...RULES_NEXTJS_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_NEXTJS };\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"nextjs.js","names":[],"sources":["../../../../src/presets/next/rules/nextjs.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_NEXTJS_CORRECTNESS = {\n \"nextjs/google-font-display\": \"error\",\n \"nextjs/google-font-preconnect\": \"error\",\n \"nextjs/inline-script-id\": \"error\",\n \"nextjs/next-script-for-ga\": \"error\",\n \"nextjs/no-assign-module-variable\": \"error\",\n \"nextjs/no-async-client-component\": \"error\",\n \"nextjs/no-before-interactive-script-outside-document\": \"error\",\n \"nextjs/no-css-tags\": \"error\",\n \"nextjs/no-document-import-in-page\": \"error\",\n \"nextjs/no-duplicate-head\": \"error\",\n \"nextjs/no-head-element\": \"error\",\n \"nextjs/no-head-import-in-document\": \"error\",\n \"nextjs/no-html-link-for-pages\": \"error\",\n \"nextjs/no-img-element\": \"allow\",\n \"nextjs/no-page-custom-font\": \"error\",\n \"nextjs/no-script-component-in-head\": \"error\",\n \"nextjs/no-styled-jsx-in-document\": \"error\",\n \"nextjs/no-sync-scripts\": \"error\",\n \"nextjs/no-title-in-document-head\": \"error\",\n \"nextjs/no-typos\": \"error\",\n \"nextjs/no-unwanted-polyfillio\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_NEXTJS = {\n ...RULES_NEXTJS_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS };\n"],"mappings":";AAEA,MAAM,2BAA2B;CAC7B,8BAA8B;CAC9B,iCAAiC;CACjC,2BAA2B;CAC3B,6BAA6B;CAC7B,oCAAoC;CACpC,oCAAoC;CACpC,wDAAwD;CACxD,sBAAsB;CACtB,qCAAqC;CACrC,4BAA4B;CAC5B,0BAA0B;CAC1B,qCAAqC;CACrC,iCAAiC;CACjC,yBAAyB;CACzB,8BAA8B;CAC9B,sCAAsC;CACtC,oCAAoC;CACpC,0BAA0B;CAC1B,oCAAoC;CACpC,mBAAmB;CACnB,iCAAiC;AACrC;AAEA,MAAM,eAAe,EACjB,GAAG,yBACP"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const RULES_NEXTJS_CORRECTNESS = {
|
|
2
2
|
"nextjs/google-font-display": "error",
|
|
3
3
|
"nextjs/google-font-preconnect": "error",
|
|
4
4
|
"nextjs/inline-script-id": "error",
|
|
@@ -21,6 +21,7 @@ const RULES_NEXTJS = {
|
|
|
21
21
|
"nextjs/no-typos": "error",
|
|
22
22
|
"nextjs/no-unwanted-polyfillio": "error"
|
|
23
23
|
};
|
|
24
|
+
const RULES_NEXTJS = { ...RULES_NEXTJS_CORRECTNESS };
|
|
24
25
|
|
|
25
|
-
export { RULES_NEXTJS };
|
|
26
|
+
export { RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS };
|
|
26
27
|
//# sourceMappingURL=nextjs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.mjs","names":[],"sources":["../../../../src/presets/next/rules/nextjs.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_NEXTJS_CORRECTNESS = {\n \"nextjs/google-font-display\": \"error\",\n \"nextjs/google-font-preconnect\": \"error\",\n \"nextjs/inline-script-id\": \"error\",\n \"nextjs/next-script-for-ga\": \"error\",\n \"nextjs/no-assign-module-variable\": \"error\",\n \"nextjs/no-async-client-component\": \"error\",\n \"nextjs/no-before-interactive-script-outside-document\": \"error\",\n \"nextjs/no-css-tags\": \"error\",\n \"nextjs/no-document-import-in-page\": \"error\",\n \"nextjs/no-duplicate-head\": \"error\",\n \"nextjs/no-head-element\": \"error\",\n \"nextjs/no-head-import-in-document\": \"error\",\n \"nextjs/no-html-link-for-pages\": \"error\",\n \"nextjs/no-img-element\": \"allow\",\n \"nextjs/no-page-custom-font\": \"error\",\n \"nextjs/no-script-component-in-head\": \"error\",\n \"nextjs/no-styled-jsx-in-document\": \"error\",\n \"nextjs/no-sync-scripts\": \"error\",\n \"nextjs/no-title-in-document-head\": \"error\",\n \"nextjs/no-typos\": \"error\",\n \"nextjs/no-unwanted-polyfillio\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_NEXTJS = {\n ...RULES_NEXTJS_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_NEXTJS };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"nextjs.mjs","names":[],"sources":["../../../../src/presets/next/rules/nextjs.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_NEXTJS_CORRECTNESS = {\n \"nextjs/google-font-display\": \"error\",\n \"nextjs/google-font-preconnect\": \"error\",\n \"nextjs/inline-script-id\": \"error\",\n \"nextjs/next-script-for-ga\": \"error\",\n \"nextjs/no-assign-module-variable\": \"error\",\n \"nextjs/no-async-client-component\": \"error\",\n \"nextjs/no-before-interactive-script-outside-document\": \"error\",\n \"nextjs/no-css-tags\": \"error\",\n \"nextjs/no-document-import-in-page\": \"error\",\n \"nextjs/no-duplicate-head\": \"error\",\n \"nextjs/no-head-element\": \"error\",\n \"nextjs/no-head-import-in-document\": \"error\",\n \"nextjs/no-html-link-for-pages\": \"error\",\n \"nextjs/no-img-element\": \"allow\",\n \"nextjs/no-page-custom-font\": \"error\",\n \"nextjs/no-script-component-in-head\": \"error\",\n \"nextjs/no-styled-jsx-in-document\": \"error\",\n \"nextjs/no-sync-scripts\": \"error\",\n \"nextjs/no-title-in-document-head\": \"error\",\n \"nextjs/no-typos\": \"error\",\n \"nextjs/no-unwanted-polyfillio\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_NEXTJS = {\n ...RULES_NEXTJS_CORRECTNESS,\n} as const satisfies LintRules;\n\nexport { RULES_NEXTJS, RULES_NEXTJS_CORRECTNESS };\n"],"mappings":"AAEA,MAAM,2BAA2B;CAC7B,8BAA8B;CAC9B,iCAAiC;CACjC,2BAA2B;CAC3B,6BAA6B;CAC7B,oCAAoC;CACpC,oCAAoC;CACpC,wDAAwD;CACxD,sBAAsB;CACtB,qCAAqC;CACrC,4BAA4B;CAC5B,0BAA0B;CAC1B,qCAAqC;CACrC,iCAAiC;CACjC,yBAAyB;CACzB,8BAA8B;CAC9B,sCAAsC;CACtC,oCAAoC;CACpC,0BAA0B;CAC1B,oCAAoC;CACpC,mBAAmB;CACnB,iCAAiC;AACrC;AAEA,MAAM,eAAe,EACjB,GAAG,yBACP"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
const require_index = require('../plugin/index.js');
|
|
2
2
|
const require_node = require('../rules/node.js');
|
|
3
|
-
let es_toolkit = require("es-toolkit");
|
|
4
3
|
|
|
5
4
|
const nodePreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...require_index.PLUGIN_NODE],
|
|
9
8
|
rules: { ...require_node.RULES_NODE }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLUGIN_NODE","RULES_NODE"],"sources":["../../../../src/presets/node/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_NODE","RULES_NODE"],"sources":["../../../../src/presets/node/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_NODE } from \"#/presets/node/plugin\";\nimport { RULES_NODE } from \"#/presets/node/rules/node\";\n\nconst nodePreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_NODE,\n ],\n rules: {\n ...RULES_NODE,\n },\n },\n };\n };\n};\n\nexport { nodePreset };\n"],"mappings":";;;AAKA,MAAM,mBAA2B;CAC7B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAGA,yBACP;GACA,OAAO,EACH,GAAGC,wBACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PLUGIN_NODE } from "../plugin/index.mjs";
|
|
2
2
|
import { RULES_NODE } from "../rules/node.mjs";
|
|
3
|
-
import { toMerged } from "es-toolkit";
|
|
4
3
|
|
|
5
4
|
const nodePreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...PLUGIN_NODE],
|
|
9
8
|
rules: { ...RULES_NODE }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/node/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/node/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_NODE } from \"#/presets/node/plugin\";\nimport { RULES_NODE } from \"#/presets/node/rules/node\";\n\nconst nodePreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_NODE,\n ],\n rules: {\n ...RULES_NODE,\n },\n },\n };\n };\n};\n\nexport { nodePreset };\n"],"mappings":";;;AAKA,MAAM,mBAA2B;CAC7B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAG,WACP;GACA,OAAO,EACH,GAAG,WACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
const require_index = require('../plugin/index.js');
|
|
2
2
|
const require_react = require('../rules/react.js');
|
|
3
|
-
let es_toolkit = require("es-toolkit");
|
|
4
3
|
|
|
5
4
|
const reactPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...require_index.PLUGIN_REACT],
|
|
9
8
|
rules: { ...require_react.RULES_REACT }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLUGIN_REACT","RULES_REACT"],"sources":["../../../../src/presets/react/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_REACT","RULES_REACT"],"sources":["../../../../src/presets/react/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_REACT } from \"#/presets/react/plugin\";\nimport { RULES_REACT } from \"#/presets/react/rules/react\";\n\nconst reactPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_REACT,\n ],\n rules: {\n ...RULES_REACT,\n },\n },\n };\n };\n};\n\nexport { reactPreset };\n"],"mappings":";;;AAKA,MAAM,oBAA4B;CAC9B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAGA,0BACP;GACA,OAAO,EACH,GAAGC,0BACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PLUGIN_REACT } from "../plugin/index.mjs";
|
|
2
2
|
import { RULES_REACT } from "../rules/react.mjs";
|
|
3
|
-
import { toMerged } from "es-toolkit";
|
|
4
3
|
|
|
5
4
|
const reactPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...PLUGIN_REACT],
|
|
9
8
|
rules: { ...RULES_REACT }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/react/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/react/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_REACT } from \"#/presets/react/plugin\";\nimport { RULES_REACT } from \"#/presets/react/rules/react\";\n\nconst reactPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_REACT,\n ],\n rules: {\n ...RULES_REACT,\n },\n },\n };\n };\n};\n\nexport { reactPreset };\n"],"mappings":";;;AAKA,MAAM,oBAA4B;CAC9B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAG,YACP;GACA,OAAO,EACH,GAAG,YACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -55,7 +55,7 @@ declare const RULES_REACT_RESTRICTION: {
|
|
|
55
55
|
readonly "react/jsx-no-literals": ["error", {
|
|
56
56
|
readonly ignoreProps: false;
|
|
57
57
|
readonly noAttributeStrings: true;
|
|
58
|
-
readonly noStrings:
|
|
58
|
+
readonly noStrings: false;
|
|
59
59
|
}];
|
|
60
60
|
readonly "react/no-react-children": "error";
|
|
61
61
|
readonly "react/prefer-function-component": ["error", {
|
|
@@ -112,7 +112,7 @@ declare const RULES_REACT: {
|
|
|
112
112
|
readonly "react/jsx-no-literals": ["error", {
|
|
113
113
|
readonly ignoreProps: false;
|
|
114
114
|
readonly noAttributeStrings: true;
|
|
115
|
-
readonly noStrings:
|
|
115
|
+
readonly noStrings: false;
|
|
116
116
|
}];
|
|
117
117
|
readonly "react/no-react-children": "error";
|
|
118
118
|
readonly "react/prefer-function-component": ["error", {
|
|
@@ -47,7 +47,7 @@ const RULES_REACT_RESTRICTION = {
|
|
|
47
47
|
"react/jsx-no-literals": ["error", {
|
|
48
48
|
ignoreProps: false,
|
|
49
49
|
noAttributeStrings: true,
|
|
50
|
-
noStrings:
|
|
50
|
+
noStrings: false
|
|
51
51
|
}],
|
|
52
52
|
"react/no-react-children": "error",
|
|
53
53
|
"react/prefer-function-component": ["error", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","names":[],"sources":["../../../../src/presets/react/rules/react.ts"],"sourcesContent":["/**\n * No lint rules have been configured for class components.\n */\n\nimport type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_REACT_CORRECTNESS = {\n \"react/exhaustive-deps\": \"error\",\n \"react/forward-ref-uses-ref\": \"error\",\n \"react/jsx-key\": [\n \"error\",\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: false,\n warnOnDuplicates: true,\n },\n ],\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-props-no-spread-multi\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-render-return-value\": \"error\",\n \"react/no-string-refs\": [\n \"error\",\n {\n noTemplateLiterals: true,\n },\n ],\n \"react/no-this-in-sfc\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_NURSERY = {\n \"react/react-compiler\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PEDANTIC = {\n \"react/checked-requires-onchange-or-readonly\": [\n \"error\",\n {\n ignoreExclusiveCheckedAttribute: false,\n ignoreMissingProperties: false,\n },\n ],\n \"react/jsx-no-target-blank\": [\n \"error\",\n {\n allowReferrer: false,\n enforceDynamicLinks: \"always\",\n forms: true,\n links: true,\n warnOnSpreadAttributes: false,\n },\n ],\n \"react/jsx-no-useless-fragment\": [\n \"error\",\n {\n allowExpressions: true,\n },\n ],\n \"react/no-unescaped-entities\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PERF = {\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/no-array-index-key\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_RESTRICTION = {\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: true,\n submit: true,\n },\n ],\n \"react/jsx-no-literals\": [\n \"error\",\n {\n ignoreProps: false,\n noAttributeStrings: true,\n noStrings:
|
|
1
|
+
{"version":3,"file":"react.js","names":[],"sources":["../../../../src/presets/react/rules/react.ts"],"sourcesContent":["/**\n * No lint rules have been configured for class components.\n */\n\nimport type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_REACT_CORRECTNESS = {\n \"react/exhaustive-deps\": \"error\",\n \"react/forward-ref-uses-ref\": \"error\",\n \"react/jsx-key\": [\n \"error\",\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: false,\n warnOnDuplicates: true,\n },\n ],\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-props-no-spread-multi\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-render-return-value\": \"error\",\n \"react/no-string-refs\": [\n \"error\",\n {\n noTemplateLiterals: true,\n },\n ],\n \"react/no-this-in-sfc\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_NURSERY = {\n \"react/react-compiler\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PEDANTIC = {\n \"react/checked-requires-onchange-or-readonly\": [\n \"error\",\n {\n ignoreExclusiveCheckedAttribute: false,\n ignoreMissingProperties: false,\n },\n ],\n \"react/jsx-no-target-blank\": [\n \"error\",\n {\n allowReferrer: false,\n enforceDynamicLinks: \"always\",\n forms: true,\n links: true,\n warnOnSpreadAttributes: false,\n },\n ],\n \"react/jsx-no-useless-fragment\": [\n \"error\",\n {\n allowExpressions: true,\n },\n ],\n \"react/no-unescaped-entities\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PERF = {\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/no-array-index-key\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_RESTRICTION = {\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: true,\n submit: true,\n },\n ],\n \"react/jsx-no-literals\": [\n \"error\",\n {\n ignoreProps: false,\n noAttributeStrings: true,\n noStrings: false,\n },\n ],\n \"react/no-react-children\": \"error\",\n \"react/prefer-function-component\": [\n \"error\",\n {\n allowErrorBoundary: true,\n allowJsxUtilityClass: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT_STYLE = {\n \"react/jsx-boolean-value\": [\n \"error\",\n \"never\",\n ],\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n \"always\",\n ],\n \"react/jsx-fragments\": [\n \"error\",\n \"syntax\",\n ],\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: false,\n allowLeadingUnderscore: false,\n allowNamespace: true,\n },\n ],\n \"react/self-closing-comp\": [\n \"error\",\n {\n component: true,\n html: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT_SUSPICIOUS = {\n \"react/iframe-missing-sandbox\": \"error\",\n \"react/jsx-no-comment-textnodes\": \"error\",\n \"react/no-namespace\": \"error\",\n \"react/no-unstable-nested-components\": [\n \"error\",\n {\n allowAsProps: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT = {\n ...RULES_REACT_CORRECTNESS,\n ...RULES_REACT_NURSERY,\n ...RULES_REACT_PEDANTIC,\n ...RULES_REACT_PERF,\n ...RULES_REACT_RESTRICTION,\n ...RULES_REACT_STYLE,\n ...RULES_REACT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_REACT,\n RULES_REACT_CORRECTNESS,\n RULES_REACT_NURSERY,\n RULES_REACT_PEDANTIC,\n RULES_REACT_PERF,\n RULES_REACT_RESTRICTION,\n RULES_REACT_STYLE,\n RULES_REACT_SUSPICIOUS,\n};\n"],"mappings":";AAMA,MAAM,0BAA0B;CAC5B,yBAAyB;CACzB,8BAA8B;CAC9B,iBAAiB,CACb,SACA;EACI,wBAAwB;EACxB,0BAA0B;EAC1B,kBAAkB;CACtB,CACJ;CACA,gCAAgC;CAChC,sBAAsB;CACtB,mCAAmC;CACnC,0BAA0B;CAC1B,iCAAiC;CACjC,gCAAgC;CAChC,wBAAwB,CACpB,SACA,EACI,oBAAoB,KACxB,CACJ;CACA,wBAAwB;CACxB,uCAAuC;AAC3C;AAEA,MAAM,sBAAsB,EACxB,wBAAwB,QAC5B;AAEA,MAAM,uBAAuB;CACzB,+CAA+C,CAC3C,SACA;EACI,iCAAiC;EACjC,yBAAyB;CAC7B,CACJ;CACA,6BAA6B,CACzB,SACA;EACI,eAAe;EACf,qBAAqB;EACrB,OAAO;EACP,OAAO;EACP,wBAAwB;CAC5B,CACJ;CACA,iCAAiC,CAC7B,SACA,EACI,kBAAkB,KACtB,CACJ;CACA,+BAA+B;CAC/B,wBAAwB;AAC5B;AAEA,MAAM,mBAAmB;CACrB,2CAA2C;CAC3C,4BAA4B;AAChC;AAEA,MAAM,0BAA0B;CAC5B,yBAAyB,CACrB,SACA;EACI,QAAQ;EACR,OAAO;EACP,QAAQ;CACZ,CACJ;CACA,yBAAyB,CACrB,SACA;EACI,aAAa;EACb,oBAAoB;EACpB,WAAW;CACf,CACJ;CACA,2BAA2B;CAC3B,mCAAmC,CAC/B,SACA;EACI,oBAAoB;EACpB,sBAAsB;CAC1B,CACJ;AACJ;AAEA,MAAM,oBAAoB;CACtB,2BAA2B,CACvB,SACA,OACJ;CACA,kCAAkC,CAC9B,SACA,QACJ;CACA,uBAAuB,CACnB,SACA,QACJ;CACA,yBAAyB,CACrB,SACA;EACI,cAAc;EACd,wBAAwB;EACxB,gBAAgB;CACpB,CACJ;CACA,2BAA2B,CACvB,SACA;EACI,WAAW;EACX,MAAM;CACV,CACJ;AACJ;AAEA,MAAM,yBAAyB;CAC3B,gCAAgC;CAChC,kCAAkC;CAClC,sBAAsB;CACtB,uCAAuC,CACnC,SACA,EACI,cAAc,KAClB,CACJ;AACJ;AAEA,MAAM,cAAc;CAChB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -46,7 +46,7 @@ const RULES_REACT_RESTRICTION = {
|
|
|
46
46
|
"react/jsx-no-literals": ["error", {
|
|
47
47
|
ignoreProps: false,
|
|
48
48
|
noAttributeStrings: true,
|
|
49
|
-
noStrings:
|
|
49
|
+
noStrings: false
|
|
50
50
|
}],
|
|
51
51
|
"react/no-react-children": "error",
|
|
52
52
|
"react/prefer-function-component": ["error", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.mjs","names":[],"sources":["../../../../src/presets/react/rules/react.ts"],"sourcesContent":["/**\n * No lint rules have been configured for class components.\n */\n\nimport type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_REACT_CORRECTNESS = {\n \"react/exhaustive-deps\": \"error\",\n \"react/forward-ref-uses-ref\": \"error\",\n \"react/jsx-key\": [\n \"error\",\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: false,\n warnOnDuplicates: true,\n },\n ],\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-props-no-spread-multi\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-render-return-value\": \"error\",\n \"react/no-string-refs\": [\n \"error\",\n {\n noTemplateLiterals: true,\n },\n ],\n \"react/no-this-in-sfc\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_NURSERY = {\n \"react/react-compiler\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PEDANTIC = {\n \"react/checked-requires-onchange-or-readonly\": [\n \"error\",\n {\n ignoreExclusiveCheckedAttribute: false,\n ignoreMissingProperties: false,\n },\n ],\n \"react/jsx-no-target-blank\": [\n \"error\",\n {\n allowReferrer: false,\n enforceDynamicLinks: \"always\",\n forms: true,\n links: true,\n warnOnSpreadAttributes: false,\n },\n ],\n \"react/jsx-no-useless-fragment\": [\n \"error\",\n {\n allowExpressions: true,\n },\n ],\n \"react/no-unescaped-entities\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PERF = {\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/no-array-index-key\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_RESTRICTION = {\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: true,\n submit: true,\n },\n ],\n \"react/jsx-no-literals\": [\n \"error\",\n {\n ignoreProps: false,\n noAttributeStrings: true,\n noStrings:
|
|
1
|
+
{"version":3,"file":"react.mjs","names":[],"sources":["../../../../src/presets/react/rules/react.ts"],"sourcesContent":["/**\n * No lint rules have been configured for class components.\n */\n\nimport type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_REACT_CORRECTNESS = {\n \"react/exhaustive-deps\": \"error\",\n \"react/forward-ref-uses-ref\": \"error\",\n \"react/jsx-key\": [\n \"error\",\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: false,\n warnOnDuplicates: true,\n },\n ],\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/jsx-props-no-spread-multi\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-render-return-value\": \"error\",\n \"react/no-string-refs\": [\n \"error\",\n {\n noTemplateLiterals: true,\n },\n ],\n \"react/no-this-in-sfc\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_NURSERY = {\n \"react/react-compiler\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PEDANTIC = {\n \"react/checked-requires-onchange-or-readonly\": [\n \"error\",\n {\n ignoreExclusiveCheckedAttribute: false,\n ignoreMissingProperties: false,\n },\n ],\n \"react/jsx-no-target-blank\": [\n \"error\",\n {\n allowReferrer: false,\n enforceDynamicLinks: \"always\",\n forms: true,\n links: true,\n warnOnSpreadAttributes: false,\n },\n ],\n \"react/jsx-no-useless-fragment\": [\n \"error\",\n {\n allowExpressions: true,\n },\n ],\n \"react/no-unescaped-entities\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_PERF = {\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/no-array-index-key\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_REACT_RESTRICTION = {\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: true,\n submit: true,\n },\n ],\n \"react/jsx-no-literals\": [\n \"error\",\n {\n ignoreProps: false,\n noAttributeStrings: true,\n noStrings: false,\n },\n ],\n \"react/no-react-children\": \"error\",\n \"react/prefer-function-component\": [\n \"error\",\n {\n allowErrorBoundary: true,\n allowJsxUtilityClass: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT_STYLE = {\n \"react/jsx-boolean-value\": [\n \"error\",\n \"never\",\n ],\n \"react/jsx-curly-brace-presence\": [\n \"error\",\n \"always\",\n ],\n \"react/jsx-fragments\": [\n \"error\",\n \"syntax\",\n ],\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: false,\n allowLeadingUnderscore: false,\n allowNamespace: true,\n },\n ],\n \"react/self-closing-comp\": [\n \"error\",\n {\n component: true,\n html: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT_SUSPICIOUS = {\n \"react/iframe-missing-sandbox\": \"error\",\n \"react/jsx-no-comment-textnodes\": \"error\",\n \"react/no-namespace\": \"error\",\n \"react/no-unstable-nested-components\": [\n \"error\",\n {\n allowAsProps: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_REACT = {\n ...RULES_REACT_CORRECTNESS,\n ...RULES_REACT_NURSERY,\n ...RULES_REACT_PEDANTIC,\n ...RULES_REACT_PERF,\n ...RULES_REACT_RESTRICTION,\n ...RULES_REACT_STYLE,\n ...RULES_REACT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_REACT,\n RULES_REACT_CORRECTNESS,\n RULES_REACT_NURSERY,\n RULES_REACT_PEDANTIC,\n RULES_REACT_PERF,\n RULES_REACT_RESTRICTION,\n RULES_REACT_STYLE,\n RULES_REACT_SUSPICIOUS,\n};\n"],"mappings":"AAMA,MAAM,0BAA0B;CAC5B,yBAAyB;CACzB,8BAA8B;CAC9B,iBAAiB,CACb,SACA;EACI,wBAAwB;EACxB,0BAA0B;EAC1B,kBAAkB;CACtB,CACJ;CACA,gCAAgC;CAChC,sBAAsB;CACtB,mCAAmC;CACnC,0BAA0B;CAC1B,iCAAiC;CACjC,gCAAgC;CAChC,wBAAwB,CACpB,SACA,EACI,oBAAoB,KACxB,CACJ;CACA,wBAAwB;CACxB,uCAAuC;AAC3C;AAEA,MAAM,sBAAsB,EACxB,wBAAwB,QAC5B;AAEA,MAAM,uBAAuB;CACzB,+CAA+C,CAC3C,SACA;EACI,iCAAiC;EACjC,yBAAyB;CAC7B,CACJ;CACA,6BAA6B,CACzB,SACA;EACI,eAAe;EACf,qBAAqB;EACrB,OAAO;EACP,OAAO;EACP,wBAAwB;CAC5B,CACJ;CACA,iCAAiC,CAC7B,SACA,EACI,kBAAkB,KACtB,CACJ;CACA,+BAA+B;CAC/B,wBAAwB;AAC5B;AAEA,MAAM,mBAAmB;CACrB,2CAA2C;CAC3C,4BAA4B;AAChC;AAEA,MAAM,0BAA0B;CAC5B,yBAAyB,CACrB,SACA;EACI,QAAQ;EACR,OAAO;EACP,QAAQ;CACZ,CACJ;CACA,yBAAyB,CACrB,SACA;EACI,aAAa;EACb,oBAAoB;EACpB,WAAW;CACf,CACJ;CACA,2BAA2B;CAC3B,mCAAmC,CAC/B,SACA;EACI,oBAAoB;EACpB,sBAAsB;CAC1B,CACJ;AACJ;AAEA,MAAM,oBAAoB;CACtB,2BAA2B,CACvB,SACA,OACJ;CACA,kCAAkC,CAC9B,SACA,QACJ;CACA,uBAAuB,CACnB,SACA,QACJ;CACA,yBAAyB,CACrB,SACA;EACI,cAAc;EACd,wBAAwB;EACxB,gBAAgB;CACpB,CACJ;CACA,2BAA2B,CACvB,SACA;EACI,WAAW;EACX,MAAM;CACV,CACJ;AACJ;AAEA,MAAM,yBAAyB;CAC3B,gCAAgC;CAChC,kCAAkC;CAClC,sBAAsB;CACtB,uCAAuC,CACnC,SACA,EACI,cAAc,KAClB,CACJ;AACJ;AAEA,MAAM,cAAc;CAChB,GAAG;CACH,GAAG;CACH,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_vitest = require('../rules/vitest.js');
|
|
3
|
-
let es_toolkit = require("es-toolkit");
|
|
4
3
|
|
|
5
4
|
const vitestPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...require_index.PLUGIN_VITEST],
|
|
9
8
|
rules: { ...require_vitest.RULES_VITEST }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLUGIN_VITEST","RULES_VITEST"],"sources":["../../../../src/presets/vitest/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_VITEST","RULES_VITEST"],"sources":["../../../../src/presets/vitest/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_VITEST } from \"#/presets/vitest/plugin\";\nimport { RULES_VITEST } from \"#/presets/vitest/rules/vitest\";\n\nconst vitestPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_VITEST,\n ],\n rules: {\n ...RULES_VITEST,\n },\n },\n };\n };\n};\n\nexport { vitestPreset };\n"],"mappings":";;;AAKA,MAAM,qBAA6B;CAC/B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAGA,2BACP;GACA,OAAO,EACH,GAAGC,4BACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PLUGIN_VITEST } from "../plugin/index.mjs";
|
|
2
2
|
import { RULES_VITEST } from "../rules/vitest.mjs";
|
|
3
|
-
import { toMerged } from "es-toolkit";
|
|
4
3
|
|
|
5
4
|
const vitestPreset = () => {
|
|
6
|
-
return (
|
|
7
|
-
return { config:
|
|
5
|
+
return () => {
|
|
6
|
+
return { config: {
|
|
8
7
|
plugins: [...PLUGIN_VITEST],
|
|
9
8
|
rules: { ...RULES_VITEST }
|
|
10
|
-
}
|
|
9
|
+
} };
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/vitest/preset/index.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/vitest/preset/index.ts"],"sourcesContent":["import type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { PLUGIN_VITEST } from \"#/presets/vitest/plugin\";\nimport { RULES_VITEST } from \"#/presets/vitest/rules/vitest\";\n\nconst vitestPreset = (): Preset => {\n return (): PresetResult => {\n return {\n config: {\n plugins: [\n ...PLUGIN_VITEST,\n ],\n rules: {\n ...RULES_VITEST,\n },\n },\n };\n };\n};\n\nexport { vitestPreset };\n"],"mappings":";;;AAKA,MAAM,qBAA6B;CAC/B,aAA2B;EACvB,OAAO,EACH,QAAQ;GACJ,SAAS,CACL,GAAG,aACP;GACA,OAAO,EACH,GAAG,aACP;EACJ,EACJ;CACJ;AACJ"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PLUGIN_VUE } from "./plugin/index.js";
|
|
2
|
+
import { vuePreset } from "./preset/index.js";
|
|
3
|
+
import { RULES_VUE, RULES_VUE_CORRECTNESS, RULES_VUE_RESTRICTION, RULES_VUE_STYLE, RULES_VUE_SUSPICIOUS } from "./rules/vue.js";
|
|
4
|
+
export { PLUGIN_VUE, RULES_VUE, RULES_VUE_CORRECTNESS, RULES_VUE_RESTRICTION, RULES_VUE_STYLE, RULES_VUE_SUSPICIOUS, vuePreset };
|