@slowpoketail/oxc 1.0.0 → 1.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/dist/fmt.d.mts CHANGED
@@ -18,7 +18,11 @@ declare const _default: {
18
18
  sortSideEffects: false;
19
19
  };
20
20
  sortPackageJson: true;
21
- sortTailwindcss: true;
21
+ /**
22
+ * Let the user decide whether to sort Tailwind CSS classes.
23
+ * Also, the plugins for oxlint can handle this a bit better.
24
+ */
25
+ sortTailwindcss: false;
22
26
  useTabs: true;
23
27
  };
24
28
  //#endregion
package/dist/fmt.mjs CHANGED
@@ -1,41 +1 @@
1
- //#region oxfmt/index.ts
2
- var oxfmt_default = {
3
- arrowParens: "always",
4
- astro: {
5
- allowShorthand: true,
6
- compressHTML: "jsx",
7
- skipFrontmatter: false
8
- },
9
- endOfLine: "lf",
10
- experimentalOperatorPosition: "start",
11
- insertFinalNewline: true,
12
- quoteProps: "consistent",
13
- semi: true,
14
- sortImports: {
15
- groups: [
16
- "type-import",
17
- ["value-builtin", "value-external"],
18
- "type-internal",
19
- "value-internal",
20
- [
21
- "type-parent",
22
- "type-sibling",
23
- "type-index"
24
- ],
25
- [
26
- "value-parent",
27
- "value-sibling",
28
- "value-index"
29
- ],
30
- "unknown"
31
- ],
32
- newlinesBetween: true,
33
- partitionByComment: true,
34
- sortSideEffects: false
35
- },
36
- sortPackageJson: true,
37
- sortTailwindcss: true,
38
- useTabs: true
39
- };
40
- //#endregion
41
- export { oxfmt_default as default };
1
+ var e={arrowParens:`always`,astro:{allowShorthand:!0,compressHTML:`jsx`,skipFrontmatter:!1},endOfLine:`lf`,experimentalOperatorPosition:`start`,insertFinalNewline:!0,quoteProps:`consistent`,semi:!0,sortImports:{groups:[`type-import`,[`value-builtin`,`value-external`],`type-internal`,`value-internal`,[`type-parent`,`type-sibling`,`type-index`],[`value-parent`,`value-sibling`,`value-index`],`unknown`],newlinesBetween:!0,partitionByComment:!0,sortSideEffects:!1},sortPackageJson:!0,sortTailwindcss:!1,useTabs:!0};export{e as default};
@@ -1 +1 @@
1
- export {};
1
+ export{};
@@ -1,64 +1 @@
1
- import { createRequire } from "node:module";
2
- import e18e from "@e18e/eslint-plugin";
3
- import perfectionist from "eslint-plugin-perfectionist";
4
- import sonarjs from "eslint-plugin-sonarjs";
5
- //#region oxlint/base.ts
6
- const base = {
7
- categories: {
8
- correctness: "error",
9
- perf: "warn",
10
- restriction: "error",
11
- suspicious: "warn"
12
- },
13
- jsPlugins: [
14
- {
15
- name: "e18e",
16
- specifier: createRequire(import.meta.url).resolve("@e18e/eslint-plugin")
17
- },
18
- {
19
- name: "sonarjs",
20
- specifier: createRequire(import.meta.url).resolve("eslint-plugin-sonarjs")
21
- },
22
- {
23
- name: "perfectionist",
24
- specifier: createRequire(import.meta.url).resolve("eslint-plugin-perfectionist")
25
- }
26
- ],
27
- plugins: [
28
- "eslint",
29
- "import",
30
- "jest",
31
- "jsdoc",
32
- "oxc",
33
- "promise",
34
- "typescript",
35
- "unicorn",
36
- "vitest"
37
- ],
38
- rules: {
39
- /** Reason: Handled by perfectionist plugin */
40
- "eslint/sort-keys": "off",
41
- /** Reason: Enforces a newline after import statements */
42
- "import/newline-after-import": "warn",
43
- /** Reason: Inflexible / useful if the user prefers importing under any name / some frameworks use default exports */
44
- "import/no-default-export": "off",
45
- /** Reason: Inflexible. For eslint imports especially, can cause funny looking code. */
46
- "import/no-named-as-default-member": "off",
47
- /** Reason: Allows style side effects */
48
- "import/no-unassigned-import": ["error", { allow: [
49
- "**/*.css",
50
- "**/*.scss",
51
- "**/*.less",
52
- "**/*.styl",
53
- "**/*.sass"
54
- ] }],
55
- /** Reason: Assume user is in a "newer" environment. Can override if not supported. Technically, there are probably performance considerations the user should consider. */
56
- "oxc/no-rest-spread-properties": "off",
57
- /** Reason: Recommended rule spreading from plugins */
58
- ...e18e.configs.recommended.rules,
59
- ...sonarjs.configs.recommended.rules,
60
- ...perfectionist.configs["recommended-natural"].rules
61
- }
62
- };
63
- //#endregion
64
- export { base as default };
1
+ import{t as e}from"../perfectionist-QilItB80.mjs";import{t}from"../e18e-eVRQAh1j.mjs";import{fileURLToPath as n}from"node:url";const r={categories:{correctness:`error`,perf:`warn`,restriction:`error`,suspicious:`warn`},jsPlugins:[{name:`e18e`,specifier:n(import.meta.resolve(`@slowpoketail/oxc/plugins/e18e`))},{name:`perfectionist`,specifier:n(import.meta.resolve(`@slowpoketail/oxc/plugins/perfectionist`))}],plugins:[`eslint`,`import`,`jest`,`jsdoc`,`oxc`,`promise`,`typescript`,`unicorn`,`vitest`],rules:{"eslint/sort-keys":`off`,"import/newline-after-import":`warn`,"import/no-default-export":`off`,"import/no-named-as-default-member":`off`,"import/no-unassigned-import":[`error`,{allow:[`**/*.css`,`**/*.scss`,`**/*.less`,`**/*.styl`,`**/*.sass`]}],"oxc/no-rest-spread-properties":`off`,...t.configs.recommended.rules,...e.configs[`recommended-natural`].rules}};export{r as default};
@@ -1 +1 @@
1
- export { default } from "../lint.mjs";
1
+ export{default}from"../lint.mjs";
@@ -1,12 +1 @@
1
- import react from "./react.mjs";
2
- //#region oxlint/next.ts
3
- const next = {
4
- env: {
5
- browser: true,
6
- node: true
7
- },
8
- extends: [react],
9
- plugins: ["nextjs"]
10
- };
11
- //#endregion
12
- export { next as default };
1
+ import e from"./react.mjs";const t={env:{browser:!0,node:!0},extends:[e],plugins:[`nextjs`]};export{t as default};
@@ -1,12 +1 @@
1
- import base from "./base.mjs";
2
- //#region oxlint/react.ts
3
- const react = {
4
- env: { browser: true },
5
- extends: [base],
6
- plugins: ["react", "react-perf"],
7
- rules: {
8
- /** Reason: In React 17 and later, importing React in every file is no longer necessary. */
9
- "react/react-in-jsx-scope": "off" }
10
- };
11
- //#endregion
12
- export { react as default };
1
+ import e from"./base.mjs";const t={env:{browser:!0},extends:[e],plugins:[`react`,`react-perf`],rules:{"react/react-in-jsx-scope":`off`}};export{t as default};
@@ -1,19 +1 @@
1
- import { createRequire } from "node:module";
2
- import tailwind from "eslint-plugin-better-tailwindcss";
3
- //#region oxlint/tailwind.ts
4
- const tailwindcss = {
5
- env: { browser: true },
6
- jsPlugins: [{
7
- name: "better-tailwindcss",
8
- specifier: createRequire(import.meta.url).resolve("eslint-plugin-better-tailwindcss")
9
- }],
10
- rules: {
11
- ...tailwind.configs["recommended-warn"].rules,
12
- "better-tailwindcss/enforce-consistent-important-position": "warn",
13
- "better-tailwindcss/enforce-consistent-variant-order": "warn",
14
- "better-tailwindcss/enforce-logical-properties": "warn",
15
- "better-tailwindcss/no-custom-classname": "warn"
16
- }
17
- };
18
- //#endregion
19
- export { tailwindcss as default };
1
+ import{createRequire as e}from"node:module";import t from"eslint-plugin-better-tailwindcss";const n={env:{browser:!0},jsPlugins:[{name:`better-tailwindcss`,specifier:e(import.meta.url).resolve(`eslint-plugin-better-tailwindcss`)}],rules:{...t.configs[`recommended-warn`].rules,"better-tailwindcss/enforce-consistent-important-position":`warn`,"better-tailwindcss/enforce-consistent-variant-order":`warn`,"better-tailwindcss/enforce-logical-properties":`warn`,"better-tailwindcss/no-custom-classname":`warn`}};export{n as default};
@@ -1,16 +1 @@
1
- import { createRequire } from "node:module";
2
- import uno from "@unocss/eslint-plugin";
3
- //#region oxlint/unocss.ts
4
- const unocss = {
5
- env: { browser: true },
6
- jsPlugins: [{
7
- name: "unocss",
8
- specifier: createRequire(import.meta.url).resolve("@unocss/eslint-plugin")
9
- }],
10
- rules: {
11
- ...uno.configs.recommended.rules,
12
- "unocss/enforce-class-compile": "error"
13
- }
14
- };
15
- //#endregion
16
- export { unocss as default };
1
+ import{createRequire as e}from"node:module";import t from"@unocss/eslint-plugin";const n={env:{browser:!0},jsPlugins:[{name:`unocss`,specifier:e(import.meta.url).resolve(`@unocss/eslint-plugin`)}],rules:{...t.configs.recommended.rules,"unocss/enforce-class-compile":`error`}};export{n as default};
@@ -1,11 +1 @@
1
- import base from "./base.mjs";
2
- //#region oxlint/wrenjs.ts
3
- const wrenjs = {
4
- env: {
5
- browser: true,
6
- node: true
7
- },
8
- extends: [base]
9
- };
10
- //#endregion
11
- export { wrenjs as default };
1
+ import e from"./base.mjs";const t={env:{browser:!0,node:!0},extends:[e]};export{t as default};
package/dist/lint.mjs CHANGED
@@ -1,5 +1 @@
1
- import base from "./lint/base.mjs";
2
- //#region oxlint/index.ts
3
- var oxlint_default = base;
4
- //#endregion
5
- export { oxlint_default as default };
1
+ import e from"./lint/base.mjs";var t=e;export{t as default};