@apst/oxlint 0.0.0-dev.20260324.f9d48c4e → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Oxlint Configuration
2
+
3
+ A shareable Oxlint configuration.
4
+
5
+ ## Usage
6
+
7
+ Implement the preset into `oxlint.config.ts`:
8
+
9
+ ```ts
10
+ import { defineConfig } from "@apst/oxlint";
11
+ import { commonPreset } from "@apst/oxlint/presets/common";
12
+ import { reactPreset } from "@apst/oxlint/presets/react";
13
+
14
+ export default defineConfig([
15
+ commonPreset(),
16
+ reactPreset(),
17
+ ]);
18
+ ```
19
+
20
+ It is possible to override the default configuration by passing an object to the `defineConfig` function:
21
+
22
+ ```ts
23
+ import { defineConfig } from "@apst/oxlint";
24
+ import { IGNORE_PATTERNS_DEFAULT } from "@apst/oxlint/constants/ignore-patterns";
25
+ import { commonPreset } from "@apst/oxlint/presets/common";
26
+ import { reactPreset } from "@apst/oxlint/presets/react";
27
+
28
+ export default defineConfig({
29
+ ignorePatterns: [
30
+ ...IGNORE_PATTERNS_DEFAULT,
31
+ // ...
32
+ ],
33
+ }, [
34
+ commonPreset(),
35
+ reactPreset(),
36
+ ]);
37
+ ```
38
+
39
+ ## License
40
+
41
+ This project is licensed under the terms of the MIT license.
@@ -1,14 +1,18 @@
1
+ /**
2
+ * `@stylistic/eslint-plugin` is used to enforce
3
+ * some stylistic rules that are currently missing in `oxfmt`.
4
+ */
1
5
  declare const RULES_STYLISTIC: {
2
- readonly "array-bracket-newline": ["error", {
6
+ readonly "@stylistic/eslint-plugin/array-bracket-newline": ["error", {
3
7
  readonly multiline: true;
8
+ readonly minItems: 1;
4
9
  }];
5
- readonly "array-bracket-spacing": ["error", "never"];
6
- readonly "array-element-newline": ["error", "always"];
7
- readonly "arrow-parens": ["error", "always"];
8
- readonly "arrow-spacing": ["error", {
9
- readonly before: true;
10
- readonly after: true;
10
+ readonly "@stylistic/eslint-plugin/array-element-newline": ["error", {
11
+ readonly multiline: true;
12
+ readonly minItems: 1;
11
13
  }];
14
+ readonly "@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"];
15
+ readonly "@stylistic/eslint-plugin/indent": ["error", 4];
12
16
  };
13
17
  export { RULES_STYLISTIC };
14
18
  //# sourceMappingURL=stylistic.d.ts.map
@@ -1,13 +1,15 @@
1
1
 
2
2
  const RULES_STYLISTIC = {
3
- "array-bracket-newline": ["error", { multiline: true }],
4
- "array-bracket-spacing": ["error", "never"],
5
- "array-element-newline": ["error", "always"],
6
- "arrow-parens": ["error", "always"],
7
- "arrow-spacing": ["error", {
8
- before: true,
9
- after: true
10
- }]
3
+ "@stylistic/eslint-plugin/array-bracket-newline": ["error", {
4
+ multiline: true,
5
+ minItems: 1
6
+ }],
7
+ "@stylistic/eslint-plugin/array-element-newline": ["error", {
8
+ multiline: true,
9
+ minItems: 1
10
+ }],
11
+ "@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"],
12
+ "@stylistic/eslint-plugin/indent": ["error", 4]
11
13
  };
12
14
 
13
15
  exports.RULES_STYLISTIC = RULES_STYLISTIC;
@@ -1 +1 @@
1
- {"version":3,"file":"stylistic.js","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_STYLISTIC = {\n \"array-bracket-newline\": [\n \"error\",\n {\n multiline: true,\n },\n ],\n \"array-bracket-spacing\": [\n \"error\",\n \"never\",\n ],\n \"array-element-newline\": [\n \"error\",\n \"always\",\n ],\n \"arrow-parens\": [\n \"error\",\n \"always\"\n ],\n \"arrow-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n },\n ],\n} as const satisfies LintRules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":";AAEA,MAAM,kBAAkB;CACpB,yBAAyB,CACrB,SACA,EACI,WAAW,KACf,CACJ;CACA,yBAAyB,CACrB,SACA,OACJ;CACA,yBAAyB,CACrB,SACA,QACJ;CACA,gBAAgB,CACZ,SACA,QACJ;CACA,iBAAiB,CACb,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;AACJ"}
1
+ {"version":3,"file":"stylistic.js","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["/**\n * `@stylistic/eslint-plugin` is used to enforce\n * some stylistic rules that are currently missing in `oxfmt`.\n */\n\nimport type { UnprefixedRuleOptions as RawRules } from \"@stylistic/eslint-plugin\";\n\ntype FirstElement<T> = T extends readonly [\n infer U,\n ...unknown[],\n]\n ? U\n : T extends readonly (infer U)[]\n ? U\n : never;\n\ntype Rules<T extends RawRules = RawRules> = {\n [K in keyof T as `@stylistic/eslint-plugin/${K & string}`]?: [\n (\"allow\" | \"off\" | \"warn\" | \"error\" | \"deny\") | number,\n FirstElement<T[K]>,\n ];\n};\n\nconst RULES_STYLISTIC = {\n \"@stylistic/eslint-plugin/array-bracket-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n \"@stylistic/eslint-plugin/array-element-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n // make every array element come with a trailing comma\n \"@stylistic/eslint-plugin/comma-dangle\": [\n \"error\",\n \"always-multiline\",\n ],\n // make every newline rules consistent with 4 spaces indent\n \"@stylistic/eslint-plugin/indent\": [\n \"error\",\n 4,\n ],\n} as const satisfies Rules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":";AAuBA,MAAM,kBAAkB;CACpB,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CAEA,yCAAyC,CACrC,SACA,kBACJ;CAEA,mCAAmC,CAC/B,SACA,CACJ;AACJ"}
@@ -1,12 +1,14 @@
1
1
  const RULES_STYLISTIC = {
2
- "array-bracket-newline": ["error", { multiline: true }],
3
- "array-bracket-spacing": ["error", "never"],
4
- "array-element-newline": ["error", "always"],
5
- "arrow-parens": ["error", "always"],
6
- "arrow-spacing": ["error", {
7
- before: true,
8
- after: true
9
- }]
2
+ "@stylistic/eslint-plugin/array-bracket-newline": ["error", {
3
+ multiline: true,
4
+ minItems: 1
5
+ }],
6
+ "@stylistic/eslint-plugin/array-element-newline": ["error", {
7
+ multiline: true,
8
+ minItems: 1
9
+ }],
10
+ "@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"],
11
+ "@stylistic/eslint-plugin/indent": ["error", 4]
10
12
  };
11
13
 
12
14
  export { RULES_STYLISTIC };
@@ -1 +1 @@
1
- {"version":3,"file":"stylistic.mjs","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_STYLISTIC = {\n \"array-bracket-newline\": [\n \"error\",\n {\n multiline: true,\n },\n ],\n \"array-bracket-spacing\": [\n \"error\",\n \"never\",\n ],\n \"array-element-newline\": [\n \"error\",\n \"always\",\n ],\n \"arrow-parens\": [\n \"error\",\n \"always\"\n ],\n \"arrow-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n },\n ],\n} as const satisfies LintRules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":"AAEA,MAAM,kBAAkB;CACpB,yBAAyB,CACrB,SACA,EACI,WAAW,KACf,CACJ;CACA,yBAAyB,CACrB,SACA,OACJ;CACA,yBAAyB,CACrB,SACA,QACJ;CACA,gBAAgB,CACZ,SACA,QACJ;CACA,iBAAiB,CACb,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;AACJ"}
1
+ {"version":3,"file":"stylistic.mjs","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["/**\n * `@stylistic/eslint-plugin` is used to enforce\n * some stylistic rules that are currently missing in `oxfmt`.\n */\n\nimport type { UnprefixedRuleOptions as RawRules } from \"@stylistic/eslint-plugin\";\n\ntype FirstElement<T> = T extends readonly [\n infer U,\n ...unknown[],\n]\n ? U\n : T extends readonly (infer U)[]\n ? U\n : never;\n\ntype Rules<T extends RawRules = RawRules> = {\n [K in keyof T as `@stylistic/eslint-plugin/${K & string}`]?: [\n (\"allow\" | \"off\" | \"warn\" | \"error\" | \"deny\") | number,\n FirstElement<T[K]>,\n ];\n};\n\nconst RULES_STYLISTIC = {\n \"@stylistic/eslint-plugin/array-bracket-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n \"@stylistic/eslint-plugin/array-element-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n // make every array element come with a trailing comma\n \"@stylistic/eslint-plugin/comma-dangle\": [\n \"error\",\n \"always-multiline\",\n ],\n // make every newline rules consistent with 4 spaces indent\n \"@stylistic/eslint-plugin/indent\": [\n \"error\",\n 4,\n ],\n} as const satisfies Rules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":"AAuBA,MAAM,kBAAkB;CACpB,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CAEA,yCAAyC,CACrC,SACA,kBACJ;CAEA,mCAAmC,CAC/B,SACA,CACJ;AACJ"}
@@ -76,10 +76,7 @@ declare const RULES_UNICORN_SUSPICIOUS: {
76
76
  readonly "unicorn/no-array-sort": ["error", {
77
77
  readonly allowExpressionStatement: true;
78
78
  }];
79
- readonly "unicorn/no-instanceof-builtins": ["error", {
80
- readonly strategy: "strict";
81
- readonly useErrorIsError: false;
82
- }];
79
+ readonly "unicorn/no-instanceof-builtins": ["allow"];
83
80
  };
84
81
  declare const RULES_UNICORN: {
85
82
  readonly "unicorn/consistent-function-scoping": "error";
@@ -88,10 +85,7 @@ declare const RULES_UNICORN: {
88
85
  readonly "unicorn/no-array-sort": ["error", {
89
86
  readonly allowExpressionStatement: true;
90
87
  }];
91
- readonly "unicorn/no-instanceof-builtins": ["error", {
92
- readonly strategy: "strict";
93
- readonly useErrorIsError: false;
94
- }];
88
+ readonly "unicorn/no-instanceof-builtins": ["allow"];
95
89
  readonly "unicorn/consistent-date-clone": "error";
96
90
  readonly "unicorn/consistent-existence-index-check": "error";
97
91
  readonly "unicorn/empty-brace-spaces": "error";
@@ -69,10 +69,7 @@ const RULES_UNICORN_SUSPICIOUS = {
69
69
  "unicorn/no-accessor-recursion": "error",
70
70
  "unicorn/no-array-reverse": "error",
71
71
  "unicorn/no-array-sort": ["error", { allowExpressionStatement: true }],
72
- "unicorn/no-instanceof-builtins": ["error", {
73
- strategy: "strict",
74
- useErrorIsError: false
75
- }]
72
+ "unicorn/no-instanceof-builtins": ["allow"]
76
73
  };
77
74
  const RULES_UNICORN = {
78
75
  ...RULES_UNICORN_PEDANTIC,
@@ -1 +1 @@
1
- {"version":3,"file":"unicorn.js","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"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,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,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,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;CACA,kCAAkC,CAC9B,SACA;EACI,UAAU;EACV,iBAAiB;CACrB,CACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
1
+ {"version":3,"file":"unicorn.js","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"unicorn/no-instanceof-builtins\": [\n \"allow\",\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 RUL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,CACJ;CACA,kCAAkC,CAC9B,OACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
@@ -68,10 +68,7 @@ const RULES_UNICORN_SUSPICIOUS = {
68
68
  "unicorn/no-accessor-recursion": "error",
69
69
  "unicorn/no-array-reverse": "error",
70
70
  "unicorn/no-array-sort": ["error", { allowExpressionStatement: true }],
71
- "unicorn/no-instanceof-builtins": ["error", {
72
- strategy: "strict",
73
- useErrorIsError: false
74
- }]
71
+ "unicorn/no-instanceof-builtins": ["allow"]
75
72
  };
76
73
  const RULES_UNICORN = {
77
74
  ...RULES_UNICORN_PEDANTIC,
@@ -1 +1 @@
1
- {"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"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,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,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,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;CACA,kCAAkC,CAC9B,SACA;EACI,UAAU;EACV,iBAAiB;CACrB,CACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
1
+ {"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"unicorn/no-instanceof-builtins\": [\n \"allow\",\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_UNIC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,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apst/oxlint",
3
- "version": "0.0.0-dev.20260324.f9d48c4e",
3
+ "version": "0.1.0",
4
4
  "description": "A shareable Oxlint configuration",
5
5
  "keywords": [
6
6
  "oxlint",
@@ -79,7 +79,7 @@
79
79
  "dist"
80
80
  ],
81
81
  "dependencies": {
82
- "@stylistic/eslint-plugin": "^5.10.0",
82
+ "@stylistic/eslint-plugin": "6.0.0-beta.4",
83
83
  "es-toolkit": "^1.40.0",
84
84
  "ts-vista": "~0.2.3"
85
85
  },