@slowpoketail/oxc 0.0.0-stage → 1.0.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Austin Raey <24833719+austin-raey@users.noreply.github.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # OXC Configuration
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This package contains shareable configurations of Oxlint and Oxfmt.
4
+
5
+ **NOTE:** At this time, it is known that certain package dependencies may not be used by the user. They are all included / installed for convenience.
6
+
7
+ ## Usage
8
+
9
+ Install the shared configuration and the tools you use:
10
+
11
+ ```sh
12
+ {PACKAGE_MANAGER} install -D @slowpoketail/oxc
13
+ {PACKAGE_MANAGER} install -D oxlint
14
+ {PACKAGE_MANAGER} install -D oxfmt
15
+ ```
16
+
17
+ In `oxlint.config.ts`:
18
+
19
+ ```ts
20
+ import lint from "@slowpoketail/oxc/lint";
21
+ import { defineConfig } from "oxlint";
22
+
23
+ export default defineConfig({
24
+ extends: [lint],
25
+ });
26
+ ```
27
+
28
+ In `oxfmt.config.ts`:
29
+
30
+ ```ts
31
+ import fmt from "@slowpoketail/oxc/fmt";
32
+ import { defineConfig } from "oxfmt";
33
+
34
+ export default defineConfig({
35
+ ...fmt,
36
+ });
37
+ ```
package/dist/fmt.d.mts ADDED
@@ -0,0 +1,25 @@
1
+ //#region oxfmt/index.d.ts
2
+ declare const _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: (string | string[])[];
16
+ newlinesBetween: true;
17
+ partitionByComment: true;
18
+ sortSideEffects: false;
19
+ };
20
+ sortPackageJson: true;
21
+ sortTailwindcss: true;
22
+ useTabs: true;
23
+ };
24
+ //#endregion
25
+ export { _default as default };
package/dist/fmt.mjs ADDED
@@ -0,0 +1,41 @@
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 };
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region oxlint/base.d.ts
3
+ declare const base: OxlintConfig;
4
+ //#endregion
5
+ export { base as default };
@@ -0,0 +1,64 @@
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 };
@@ -0,0 +1 @@
1
+ export { default } from "../lint.mjs";
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region oxlint/next.d.ts
3
+ declare const next: OxlintConfig;
4
+ //#endregion
5
+ export { next as default };
@@ -0,0 +1,12 @@
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 };
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region oxlint/react.d.ts
3
+ declare const react: OxlintConfig;
4
+ //#endregion
5
+ export { react as default };
@@ -0,0 +1,12 @@
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 };
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region oxlint/tailwind.d.ts
3
+ declare const tailwindcss: OxlintConfig;
4
+ //#endregion
5
+ export { tailwindcss as default };
@@ -0,0 +1,19 @@
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 };
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region oxlint/unocss.d.ts
3
+ declare const unocss: OxlintConfig;
4
+ //#endregion
5
+ export { unocss as default };
@@ -0,0 +1,16 @@
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 };
@@ -0,0 +1,5 @@
1
+ import { OxlintConfig } from "oxlint";
2
+ //#region oxlint/wrenjs.d.ts
3
+ declare const wrenjs: OxlintConfig;
4
+ //#endregion
5
+ export { wrenjs as default };
@@ -0,0 +1,11 @@
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 };
@@ -0,0 +1,2 @@
1
+ import base from "./lint/base.mjs";
2
+ export { base as default };
package/dist/lint.mjs ADDED
@@ -0,0 +1,5 @@
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 };
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
2
  "name": "@slowpoketail/oxc",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Shareable configurations for Oxlint and Oxfmt",
5
+ "keywords": [
6
+ "configuration",
7
+ "eslint",
8
+ "oxc",
9
+ "oxfmt",
10
+ "oxlint",
11
+ "shareable"
12
+ ],
13
+ "homepage": "https://github.com/austin-raey/templates",
14
+ "bugs": {
15
+ "url": "https://github.com/austin-raey/templates/issues"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Austin Raey <24833719+austin-raey@users.noreply.github.com>",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/austin-raey/templates.git"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "type": "module",
27
+ "exports": {
28
+ "./fmt": "./dist/fmt.mjs",
29
+ "./lint": "./dist/lint/index.mjs",
30
+ "./lint/astro": "./dist/lint/astro.mjs",
31
+ "./lint/base": "./dist/lint/base.mjs",
32
+ "./lint/next": "./dist/lint/next.mjs",
33
+ "./lint/react": "./dist/lint/react.mjs",
34
+ "./lint/tailwind": "./dist/lint/tailwind.mjs",
35
+ "./lint/unocss": "./dist/lint/unocss.mjs",
36
+ "./lint/wrenjs": "./dist/lint/wrenjs.mjs",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "dependencies": {
43
+ "@e18e/eslint-plugin": "0.8.1",
44
+ "@unocss/eslint-plugin": "66.11.0",
45
+ "eslint-config-preact": "2.0.0",
46
+ "eslint-plugin-better-tailwindcss": "4.9.1",
47
+ "eslint-plugin-perfectionist": "5.12.1",
48
+ "eslint-plugin-sonarjs": "4.2.2"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "26.6.5",
52
+ "typescript": "7.0.2",
53
+ "vite-plus": "1.3.0"
54
+ },
55
+ "peerDependencies": {
56
+ "oxfmt": "*",
57
+ "oxlint": "*"
58
+ },
59
+ "peerDependenciesMeta": {
60
+ "oxfmt": {
61
+ "optional": true
62
+ },
63
+ "oxlint": {
64
+ "optional": true
65
+ }
66
+ },
67
+ "scripts": {
68
+ "build": "vp pack",
69
+ "dev": "vp pack --watch",
70
+ "test": "vp test",
71
+ "check": "vp check --fix"
72
+ }
6
73
  }