@strastdas/oxc-config 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alejandro
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 ADDED
@@ -0,0 +1,45 @@
1
+ # `@strastdas/oxc-config`
2
+
3
+ Shared Oxlint compatibility presets for repositories using Ultracite.
4
+
5
+ ## Requirements
6
+
7
+ - Node.js `^20.19.0 || >=22.12.0`
8
+ - `oxlint` `^1.74.0`
9
+ - `ultracite` `^7.9.4`
10
+
11
+ Install the package alongside its peer dependencies:
12
+
13
+ ```sh
14
+ pnpm add -D @strastdas/oxc-config oxlint ultracite
15
+ ```
16
+
17
+ ## Next.js + React
18
+
19
+ Create `oxlint.config.ts`:
20
+
21
+ ```ts
22
+ import { defineConfig } from "oxlint"
23
+ import nextReactConfig from "@strastdas/oxc-config/next-react"
24
+
25
+ export default defineConfig({
26
+ extends: [nextReactConfig],
27
+ ignorePatterns: nextReactConfig.ignorePatterns,
28
+ })
29
+ ```
30
+
31
+ The profile combines Ultracite's core, Next.js, and React presets. It disables only these compatibility rules from the original migration pilot:
32
+
33
+ - `eslint/func-style`
34
+ - `eslint/no-inline-comments`
35
+ - `eslint/require-unicode-regexp`
36
+ - `eslint/sort-keys`
37
+ - `unicorn/filename-case`
38
+
39
+ ## Base profile
40
+
41
+ For a non-framework project, import `@strastdas/oxc-config/base` instead. Framework-specific presets can then be added in the consumer config.
42
+
43
+ ## Verification
44
+
45
+ Run `npm test` before publishing. The pack smoke test creates a tarball, installs it into a clean temporary consumer with the peer dependencies, and imports both public profiles.
package/base.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from "oxlint"
2
+ import coreConfig from "ultracite/oxlint/core"
3
+
4
+ export default defineConfig({
5
+ extends: [coreConfig],
6
+ rules: {
7
+ "eslint/func-style": "off",
8
+ "eslint/no-inline-comments": "off",
9
+ "eslint/require-unicode-regexp": "off",
10
+ "eslint/sort-keys": "off",
11
+ "unicorn/filename-case": "off",
12
+ },
13
+ })
package/next-react.mjs ADDED
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from "oxlint"
2
+ import baseConfig from "./base.mjs"
3
+ import nextConfig from "ultracite/oxlint/next"
4
+ import reactConfig from "ultracite/oxlint/react"
5
+
6
+ export default defineConfig({
7
+ extends: [baseConfig, nextConfig, reactConfig],
8
+ })
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@strastdas/oxc-config",
3
+ "version": "0.1.0",
4
+ "description": "Shared Oxlint compatibility presets for Ultracite projects.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ "./base": "./base.mjs",
9
+ "./next-react": "./next-react.mjs"
10
+ },
11
+ "files": [
12
+ "base.mjs",
13
+ "next-react.mjs",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "peerDependencies": {
18
+ "oxlint": "^1.74.0",
19
+ "ultracite": "^7.9.4"
20
+ },
21
+ "engines": {
22
+ "node": "^20.19.0 || >=22.12.0"
23
+ },
24
+ "scripts": {
25
+ "test": "npm run test:pack",
26
+ "test:pack": "node scripts/pack-smoke-test.mjs"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ }
31
+ }