@apst/oxlint 0.0.0-dev.20260324.019d1d21 → 0.0.0-dev.20260324.ab11d23a
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/@types/preset.d.ts +1 -1
- package/dist/constants/default.d.ts +1 -1
- package/dist/constants/default.js.map +1 -1
- package/dist/constants/default.mjs.map +1 -1
- package/dist/constants/ignore-patterns.d.ts +1 -1
- package/dist/constants/ignore-patterns.js +1 -0
- package/dist/constants/ignore-patterns.js.map +1 -1
- package/dist/constants/ignore-patterns.mjs +1 -0
- package/dist/constants/ignore-patterns.mjs.map +1 -1
- package/dist/functions/define.js.map +1 -1
- package/dist/functions/define.mjs.map +1 -1
- package/dist/functions/merge.js.map +1 -1
- package/dist/functions/merge.mjs.map +1 -1
- package/dist/presets/common/index.d.ts +3 -2
- package/dist/presets/common/index.js +3 -0
- package/dist/presets/common/index.mjs +3 -2
- package/dist/presets/common/plugin/index.d.ts +2 -1
- package/dist/presets/common/plugin/index.js +2 -0
- package/dist/presets/common/plugin/index.js.map +1 -1
- package/dist/presets/common/plugin/index.mjs +2 -1
- package/dist/presets/common/plugin/index.mjs.map +1 -1
- package/dist/presets/common/preset/index.js +4 -1
- package/dist/presets/common/preset/index.js.map +1 -1
- package/dist/presets/common/preset/index.mjs +5 -2
- package/dist/presets/common/preset/index.mjs.map +1 -1
- package/dist/presets/common/rules/eslint.d.ts +10 -28
- package/dist/presets/common/rules/eslint.js +5 -12
- package/dist/presets/common/rules/eslint.js.map +1 -1
- package/dist/presets/common/rules/eslint.mjs +5 -12
- package/dist/presets/common/rules/eslint.mjs.map +1 -1
- package/dist/presets/common/rules/import.d.ts +8 -4
- package/dist/presets/common/rules/import.js +4 -2
- package/dist/presets/common/rules/import.js.map +1 -1
- package/dist/presets/common/rules/import.mjs +4 -2
- package/dist/presets/common/rules/import.mjs.map +1 -1
- package/dist/presets/common/rules/oxc.js.map +1 -1
- package/dist/presets/common/rules/oxc.mjs.map +1 -1
- package/dist/presets/common/rules/promise.js.map +1 -1
- package/dist/presets/common/rules/promise.mjs.map +1 -1
- package/dist/presets/common/rules/stylistic.d.ts +61 -0
- package/dist/presets/common/rules/stylistic.js +61 -0
- package/dist/presets/common/rules/stylistic.js.map +1 -0
- package/dist/presets/common/rules/stylistic.mjs +60 -0
- package/dist/presets/common/rules/stylistic.mjs.map +1 -0
- package/dist/presets/common/rules/typescript.d.ts +2 -2
- package/dist/presets/common/rules/typescript.js +1 -1
- package/dist/presets/common/rules/typescript.js.map +1 -1
- package/dist/presets/common/rules/typescript.mjs +1 -1
- package/dist/presets/common/rules/typescript.mjs.map +1 -1
- package/dist/presets/common/rules/unicorn.d.ts +0 -6
- package/dist/presets/common/rules/unicorn.js +0 -1
- package/dist/presets/common/rules/unicorn.js.map +1 -1
- package/dist/presets/common/rules/unicorn.mjs +0 -1
- package/dist/presets/common/rules/unicorn.mjs.map +1 -1
- package/dist/presets/jsx/plugin/index.js.map +1 -1
- package/dist/presets/jsx/plugin/index.mjs.map +1 -1
- package/dist/presets/jsx/preset/index.js.map +1 -1
- package/dist/presets/jsx/preset/index.mjs.map +1 -1
- package/dist/presets/jsx/rules/jsx-a11y.js.map +1 -1
- package/dist/presets/jsx/rules/jsx-a11y.mjs.map +1 -1
- package/dist/presets/next/plugin/index.js.map +1 -1
- package/dist/presets/next/plugin/index.mjs.map +1 -1
- package/dist/presets/next/preset/index.js.map +1 -1
- package/dist/presets/next/preset/index.mjs.map +1 -1
- package/dist/presets/next/rules/nextjs.js.map +1 -1
- package/dist/presets/next/rules/nextjs.mjs.map +1 -1
- package/dist/presets/node/plugin/index.js.map +1 -1
- package/dist/presets/node/plugin/index.mjs.map +1 -1
- package/dist/presets/node/preset/index.js.map +1 -1
- package/dist/presets/node/preset/index.mjs.map +1 -1
- package/dist/presets/node/rules/node.js.map +1 -1
- package/dist/presets/node/rules/node.mjs.map +1 -1
- package/dist/presets/react/plugin/index.js.map +1 -1
- package/dist/presets/react/plugin/index.mjs.map +1 -1
- package/dist/presets/react/preset/index.js.map +1 -1
- package/dist/presets/react/preset/index.mjs.map +1 -1
- package/dist/presets/react/rules/react.js.map +1 -1
- package/dist/presets/react/rules/react.mjs.map +1 -1
- package/dist/presets/vitest/plugin/index.js.map +1 -1
- package/dist/presets/vitest/plugin/index.mjs.map +1 -1
- package/dist/presets/vitest/preset/index.js.map +1 -1
- package/dist/presets/vitest/preset/index.mjs.map +1 -1
- package/dist/presets/vitest/rules/vitest.js.map +1 -1
- package/dist/presets/vitest/rules/vitest.mjs.map +1 -1
- package/package.json +19 -19
|
@@ -10,6 +10,10 @@ declare const RULES_IMPORT_RESTRICTION: {
|
|
|
10
10
|
readonly "import/extensions": ["error", "always", {
|
|
11
11
|
readonly js: "never";
|
|
12
12
|
readonly ts: "never";
|
|
13
|
+
readonly mjs: "never";
|
|
14
|
+
readonly mts: "never";
|
|
15
|
+
readonly cjs: "never";
|
|
16
|
+
readonly cts: "never";
|
|
13
17
|
readonly jsx: "never";
|
|
14
18
|
readonly tsx: "never";
|
|
15
19
|
readonly checkTypeImports: true;
|
|
@@ -19,9 +23,7 @@ declare const RULES_IMPORT_RESTRICTION: {
|
|
|
19
23
|
};
|
|
20
24
|
declare const RULES_IMPORT_STYLE: {
|
|
21
25
|
readonly "import/consistent-type-specifier-style": ["error", "prefer-top-level"];
|
|
22
|
-
readonly "import/exports-last": "error";
|
|
23
26
|
readonly "import/first": "error";
|
|
24
|
-
readonly "import/group-exports": "error";
|
|
25
27
|
readonly "import/no-duplicates": ["error", {
|
|
26
28
|
readonly considerQueryString: true;
|
|
27
29
|
readonly preferInline: false;
|
|
@@ -38,9 +40,7 @@ declare const RULES_IMPORT: {
|
|
|
38
40
|
readonly "import/no-named-as-default": "error";
|
|
39
41
|
readonly "import/no-self-import": "error";
|
|
40
42
|
readonly "import/consistent-type-specifier-style": ["error", "prefer-top-level"];
|
|
41
|
-
readonly "import/exports-last": "error";
|
|
42
43
|
readonly "import/first": "error";
|
|
43
|
-
readonly "import/group-exports": "error";
|
|
44
44
|
readonly "import/no-duplicates": ["error", {
|
|
45
45
|
readonly considerQueryString: true;
|
|
46
46
|
readonly preferInline: false;
|
|
@@ -49,6 +49,10 @@ declare const RULES_IMPORT: {
|
|
|
49
49
|
readonly "import/extensions": ["error", "always", {
|
|
50
50
|
readonly js: "never";
|
|
51
51
|
readonly ts: "never";
|
|
52
|
+
readonly mjs: "never";
|
|
53
|
+
readonly mts: "never";
|
|
54
|
+
readonly cjs: "never";
|
|
55
|
+
readonly cts: "never";
|
|
52
56
|
readonly jsx: "never";
|
|
53
57
|
readonly tsx: "never";
|
|
54
58
|
readonly checkTypeImports: true;
|
|
@@ -14,6 +14,10 @@ const RULES_IMPORT_RESTRICTION = {
|
|
|
14
14
|
{
|
|
15
15
|
js: "never",
|
|
16
16
|
ts: "never",
|
|
17
|
+
mjs: "never",
|
|
18
|
+
mts: "never",
|
|
19
|
+
cjs: "never",
|
|
20
|
+
cts: "never",
|
|
17
21
|
jsx: "never",
|
|
18
22
|
tsx: "never",
|
|
19
23
|
checkTypeImports: true,
|
|
@@ -24,9 +28,7 @@ const RULES_IMPORT_RESTRICTION = {
|
|
|
24
28
|
};
|
|
25
29
|
const RULES_IMPORT_STYLE = {
|
|
26
30
|
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
27
|
-
"import/exports-last": "error",
|
|
28
31
|
"import/first": "error",
|
|
29
|
-
"import/group-exports": "error",
|
|
30
32
|
"import/no-duplicates": ["error", {
|
|
31
33
|
considerQueryString: true,
|
|
32
34
|
preferInline: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n \"import/default\": \"error\",\n \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n \"import/export\": \"error\",\n \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n \"import/extensions\": [\n \"error\",\n \"always\",\n {\n // source\n js: \"never\",\n ts: \"never\",\n jsx: \"never\",\n tsx: \"never\",\n // configurations\n checkTypeImports: true,\n ignorePackages: true,\n },\n ],\n \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n \"import/consistent-type-specifier-style\": [\n \"error\",\n \"prefer-top-level\",\n ],\n \"import/
|
|
1
|
+
{"version":3,"file":"import.js","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n \"import/default\": \"error\",\n \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n \"import/export\": \"error\",\n \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n \"import/extensions\": [\n \"error\",\n \"always\",\n {\n // source\n js: \"never\",\n ts: \"never\",\n mjs: \"never\",\n mts: \"never\",\n cjs: \"never\",\n cts: \"never\",\n jsx: \"never\",\n tsx: \"never\",\n // configurations\n checkTypeImports: true,\n ignorePackages: true,\n },\n ],\n \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n \"import/consistent-type-specifier-style\": [\n \"error\",\n \"prefer-top-level\",\n ],\n \"import/first\": \"error\",\n \"import/no-duplicates\": [\n \"error\",\n {\n considerQueryString: true,\n preferInline: false,\n },\n ],\n \"import/no-mutable-exports\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_SUSPICIOUS = {\n \"import/no-empty-named-blocks\": \"error\",\n \"import/no-named-as-default\": \"error\",\n \"import/no-self-import\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT = {\n ...RULES_IMPORT_CORRECTNESS,\n ...RULES_IMPORT_NURSERY,\n ...RULES_IMPORT_RESTRICTION,\n ...RULES_IMPORT_STYLE,\n ...RULES_IMPORT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_IMPORT,\n RULES_IMPORT_CORRECTNESS,\n RULES_IMPORT_NURSERY,\n RULES_IMPORT_RESTRICTION,\n RULES_IMPORT_STYLE,\n RULES_IMPORT_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,2BAA2B;CAC7B,kBAAkB;CAClB,oBAAoB;AACxB;AAEA,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,gBAAgB;AACpB;AAEA,MAAM,2BAA2B;CAC7B,qBAAqB;EACjB;EACA;EACA;GAEI,IAAI;GACJ,IAAI;GACJ,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GAEL,kBAAkB;GAClB,gBAAgB;EACpB;CACJ;CACA,mBAAmB;AACvB;AAEA,MAAM,qBAAqB;CACvB,0CAA0C,CACtC,SACA,kBACJ;CACA,gBAAgB;CAChB,wBAAwB,CACpB,SACA;EACI,qBAAqB;EACrB,cAAc;CAClB,CACJ;CACA,6BAA6B;AACjC;AAEA,MAAM,0BAA0B;CAC5B,gCAAgC;CAChC,8BAA8B;CAC9B,yBAAyB;AAC7B;AAEA,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -13,6 +13,10 @@ const RULES_IMPORT_RESTRICTION = {
|
|
|
13
13
|
{
|
|
14
14
|
js: "never",
|
|
15
15
|
ts: "never",
|
|
16
|
+
mjs: "never",
|
|
17
|
+
mts: "never",
|
|
18
|
+
cjs: "never",
|
|
19
|
+
cts: "never",
|
|
16
20
|
jsx: "never",
|
|
17
21
|
tsx: "never",
|
|
18
22
|
checkTypeImports: true,
|
|
@@ -23,9 +27,7 @@ const RULES_IMPORT_RESTRICTION = {
|
|
|
23
27
|
};
|
|
24
28
|
const RULES_IMPORT_STYLE = {
|
|
25
29
|
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
26
|
-
"import/exports-last": "error",
|
|
27
30
|
"import/first": "error",
|
|
28
|
-
"import/group-exports": "error",
|
|
29
31
|
"import/no-duplicates": ["error", {
|
|
30
32
|
considerQueryString: true,
|
|
31
33
|
preferInline: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.mjs","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n \"import/default\": \"error\",\n \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n \"import/export\": \"error\",\n \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n \"import/extensions\": [\n \"error\",\n \"always\",\n {\n // source\n js: \"never\",\n ts: \"never\",\n jsx: \"never\",\n tsx: \"never\",\n // configurations\n checkTypeImports: true,\n ignorePackages: true,\n },\n ],\n \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n \"import/consistent-type-specifier-style\": [\n \"error\",\n \"prefer-top-level\",\n ],\n \"import/
|
|
1
|
+
{"version":3,"file":"import.mjs","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n \"import/default\": \"error\",\n \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n \"import/export\": \"error\",\n \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n \"import/extensions\": [\n \"error\",\n \"always\",\n {\n // source\n js: \"never\",\n ts: \"never\",\n mjs: \"never\",\n mts: \"never\",\n cjs: \"never\",\n cts: \"never\",\n jsx: \"never\",\n tsx: \"never\",\n // configurations\n checkTypeImports: true,\n ignorePackages: true,\n },\n ],\n \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n \"import/consistent-type-specifier-style\": [\n \"error\",\n \"prefer-top-level\",\n ],\n \"import/first\": \"error\",\n \"import/no-duplicates\": [\n \"error\",\n {\n considerQueryString: true,\n preferInline: false,\n },\n ],\n \"import/no-mutable-exports\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_SUSPICIOUS = {\n \"import/no-empty-named-blocks\": \"error\",\n \"import/no-named-as-default\": \"error\",\n \"import/no-self-import\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT = {\n ...RULES_IMPORT_CORRECTNESS,\n ...RULES_IMPORT_NURSERY,\n ...RULES_IMPORT_RESTRICTION,\n ...RULES_IMPORT_STYLE,\n ...RULES_IMPORT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_IMPORT,\n RULES_IMPORT_CORRECTNESS,\n RULES_IMPORT_NURSERY,\n RULES_IMPORT_RESTRICTION,\n RULES_IMPORT_STYLE,\n RULES_IMPORT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,2BAA2B;CAC7B,kBAAkB;CAClB,oBAAoB;AACxB;AAEA,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,gBAAgB;AACpB;AAEA,MAAM,2BAA2B;CAC7B,qBAAqB;EACjB;EACA;EACA;GAEI,IAAI;GACJ,IAAI;GACJ,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GAEL,kBAAkB;GAClB,gBAAgB;EACpB;CACJ;CACA,mBAAmB;AACvB;AAEA,MAAM,qBAAqB;CACvB,0CAA0C,CACtC,SACA,kBACJ;CACA,gBAAgB;CAChB,wBAAwB,CACpB,SACA;EACI,qBAAqB;EACrB,cAAc;CAClB,CACJ;CACA,6BAA6B;AACjC;AAEA,MAAM,0BAA0B;CAC5B,gCAAgC;CAChC,8BAA8B;CAC9B,yBAAyB;AAC7B;AAEA,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxc.js","names":[],"sources":["../../../../src/presets/common/rules/oxc.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_OXC_NURSERY = {\n \"oxc/branches-sharing-code\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_RESTRICTION = {\n \"oxc/no-const-enum\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_SUSPICIOUS = {\n \"oxc/approx-constant\": \"error\",\n \"oxc/misrefactored-assign-op\": \"error\",\n \"oxc/no-this-in-exported-function\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC = {\n ...RULES_OXC_NURSERY,\n ...RULES_OXC_RESTRICTION,\n ...RULES_OXC_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };\n"],"mappings":";AAEA,MAAM,oBAAoB,EACtB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"oxc.js","names":[],"sources":["../../../../src/presets/common/rules/oxc.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_OXC_NURSERY = {\n \"oxc/branches-sharing-code\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_RESTRICTION = {\n \"oxc/no-const-enum\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_SUSPICIOUS = {\n \"oxc/approx-constant\": \"error\",\n \"oxc/misrefactored-assign-op\": \"error\",\n \"oxc/no-this-in-exported-function\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC = {\n ...RULES_OXC_NURSERY,\n ...RULES_OXC_RESTRICTION,\n ...RULES_OXC_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };\n"],"mappings":";AAEA,MAAM,oBAAoB,EACtB,6BAA6B,QACjC;AAEA,MAAM,wBAAwB,EAC1B,qBAAqB,QACzB;AAEA,MAAM,uBAAuB;CACzB,uBAAuB;CACvB,+BAA+B;CAC/B,oCAAoC;AACxC;AAEA,MAAM,YAAY;CACd,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxc.mjs","names":[],"sources":["../../../../src/presets/common/rules/oxc.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_OXC_NURSERY = {\n \"oxc/branches-sharing-code\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_RESTRICTION = {\n \"oxc/no-const-enum\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_SUSPICIOUS = {\n \"oxc/approx-constant\": \"error\",\n \"oxc/misrefactored-assign-op\": \"error\",\n \"oxc/no-this-in-exported-function\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC = {\n ...RULES_OXC_NURSERY,\n ...RULES_OXC_RESTRICTION,\n ...RULES_OXC_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };\n"],"mappings":"AAEA,MAAM,oBAAoB,EACtB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"oxc.mjs","names":[],"sources":["../../../../src/presets/common/rules/oxc.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_OXC_NURSERY = {\n \"oxc/branches-sharing-code\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_RESTRICTION = {\n \"oxc/no-const-enum\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_SUSPICIOUS = {\n \"oxc/approx-constant\": \"error\",\n \"oxc/misrefactored-assign-op\": \"error\",\n \"oxc/no-this-in-exported-function\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC = {\n ...RULES_OXC_NURSERY,\n ...RULES_OXC_RESTRICTION,\n ...RULES_OXC_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };\n"],"mappings":"AAEA,MAAM,oBAAoB,EACtB,6BAA6B,QACjC;AAEA,MAAM,wBAAwB,EAC1B,qBAAqB,QACzB;AAEA,MAAM,uBAAuB;CACzB,uBAAuB;CACvB,+BAA+B;CAC/B,oCAAoC;AACxC;AAEA,MAAM,YAAY;CACd,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promise.js","names":[],"sources":["../../../../src/presets/common/rules/promise.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_PROMISE_CORRECTNESS = {\n \"promise/no-new-statics\": \"error\",\n \"promise/valid-params\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_NURSERY = {\n \"promise/no-return-in-finally\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_RESTRICTION = {\n \"promise/catch-or-return\": [\n \"error\",\n {\n allowFinally: true,\n allowThen: false,\n },\n ],\n \"promise/spec-only\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_STYLE = {\n \"promise/prefer-catch\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_SUSPICIOUS = {\n \"promise/no-multiple-resolved\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE = {\n ...RULES_PROMISE_CORRECTNESS,\n ...RULES_PROMISE_NURSERY,\n ...RULES_PROMISE_RESTRICTION,\n ...RULES_PROMISE_STYLE,\n ...RULES_PROMISE_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_PROMISE,\n RULES_PROMISE_CORRECTNESS,\n RULES_PROMISE_NURSERY,\n RULES_PROMISE_RESTRICTION,\n RULES_PROMISE_STYLE,\n RULES_PROMISE_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,4BAA4B;CAC9B,0BAA0B;CAC1B,wBAAwB;
|
|
1
|
+
{"version":3,"file":"promise.js","names":[],"sources":["../../../../src/presets/common/rules/promise.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_PROMISE_CORRECTNESS = {\n \"promise/no-new-statics\": \"error\",\n \"promise/valid-params\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_NURSERY = {\n \"promise/no-return-in-finally\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_RESTRICTION = {\n \"promise/catch-or-return\": [\n \"error\",\n {\n allowFinally: true,\n allowThen: false,\n },\n ],\n \"promise/spec-only\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_STYLE = {\n \"promise/prefer-catch\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_SUSPICIOUS = {\n \"promise/no-multiple-resolved\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE = {\n ...RULES_PROMISE_CORRECTNESS,\n ...RULES_PROMISE_NURSERY,\n ...RULES_PROMISE_RESTRICTION,\n ...RULES_PROMISE_STYLE,\n ...RULES_PROMISE_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_PROMISE,\n RULES_PROMISE_CORRECTNESS,\n RULES_PROMISE_NURSERY,\n RULES_PROMISE_RESTRICTION,\n RULES_PROMISE_STYLE,\n RULES_PROMISE_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,4BAA4B;CAC9B,0BAA0B;CAC1B,wBAAwB;AAC5B;AAEA,MAAM,wBAAwB,EAC1B,gCAAgC,QACpC;AAEA,MAAM,4BAA4B;CAC9B,2BAA2B,CACvB,SACA;EACI,cAAc;EACd,WAAW;CACf,CACJ;CACA,qBAAqB;AACzB;AAEA,MAAM,sBAAsB,EACxB,wBAAwB,QAC5B;AAEA,MAAM,2BAA2B,EAC7B,gCAAgC,QACpC;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promise.mjs","names":[],"sources":["../../../../src/presets/common/rules/promise.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_PROMISE_CORRECTNESS = {\n \"promise/no-new-statics\": \"error\",\n \"promise/valid-params\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_NURSERY = {\n \"promise/no-return-in-finally\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_RESTRICTION = {\n \"promise/catch-or-return\": [\n \"error\",\n {\n allowFinally: true,\n allowThen: false,\n },\n ],\n \"promise/spec-only\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_STYLE = {\n \"promise/prefer-catch\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_SUSPICIOUS = {\n \"promise/no-multiple-resolved\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE = {\n ...RULES_PROMISE_CORRECTNESS,\n ...RULES_PROMISE_NURSERY,\n ...RULES_PROMISE_RESTRICTION,\n ...RULES_PROMISE_STYLE,\n ...RULES_PROMISE_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_PROMISE,\n RULES_PROMISE_CORRECTNESS,\n RULES_PROMISE_NURSERY,\n RULES_PROMISE_RESTRICTION,\n RULES_PROMISE_STYLE,\n RULES_PROMISE_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,4BAA4B;CAC9B,0BAA0B;CAC1B,wBAAwB;
|
|
1
|
+
{"version":3,"file":"promise.mjs","names":[],"sources":["../../../../src/presets/common/rules/promise.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_PROMISE_CORRECTNESS = {\n \"promise/no-new-statics\": \"error\",\n \"promise/valid-params\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_NURSERY = {\n \"promise/no-return-in-finally\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_RESTRICTION = {\n \"promise/catch-or-return\": [\n \"error\",\n {\n allowFinally: true,\n allowThen: false,\n },\n ],\n \"promise/spec-only\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_STYLE = {\n \"promise/prefer-catch\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE_SUSPICIOUS = {\n \"promise/no-multiple-resolved\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_PROMISE = {\n ...RULES_PROMISE_CORRECTNESS,\n ...RULES_PROMISE_NURSERY,\n ...RULES_PROMISE_RESTRICTION,\n ...RULES_PROMISE_STYLE,\n ...RULES_PROMISE_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_PROMISE,\n RULES_PROMISE_CORRECTNESS,\n RULES_PROMISE_NURSERY,\n RULES_PROMISE_RESTRICTION,\n RULES_PROMISE_STYLE,\n RULES_PROMISE_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,4BAA4B;CAC9B,0BAA0B;CAC1B,wBAAwB;AAC5B;AAEA,MAAM,wBAAwB,EAC1B,gCAAgC,QACpC;AAEA,MAAM,4BAA4B;CAC9B,2BAA2B,CACvB,SACA;EACI,cAAc;EACd,WAAW;CACf,CACJ;CACA,qBAAqB;AACzB;AAEA,MAAM,sBAAsB,EACxB,wBAAwB,QAC5B;AAEA,MAAM,2BAA2B,EAC7B,gCAAgC,QACpC;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const RULES_STYLISTIC: {
|
|
2
|
+
readonly "@stylistic/eslint-plugin/array-bracket-newline": ["error", {
|
|
3
|
+
readonly multiline: true;
|
|
4
|
+
readonly minItems: 1;
|
|
5
|
+
}];
|
|
6
|
+
readonly "@stylistic/eslint-plugin/array-bracket-spacing": ["error", "never"];
|
|
7
|
+
readonly "@stylistic/eslint-plugin/array-element-newline": ["error", {
|
|
8
|
+
readonly multiline: true;
|
|
9
|
+
readonly minItems: 1;
|
|
10
|
+
}];
|
|
11
|
+
readonly "@stylistic/eslint-plugin/arrow-parens": ["error", "always"];
|
|
12
|
+
readonly "@stylistic/eslint-plugin/arrow-spacing": ["error", {
|
|
13
|
+
readonly before: true;
|
|
14
|
+
readonly after: true;
|
|
15
|
+
}];
|
|
16
|
+
readonly "@stylistic/eslint-plugin/block-spacing": ["error", "always"];
|
|
17
|
+
readonly "@stylistic/eslint-plugin/brace-style": ["error", "stroustrup"];
|
|
18
|
+
readonly "@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"];
|
|
19
|
+
readonly "@stylistic/eslint-plugin/comma-spacing": ["error", {
|
|
20
|
+
readonly before: false;
|
|
21
|
+
readonly after: true;
|
|
22
|
+
}];
|
|
23
|
+
readonly "@stylistic/eslint-plugin/comma-style": ["error", "last"];
|
|
24
|
+
readonly "@stylistic/eslint-plugin/computed-property-spacing": ["error", "never"];
|
|
25
|
+
readonly "@stylistic/eslint-plugin/curly-newline": ["error", {
|
|
26
|
+
readonly multiline: true;
|
|
27
|
+
readonly minElements: 1;
|
|
28
|
+
}];
|
|
29
|
+
readonly "@stylistic/eslint-plugin/dot-location": ["error", "property"];
|
|
30
|
+
readonly "@stylistic/eslint-plugin/eol-last": ["error", "always"];
|
|
31
|
+
readonly "@stylistic/eslint-plugin/function-call-argument-newline": ["error", "consistent"];
|
|
32
|
+
readonly "@stylistic/eslint-plugin/function-call-spacing": ["error", "never"];
|
|
33
|
+
readonly "@stylistic/eslint-plugin/function-paren-newline": ["error", {
|
|
34
|
+
readonly minItems: 2;
|
|
35
|
+
}];
|
|
36
|
+
readonly "@stylistic/eslint-plugin/implicit-arrow-linebreak": ["error", "beside"];
|
|
37
|
+
readonly "@stylistic/eslint-plugin/indent": ["error", 4];
|
|
38
|
+
readonly "@stylistic/eslint-plugin/indent-binary-ops": ["error", 4];
|
|
39
|
+
readonly "@stylistic/eslint-plugin/key-spacing": ["error", {
|
|
40
|
+
readonly beforeColon: false;
|
|
41
|
+
readonly afterColon: true;
|
|
42
|
+
}];
|
|
43
|
+
readonly "@stylistic/eslint-plugin/keyword-spacing": ["error", {
|
|
44
|
+
readonly before: true;
|
|
45
|
+
readonly after: true;
|
|
46
|
+
}];
|
|
47
|
+
readonly "@stylistic/eslint-plugin/linebreak-style": ["error", "unix"];
|
|
48
|
+
readonly "@stylistic/eslint-plugin/lines-between-class-members": ["error", "always"];
|
|
49
|
+
readonly "@stylistic/eslint-plugin/max-len": ["error", {
|
|
50
|
+
readonly code: 80;
|
|
51
|
+
readonly tabWidth: 4;
|
|
52
|
+
readonly ignoreComments: true;
|
|
53
|
+
readonly ignoreTrailingComments: true;
|
|
54
|
+
readonly ignoreUrls: true;
|
|
55
|
+
readonly ignoreStrings: true;
|
|
56
|
+
readonly ignoreTemplateLiterals: true;
|
|
57
|
+
readonly ignoreRegExpLiterals: true;
|
|
58
|
+
}];
|
|
59
|
+
};
|
|
60
|
+
export { RULES_STYLISTIC };
|
|
61
|
+
//# sourceMappingURL=stylistic.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_STYLISTIC = {
|
|
3
|
+
"@stylistic/eslint-plugin/array-bracket-newline": ["error", {
|
|
4
|
+
multiline: true,
|
|
5
|
+
minItems: 1
|
|
6
|
+
}],
|
|
7
|
+
"@stylistic/eslint-plugin/array-bracket-spacing": ["error", "never"],
|
|
8
|
+
"@stylistic/eslint-plugin/array-element-newline": ["error", {
|
|
9
|
+
multiline: true,
|
|
10
|
+
minItems: 1
|
|
11
|
+
}],
|
|
12
|
+
"@stylistic/eslint-plugin/arrow-parens": ["error", "always"],
|
|
13
|
+
"@stylistic/eslint-plugin/arrow-spacing": ["error", {
|
|
14
|
+
before: true,
|
|
15
|
+
after: true
|
|
16
|
+
}],
|
|
17
|
+
"@stylistic/eslint-plugin/block-spacing": ["error", "always"],
|
|
18
|
+
"@stylistic/eslint-plugin/brace-style": ["error", "stroustrup"],
|
|
19
|
+
"@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"],
|
|
20
|
+
"@stylistic/eslint-plugin/comma-spacing": ["error", {
|
|
21
|
+
before: false,
|
|
22
|
+
after: true
|
|
23
|
+
}],
|
|
24
|
+
"@stylistic/eslint-plugin/comma-style": ["error", "last"],
|
|
25
|
+
"@stylistic/eslint-plugin/computed-property-spacing": ["error", "never"],
|
|
26
|
+
"@stylistic/eslint-plugin/curly-newline": ["error", {
|
|
27
|
+
multiline: true,
|
|
28
|
+
minElements: 1
|
|
29
|
+
}],
|
|
30
|
+
"@stylistic/eslint-plugin/dot-location": ["error", "property"],
|
|
31
|
+
"@stylistic/eslint-plugin/eol-last": ["error", "always"],
|
|
32
|
+
"@stylistic/eslint-plugin/function-call-argument-newline": ["error", "consistent"],
|
|
33
|
+
"@stylistic/eslint-plugin/function-call-spacing": ["error", "never"],
|
|
34
|
+
"@stylistic/eslint-plugin/function-paren-newline": ["error", { minItems: 2 }],
|
|
35
|
+
"@stylistic/eslint-plugin/implicit-arrow-linebreak": ["error", "beside"],
|
|
36
|
+
"@stylistic/eslint-plugin/indent": ["error", 4],
|
|
37
|
+
"@stylistic/eslint-plugin/indent-binary-ops": ["error", 4],
|
|
38
|
+
"@stylistic/eslint-plugin/key-spacing": ["error", {
|
|
39
|
+
beforeColon: false,
|
|
40
|
+
afterColon: true
|
|
41
|
+
}],
|
|
42
|
+
"@stylistic/eslint-plugin/keyword-spacing": ["error", {
|
|
43
|
+
before: true,
|
|
44
|
+
after: true
|
|
45
|
+
}],
|
|
46
|
+
"@stylistic/eslint-plugin/linebreak-style": ["error", "unix"],
|
|
47
|
+
"@stylistic/eslint-plugin/lines-between-class-members": ["error", "always"],
|
|
48
|
+
"@stylistic/eslint-plugin/max-len": ["error", {
|
|
49
|
+
code: 80,
|
|
50
|
+
tabWidth: 4,
|
|
51
|
+
ignoreComments: true,
|
|
52
|
+
ignoreTrailingComments: true,
|
|
53
|
+
ignoreUrls: true,
|
|
54
|
+
ignoreStrings: true,
|
|
55
|
+
ignoreTemplateLiterals: true,
|
|
56
|
+
ignoreRegExpLiterals: true
|
|
57
|
+
}]
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.RULES_STYLISTIC = RULES_STYLISTIC;
|
|
61
|
+
//# sourceMappingURL=stylistic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylistic.js","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["import 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-bracket-spacing\": [\n \"error\",\n \"never\",\n ],\n \"@stylistic/eslint-plugin/array-element-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n \"@stylistic/eslint-plugin/arrow-parens\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/arrow-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n },\n ],\n \"@stylistic/eslint-plugin/block-spacing\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/brace-style\": [\n \"error\",\n \"stroustrup\",\n ],\n \"@stylistic/eslint-plugin/comma-dangle\": [\n \"error\",\n \"always-multiline\",\n ],\n \"@stylistic/eslint-plugin/comma-spacing\": [\n \"error\",\n {\n before: false,\n after: true,\n },\n ],\n \"@stylistic/eslint-plugin/comma-style\": [\n \"error\",\n \"last\",\n ],\n \"@stylistic/eslint-plugin/computed-property-spacing\": [\n \"error\",\n \"never\",\n ],\n \"@stylistic/eslint-plugin/curly-newline\": [\n \"error\",\n {\n multiline: true,\n minElements: 1,\n },\n ],\n \"@stylistic/eslint-plugin/dot-location\": [\n \"error\",\n \"property\",\n ],\n \"@stylistic/eslint-plugin/eol-last\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/function-call-argument-newline\": [\n \"error\",\n \"consistent\",\n ],\n \"@stylistic/eslint-plugin/function-call-spacing\": [\n \"error\",\n \"never\",\n ],\n \"@stylistic/eslint-plugin/function-paren-newline\": [\n \"error\",\n {\n minItems: 2,\n },\n ],\n \"@stylistic/eslint-plugin/implicit-arrow-linebreak\": [\n \"error\",\n \"beside\",\n ],\n // make every newline rules consistent with 4 spaces indent\n \"@stylistic/eslint-plugin/indent\": [\n \"error\",\n 4,\n ],\n \"@stylistic/eslint-plugin/indent-binary-ops\": [\n \"error\",\n 4,\n ],\n \"@stylistic/eslint-plugin/key-spacing\": [\n \"error\",\n {\n beforeColon: false,\n afterColon: true,\n },\n ],\n \"@stylistic/eslint-plugin/keyword-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n },\n ],\n \"@stylistic/eslint-plugin/linebreak-style\": [\n \"error\",\n \"unix\",\n ],\n \"@stylistic/eslint-plugin/lines-between-class-members\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/max-len\": [\n \"error\",\n {\n code: 80,\n tabWidth: 4,\n ignoreComments: true,\n ignoreTrailingComments: true,\n ignoreUrls: true,\n ignoreStrings: true,\n ignoreTemplateLiterals: true,\n ignoreRegExpLiterals: true,\n }\n ]\n} as const satisfies Rules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":";AAkBA,MAAM,kBAAkB;CACpB,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,kDAAkD,CAC9C,SACA,OACJ;CACA,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,yCAAyC,CACrC,SACA,QACJ;CACA,0CAA0C,CACtC,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;CACA,0CAA0C,CACtC,SACA,QACJ;CACA,wCAAwC,CACpC,SACA,YACJ;CACA,yCAAyC,CACrC,SACA,kBACJ;CACA,0CAA0C,CACtC,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;CACA,wCAAwC,CACpC,SACA,MACJ;CACA,sDAAsD,CAClD,SACA,OACJ;CACA,0CAA0C,CACtC,SACA;EACI,WAAW;EACX,aAAa;CACjB,CACJ;CACA,yCAAyC,CACrC,SACA,UACJ;CACA,qCAAqC,CACjC,SACA,QACJ;CACA,2DAA2D,CACvD,SACA,YACJ;CACA,kDAAkD,CAC9C,SACA,OACJ;CACA,mDAAmD,CAC/C,SACA,EACI,UAAU,EACd,CACJ;CACA,qDAAqD,CACjD,SACA,QACJ;CAEA,mCAAmC,CAC/B,SACA,CACJ;CACA,8CAA8C,CAC1C,SACA,CACJ;CACA,wCAAwC,CACpC,SACA;EACI,aAAa;EACb,YAAY;CAChB,CACJ;CACA,4CAA4C,CACxC,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;CACA,4CAA4C,CACxC,SACA,MACJ;CACA,wDAAwD,CACpD,SACA,QACJ;CACA,oCAAoC,CAChC,SACA;EACI,MAAM;EACN,UAAU;EACV,gBAAgB;EAChB,wBAAwB;EACxB,YAAY;EACZ,eAAe;EACf,wBAAwB;EACxB,sBAAsB;CAC1B,CACJ;AACJ"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const RULES_STYLISTIC = {
|
|
2
|
+
"@stylistic/eslint-plugin/array-bracket-newline": ["error", {
|
|
3
|
+
multiline: true,
|
|
4
|
+
minItems: 1
|
|
5
|
+
}],
|
|
6
|
+
"@stylistic/eslint-plugin/array-bracket-spacing": ["error", "never"],
|
|
7
|
+
"@stylistic/eslint-plugin/array-element-newline": ["error", {
|
|
8
|
+
multiline: true,
|
|
9
|
+
minItems: 1
|
|
10
|
+
}],
|
|
11
|
+
"@stylistic/eslint-plugin/arrow-parens": ["error", "always"],
|
|
12
|
+
"@stylistic/eslint-plugin/arrow-spacing": ["error", {
|
|
13
|
+
before: true,
|
|
14
|
+
after: true
|
|
15
|
+
}],
|
|
16
|
+
"@stylistic/eslint-plugin/block-spacing": ["error", "always"],
|
|
17
|
+
"@stylistic/eslint-plugin/brace-style": ["error", "stroustrup"],
|
|
18
|
+
"@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"],
|
|
19
|
+
"@stylistic/eslint-plugin/comma-spacing": ["error", {
|
|
20
|
+
before: false,
|
|
21
|
+
after: true
|
|
22
|
+
}],
|
|
23
|
+
"@stylistic/eslint-plugin/comma-style": ["error", "last"],
|
|
24
|
+
"@stylistic/eslint-plugin/computed-property-spacing": ["error", "never"],
|
|
25
|
+
"@stylistic/eslint-plugin/curly-newline": ["error", {
|
|
26
|
+
multiline: true,
|
|
27
|
+
minElements: 1
|
|
28
|
+
}],
|
|
29
|
+
"@stylistic/eslint-plugin/dot-location": ["error", "property"],
|
|
30
|
+
"@stylistic/eslint-plugin/eol-last": ["error", "always"],
|
|
31
|
+
"@stylistic/eslint-plugin/function-call-argument-newline": ["error", "consistent"],
|
|
32
|
+
"@stylistic/eslint-plugin/function-call-spacing": ["error", "never"],
|
|
33
|
+
"@stylistic/eslint-plugin/function-paren-newline": ["error", { minItems: 2 }],
|
|
34
|
+
"@stylistic/eslint-plugin/implicit-arrow-linebreak": ["error", "beside"],
|
|
35
|
+
"@stylistic/eslint-plugin/indent": ["error", 4],
|
|
36
|
+
"@stylistic/eslint-plugin/indent-binary-ops": ["error", 4],
|
|
37
|
+
"@stylistic/eslint-plugin/key-spacing": ["error", {
|
|
38
|
+
beforeColon: false,
|
|
39
|
+
afterColon: true
|
|
40
|
+
}],
|
|
41
|
+
"@stylistic/eslint-plugin/keyword-spacing": ["error", {
|
|
42
|
+
before: true,
|
|
43
|
+
after: true
|
|
44
|
+
}],
|
|
45
|
+
"@stylistic/eslint-plugin/linebreak-style": ["error", "unix"],
|
|
46
|
+
"@stylistic/eslint-plugin/lines-between-class-members": ["error", "always"],
|
|
47
|
+
"@stylistic/eslint-plugin/max-len": ["error", {
|
|
48
|
+
code: 80,
|
|
49
|
+
tabWidth: 4,
|
|
50
|
+
ignoreComments: true,
|
|
51
|
+
ignoreTrailingComments: true,
|
|
52
|
+
ignoreUrls: true,
|
|
53
|
+
ignoreStrings: true,
|
|
54
|
+
ignoreTemplateLiterals: true,
|
|
55
|
+
ignoreRegExpLiterals: true
|
|
56
|
+
}]
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { RULES_STYLISTIC };
|
|
60
|
+
//# sourceMappingURL=stylistic.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylistic.mjs","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["import 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-bracket-spacing\": [\n \"error\",\n \"never\",\n ],\n \"@stylistic/eslint-plugin/array-element-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n \"@stylistic/eslint-plugin/arrow-parens\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/arrow-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n },\n ],\n \"@stylistic/eslint-plugin/block-spacing\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/brace-style\": [\n \"error\",\n \"stroustrup\",\n ],\n \"@stylistic/eslint-plugin/comma-dangle\": [\n \"error\",\n \"always-multiline\",\n ],\n \"@stylistic/eslint-plugin/comma-spacing\": [\n \"error\",\n {\n before: false,\n after: true,\n },\n ],\n \"@stylistic/eslint-plugin/comma-style\": [\n \"error\",\n \"last\",\n ],\n \"@stylistic/eslint-plugin/computed-property-spacing\": [\n \"error\",\n \"never\",\n ],\n \"@stylistic/eslint-plugin/curly-newline\": [\n \"error\",\n {\n multiline: true,\n minElements: 1,\n },\n ],\n \"@stylistic/eslint-plugin/dot-location\": [\n \"error\",\n \"property\",\n ],\n \"@stylistic/eslint-plugin/eol-last\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/function-call-argument-newline\": [\n \"error\",\n \"consistent\",\n ],\n \"@stylistic/eslint-plugin/function-call-spacing\": [\n \"error\",\n \"never\",\n ],\n \"@stylistic/eslint-plugin/function-paren-newline\": [\n \"error\",\n {\n minItems: 2,\n },\n ],\n \"@stylistic/eslint-plugin/implicit-arrow-linebreak\": [\n \"error\",\n \"beside\",\n ],\n // make every newline rules consistent with 4 spaces indent\n \"@stylistic/eslint-plugin/indent\": [\n \"error\",\n 4,\n ],\n \"@stylistic/eslint-plugin/indent-binary-ops\": [\n \"error\",\n 4,\n ],\n \"@stylistic/eslint-plugin/key-spacing\": [\n \"error\",\n {\n beforeColon: false,\n afterColon: true,\n },\n ],\n \"@stylistic/eslint-plugin/keyword-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n },\n ],\n \"@stylistic/eslint-plugin/linebreak-style\": [\n \"error\",\n \"unix\",\n ],\n \"@stylistic/eslint-plugin/lines-between-class-members\": [\n \"error\",\n \"always\",\n ],\n \"@stylistic/eslint-plugin/max-len\": [\n \"error\",\n {\n code: 80,\n tabWidth: 4,\n ignoreComments: true,\n ignoreTrailingComments: true,\n ignoreUrls: true,\n ignoreStrings: true,\n ignoreTemplateLiterals: true,\n ignoreRegExpLiterals: true,\n }\n ]\n} as const satisfies Rules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":"AAkBA,MAAM,kBAAkB;CACpB,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,kDAAkD,CAC9C,SACA,OACJ;CACA,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,yCAAyC,CACrC,SACA,QACJ;CACA,0CAA0C,CACtC,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;CACA,0CAA0C,CACtC,SACA,QACJ;CACA,wCAAwC,CACpC,SACA,YACJ;CACA,yCAAyC,CACrC,SACA,kBACJ;CACA,0CAA0C,CACtC,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;CACA,wCAAwC,CACpC,SACA,MACJ;CACA,sDAAsD,CAClD,SACA,OACJ;CACA,0CAA0C,CACtC,SACA;EACI,WAAW;EACX,aAAa;CACjB,CACJ;CACA,yCAAyC,CACrC,SACA,UACJ;CACA,qCAAqC,CACjC,SACA,QACJ;CACA,2DAA2D,CACvD,SACA,YACJ;CACA,kDAAkD,CAC9C,SACA,OACJ;CACA,mDAAmD,CAC/C,SACA,EACI,UAAU,EACd,CACJ;CACA,qDAAqD,CACjD,SACA,QACJ;CAEA,mCAAmC,CAC/B,SACA,CACJ;CACA,8CAA8C,CAC1C,SACA,CACJ;CACA,wCAAwC,CACpC,SACA;EACI,aAAa;EACb,YAAY;CAChB,CACJ;CACA,4CAA4C,CACxC,SACA;EACI,QAAQ;EACR,OAAO;CACX,CACJ;CACA,4CAA4C,CACxC,SACA,MACJ;CACA,wDAAwD,CACpD,SACA,QACJ;CACA,oCAAoC,CAChC,SACA;EACI,MAAM;EACN,UAAU;EACV,gBAAgB;EAChB,wBAAwB;EACxB,YAAY;EACZ,eAAe;EACf,wBAAwB;EACxB,sBAAsB;CAC1B,CACJ;AACJ"}
|
|
@@ -136,7 +136,7 @@ declare const RULES_TYPESCRIPT_STYLE: {
|
|
|
136
136
|
readonly prefer: "class-property";
|
|
137
137
|
}];
|
|
138
138
|
readonly "typescript/prefer-function-type": "error";
|
|
139
|
-
readonly "typescript/prefer-reduce-type-
|
|
139
|
+
readonly "typescript/prefer-reduce-type-parameter": "error";
|
|
140
140
|
readonly "typescript/prefer-return-this-type": "error";
|
|
141
141
|
};
|
|
142
142
|
declare const RULES_TYPESCRIPT_SUSPICIOUS: {
|
|
@@ -166,7 +166,7 @@ declare const RULES_TYPESCRIPT: {
|
|
|
166
166
|
readonly prefer: "class-property";
|
|
167
167
|
}];
|
|
168
168
|
readonly "typescript/prefer-function-type": "error";
|
|
169
|
-
readonly "typescript/prefer-reduce-type-
|
|
169
|
+
readonly "typescript/prefer-reduce-type-parameter": "error";
|
|
170
170
|
readonly "typescript/prefer-return-this-type": "error";
|
|
171
171
|
readonly "typescript/no-empty-object-type": ["error", {
|
|
172
172
|
readonly allowInterfaces: "with-single-extends";
|
|
@@ -123,7 +123,7 @@ const RULES_TYPESCRIPT_STYLE = {
|
|
|
123
123
|
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
124
124
|
"typescript/parameter-properties": ["error", { prefer: "class-property" }],
|
|
125
125
|
"typescript/prefer-function-type": "error",
|
|
126
|
-
"typescript/prefer-reduce-type-
|
|
126
|
+
"typescript/prefer-reduce-type-parameter": "error",
|
|
127
127
|
"typescript/prefer-return-this-type": "error"
|
|
128
128
|
};
|
|
129
129
|
const RULES_TYPESCRIPT_SUSPICIOUS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","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-
|
|
1
|
+
{"version":3,"file":"typescript.js","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-parameter\": \"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,MACjC,CACJ;CACA,sCAAsC,CAClC,SACA,EACI,wCAAwC,MAC5C,CACJ;CACA,2BAA2B,CACvB,SACA;EACI,mCAAmC;EACnC,eAAe;EACf,iCAAiC;EACjC,mCAAmC;CACvC,CACJ;CACA,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;CACpB,CACJ;CACA,8BAA8B,CAC1B,SACA,EACI,mBAAmB,MACvB,CACJ;CACA,iCAAiC;CACjC,iCAAiC,CAC7B,SACA,EACI,gBAAgB,MACpB,CACJ;AACJ;AAEA,MAAM,4BAA4B;CAC9B,kCAAkC,CAC9B,SACA;EACI,oBAAoB;EACpB,eAAe;EACf,kBAAkB;GACd,WAAW;GACX,YAAY;GACZ,kBAAkB;GAClB,YAAY;GACZ,SAAS;GACT,WAAW;EACf;CACJ,CACJ;CACA,6BAA6B;CAC7B,iCAAiC;CACjC,mCAAmC;CACnC,6BAA6B;CAC7B,sCAAsC;CACtC,sCAAsC;CACtC,+BAA+B;CAC/B,+BAA+B;CAC/B,8BAA8B;CAC9B,wCAAwC,CACpC,SACA;EACI,uBAAuB;EACvB,wBAAwB;EACxB,oBAAoB;EACpB,+BAA+B;EAC/B,kBAAkB;GACd,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,QAAQ;EACZ;EACA,oBAAoB;CACxB,CACJ;CACA,2CAA2C,CACvC,SACA;EACI,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;CAC1B,CACJ;CACA,qCAAqC;CACrC,qCAAqC,CACjC,SACA;EACI,UAAU;EACV,cAAc;EACd,cAAc;EACd,sBAAsB;EACtB,aAAa;EACb,yBAAyB;CAC7B,CACJ;CACA,2BAA2B,CACvB,SACA,QACJ;CACA,yCAAyC,CACrC,SACA;EACI,UAAU;EACV,sBAAsB;EACtB,mBAAmB;EACnB,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,aAAa;EACb,aAAa;CACjB,CACJ;CACA,0CAA0C,CACtC,SACA;EACI,qCAAqC;EACrC,oCAAoC;EACpC,2BAA2B;CAC/B,CACJ;AACJ;AAEA,MAAM,+BAA+B;CACjC,mCAAmC,CAC/B,SACA;EACI,iBAAiB;EACjB,kBAAkB;CACtB,CACJ;CACA,0CAA0C;CAC1C,2BAA2B,CACvB,SACA;EACI,mBAAmB;EACnB,sBAAsB;CAC1B,CACJ;CACA,sDAAsD;CACtD,oCAAoC;CACpC,qCAAqC,CACjC,SACA;EACI,UAAU;EACV,qBAAqB;EACrB,2BAA2B;EAC3B,0BAA0B;EAC1B,yBAAyB;CAC7B,CACJ;CACA,qDAAqD;AACzD;AAEA,MAAM,yBAAyB;CAC3B,yCAAyC,CACrC,SACA,EACI,gBAAgB,KACpB,CACJ;CACA,0CAA0C,CACtC,SACA,MACJ;CACA,sCAAsC,CAClC,SACA;EACI,qBAAqB;EACrB,UAAU;EACV,QAAQ;CACZ,CACJ;CACA,iCAAiC,CAC7B,SACA,EACI,oBAAoB,KACxB,CACJ;CACA,mCAAmC,CAC/B,SACA,EACI,QAAQ,iBACZ,CACJ;CACA,mCAAmC;CACnC,2CAA2C;CAC3C,sCAAsC;AAC1C;AAEA,MAAM,8BAA8B;CAChC,8CAA8C;CAC9C,iDAAiD;CACjD,6CAA6C;CAC7C,wCAAwC;AAC5C;AAEA,MAAM,mBAAmB;CACrB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -122,7 +122,7 @@ const RULES_TYPESCRIPT_STYLE = {
|
|
|
122
122
|
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
123
123
|
"typescript/parameter-properties": ["error", { prefer: "class-property" }],
|
|
124
124
|
"typescript/prefer-function-type": "error",
|
|
125
|
-
"typescript/prefer-reduce-type-
|
|
125
|
+
"typescript/prefer-reduce-type-parameter": "error",
|
|
126
126
|
"typescript/prefer-return-this-type": "error"
|
|
127
127
|
};
|
|
128
128
|
const RULES_TYPESCRIPT_SUSPICIOUS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/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-
|
|
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-parameter\": \"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":"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"}
|
|
@@ -31,9 +31,6 @@ declare const RULES_UNICORN_STYLE: {
|
|
|
31
31
|
readonly "unicorn/empty-brace-spaces": "error";
|
|
32
32
|
readonly "unicorn/error-message": "error";
|
|
33
33
|
readonly "unicorn/no-array-method-this-argument": "error";
|
|
34
|
-
readonly "unicorn/no-null": ["error", {
|
|
35
|
-
readonly checkStrictEquality: true;
|
|
36
|
-
}];
|
|
37
34
|
readonly "unicorn/no-unreadable-array-destructuring": "error";
|
|
38
35
|
readonly "unicorn/no-useless-collection-argument": "error";
|
|
39
36
|
readonly "unicorn/numeric-separators-style": ["error", {
|
|
@@ -100,9 +97,6 @@ declare const RULES_UNICORN: {
|
|
|
100
97
|
readonly "unicorn/empty-brace-spaces": "error";
|
|
101
98
|
readonly "unicorn/error-message": "error";
|
|
102
99
|
readonly "unicorn/no-array-method-this-argument": "error";
|
|
103
|
-
readonly "unicorn/no-null": ["error", {
|
|
104
|
-
readonly checkStrictEquality: true;
|
|
105
|
-
}];
|
|
106
100
|
readonly "unicorn/no-unreadable-array-destructuring": "error";
|
|
107
101
|
readonly "unicorn/no-useless-collection-argument": "error";
|
|
108
102
|
readonly "unicorn/numeric-separators-style": ["error", {
|
|
@@ -28,7 +28,6 @@ const RULES_UNICORN_STYLE = {
|
|
|
28
28
|
"unicorn/empty-brace-spaces": "error",
|
|
29
29
|
"unicorn/error-message": "error",
|
|
30
30
|
"unicorn/no-array-method-this-argument": "error",
|
|
31
|
-
"unicorn/no-null": ["error", { checkStrictEquality: true }],
|
|
32
31
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
33
32
|
"unicorn/no-useless-collection-argument": "error",
|
|
34
33
|
"unicorn/numeric-separators-style": ["error", {
|
|
@@ -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-
|
|
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"}
|
|
@@ -27,7 +27,6 @@ const RULES_UNICORN_STYLE = {
|
|
|
27
27
|
"unicorn/empty-brace-spaces": "error",
|
|
28
28
|
"unicorn/error-message": "error",
|
|
29
29
|
"unicorn/no-array-method-this-argument": "error",
|
|
30
|
-
"unicorn/no-null": ["error", { checkStrictEquality: true }],
|
|
31
30
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
32
31
|
"unicorn/no-useless-collection-argument": "error",
|
|
33
32
|
"unicorn/numeric-separators-style": ["error", {
|