@slowpoketail/oxc 1.2.2 → 1.4.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 +11 -14
- package/README.md +17 -3
- package/dist/fmt.d.mts +3 -27
- package/dist/fmt.mjs +1 -1
- package/dist/lint/base.mjs +1 -1
- package/dist/lint/index.d.mts +2 -0
- package/dist/lint/index.mjs +1 -1
- package/dist/lint/jest.d.mts +5 -0
- package/dist/lint/jest.mjs +1 -0
- package/dist/lint/react.mjs +1 -1
- package/dist/lint/tailwind.d.mts +3 -1
- package/dist/lint/tailwind.mjs +1 -1
- package/dist/lint/unocss.mjs +1 -1
- package/dist/lint/vitest.d.mts +5 -0
- package/dist/lint/vitest.mjs +1 -0
- package/package.json +14 -13
- package/dist/lint.d.mts +0 -2
- package/dist/lint.mjs +0 -1
package/LICENSE.md
CHANGED
|
@@ -2,20 +2,17 @@ MIT License
|
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2026 Austin Raey <24833719+austin-raey@users.noreply.github.com>
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
7
|
+
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
8
|
+
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
10
9
|
furnished to do so, subject to the following conditions:
|
|
11
10
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
14
13
|
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
|
15
|
+
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
16
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
|
|
17
|
+
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
This package contains shareable configurations of Oxlint and Oxfmt.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
At this time, all configuration dependencies are included for you when this package is installed --
|
|
6
|
+
even if you don't explictly use them, for convenience. I understand this does increase install size,
|
|
7
|
+
however. May switch this in the future in a breaking release.
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -21,6 +21,11 @@ In `oxlint.config.ts`:
|
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
23
|
import lint from "@slowpoketail/oxc/lint";
|
|
24
|
+
// alternatively, import your framework's config:
|
|
25
|
+
// import next from "@slowpoketail/oxc/lint/next";
|
|
26
|
+
// as well as any additional plugins you might need
|
|
27
|
+
// import jest from "@slowpoketail/oxc/lint/jest";
|
|
28
|
+
// import tailwind from "@slowpoketail/oxc/lint/tailwind";
|
|
24
29
|
import { defineConfig } from "oxlint";
|
|
25
30
|
|
|
26
31
|
export default defineConfig({
|
|
@@ -40,3 +45,12 @@ export default defineConfig({
|
|
|
40
45
|
// Other overrides
|
|
41
46
|
});
|
|
42
47
|
```
|
|
48
|
+
|
|
49
|
+
## Additional Notes
|
|
50
|
+
|
|
51
|
+
- The export at `@slowpoketail/oxc/lint` is the same as the base preset
|
|
52
|
+
`@slowpoketail/oxc/lint/base`.
|
|
53
|
+
- Extra, potentially unused packages at this time include:
|
|
54
|
+
- `@unocss/eslint-plugin`
|
|
55
|
+
- `eslint-plugin-better-tailwindcss`
|
|
56
|
+
- `eslint-plugin-perfectionist`
|
package/dist/fmt.d.mts
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
|
+
import { OxfmtConfig } from "oxfmt";
|
|
1
2
|
//#region oxfmt/index.d.ts
|
|
2
|
-
declare const
|
|
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
|
-
/**
|
|
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;
|
|
26
|
-
useTabs: true;
|
|
27
|
-
};
|
|
3
|
+
declare const fmt: OxfmtConfig;
|
|
28
4
|
//#endregion
|
|
29
|
-
export {
|
|
5
|
+
export { fmt as default };
|
package/dist/fmt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={arrowParens:`always`,astro:{allowShorthand:!0,compressHTML:`jsx`,skipFrontmatter:!1},endOfLine:`lf`,experimentalOperatorPosition:`start`,insertFinalNewline:!0,printWidth:100,proseWrap:`always`,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};
|
package/dist/lint/base.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"eslint-plugin-perfectionist";const
|
|
1
|
+
import e from"eslint-plugin-perfectionist";import{fileURLToPath as t}from"node:url";const n={categories:{correctness:`error`,perf:`warn`,style:`warn`,suspicious:`warn`},jsPlugins:[{name:`perfectionist`,specifier:t(import.meta.resolve(`eslint-plugin-perfectionist`))}],options:{typeAware:!0,typeCheck:!0},plugins:[`eslint`,`import`,`jsdoc`,`promise`,`typescript`,`unicorn`],rules:{"eslint/capitalized-comments":`off`,"eslint/new-cap":`off`,"eslint/one-var":`off`,"eslint/sort-imports":`off`,"import/exports-last":`off`,"import/newline-after-import":`warn`,"import/no-default-export":`off`,"import/no-named-as-default-member":`off`,"import/no-named-export":`off`,"import/no-unassigned-import":[`error`,{allow:[`**/*.css`,`**/*.scss`,`**/*.less`,`**/*.styl`,`**/*.sass`]}],"oxc/no-rest-spread-properties":`off`,"perfectionist/sort-imports":`off`,...e.configs[`recommended-natural`].rules,"eslint/id-length":`off`,"eslint/init-declarations":`off`,"eslint/max-statements":[`error`,{ignoreTopLevelFunctions:!0,max:32}],"eslint/no-continue":`off`,"eslint/no-magic-numbers":`off`,"eslint/no-ternary":`off`,"eslint/no-undefined":`off`,"import/group-exports":`off`,"import/prefer-default-export":`off`,"unicorn/no-null":`off`}};export{n as default};
|
package/dist/lint/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default}from"./base.mjs";
|
|
1
|
+
export{default}from"./base.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={env:{browser:!0,jest:!0},plugins:[`jest`]};export{e as default};
|
package/dist/lint/react.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
import e from"./base.mjs";const t={env:{browser:!0},extends:[e],plugins:[`react`,`react-perf`],rules:{"react/forbid-component-props":`off`,"react/jsx-filename-extension":[`error`,{allow:`as-needed`,extensions:[`.jsx`,`.tsx`],ignoreFilesWithoutCode:!0}],"react/jsx-max-depth":[`warn`,{max:6}],"react/react-in-jsx-scope":`off`}};export{t as default};
|
package/dist/lint/tailwind.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { OxlintConfig } from "oxlint";
|
|
2
|
+
import { Settings } from "eslint-plugin-better-tailwindcss/api/types";
|
|
2
3
|
//#region oxlint/tailwind.d.ts
|
|
3
|
-
|
|
4
|
+
type TailwindOptions = Settings;
|
|
5
|
+
declare const tailwind: (options?: TailwindOptions) => OxlintConfig;
|
|
4
6
|
//#endregion
|
|
5
7
|
export { tailwind as default };
|
package/dist/lint/tailwind.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"eslint-plugin-better-tailwindcss";const
|
|
1
|
+
import{fileURLToPath as e}from"node:url";import t from"eslint-plugin-better-tailwindcss";const n=(n={})=>({env:{browser:!0},jsPlugins:[{name:`better-tailwindcss`,specifier:e(import.meta.resolve(`eslint-plugin-better-tailwindcss`))}],rules:Object.fromEntries(Object.entries({...t.configs[`recommended-warn`].rules,"better-tailwindcss/enforce-canonical-classes":`warn`,"better-tailwindcss/enforce-consistent-line-wrapping":[`warn`,{indent:`tab`,strictness:`loose`}],"better-tailwindcss/enforce-logical-properties":`warn`}).map(([e,t])=>{let r={detectComponentClasses:!0,rootFontSize:16,...n};if(Array.isArray(t)){let[n,i]=t;return[e,[n,{...r,...i}]]}return[e,[t,r]]}))});export{n as default};
|
package/dist/lint/unocss.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@unocss/eslint-plugin";const
|
|
1
|
+
import{fileURLToPath as e}from"node:url";import t from"@unocss/eslint-plugin";const n={env:{browser:!0},jsPlugins:[{name:`unocss`,specifier:e(import.meta.resolve(`@unocss/eslint-plugin`))}],rules:{...Object.fromEntries(Object.entries(t.configs.recommended.rules).map(([e,t])=>[e.replace(`@unocss/`,`unocss/`),t])),"unocss/enforce-class-compile":`error`}};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={env:{browser:!0,vitest:!0},plugins:[`vitest`]};export{e as default};
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slowpoketail/oxc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Shareable configurations for Oxlint and Oxfmt",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"@slowpoketail",
|
|
6
7
|
"configuration",
|
|
7
8
|
"eslint",
|
|
9
|
+
"format",
|
|
10
|
+
"lint",
|
|
8
11
|
"oxc",
|
|
9
12
|
"oxfmt",
|
|
10
13
|
"oxlint",
|
|
11
|
-
"shareable"
|
|
14
|
+
"shareable",
|
|
15
|
+
"slowpoketail"
|
|
12
16
|
],
|
|
13
17
|
"homepage": "https://github.com/austin-raey/templates",
|
|
14
18
|
"bugs": {
|
|
@@ -29,10 +33,12 @@
|
|
|
29
33
|
"./lint": "./dist/lint/index.mjs",
|
|
30
34
|
"./lint/astro": "./dist/lint/astro.mjs",
|
|
31
35
|
"./lint/base": "./dist/lint/base.mjs",
|
|
36
|
+
"./lint/jest": "./dist/lint/jest.mjs",
|
|
32
37
|
"./lint/next": "./dist/lint/next.mjs",
|
|
33
38
|
"./lint/react": "./dist/lint/react.mjs",
|
|
34
39
|
"./lint/tailwind": "./dist/lint/tailwind.mjs",
|
|
35
40
|
"./lint/unocss": "./dist/lint/unocss.mjs",
|
|
41
|
+
"./lint/vitest": "./dist/lint/vitest.mjs",
|
|
36
42
|
"./lint/wrenjs": "./dist/lint/wrenjs.mjs",
|
|
37
43
|
"./package.json": "./package.json"
|
|
38
44
|
},
|
|
@@ -40,29 +46,24 @@
|
|
|
40
46
|
"access": "public"
|
|
41
47
|
},
|
|
42
48
|
"dependencies": {
|
|
49
|
+
"@unocss/eslint-plugin": "66.11.0",
|
|
50
|
+
"eslint-plugin-better-tailwindcss": "4.9.1",
|
|
43
51
|
"eslint-plugin-perfectionist": "5.12.1"
|
|
44
52
|
},
|
|
45
53
|
"devDependencies": {
|
|
46
54
|
"@types/node": "26.6.5",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
55
|
+
"oxfmt": "0.73.0",
|
|
56
|
+
"oxlint": "1.88.0",
|
|
57
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
49
58
|
"typescript": "7.0.2",
|
|
50
59
|
"vite-plus": "1.3.0"
|
|
51
60
|
},
|
|
52
61
|
"peerDependencies": {
|
|
53
|
-
"@unocss/eslint-plugin": "*",
|
|
54
|
-
"eslint-plugin-better-tailwindcss": "*",
|
|
55
62
|
"oxfmt": "*",
|
|
56
63
|
"oxlint": "*",
|
|
57
64
|
"vite-plus": "*"
|
|
58
65
|
},
|
|
59
66
|
"peerDependenciesMeta": {
|
|
60
|
-
"@unocss/eslint-plugin": {
|
|
61
|
-
"optional": true
|
|
62
|
-
},
|
|
63
|
-
"eslint-plugin-better-tailwindcss": {
|
|
64
|
-
"optional": true
|
|
65
|
-
},
|
|
66
67
|
"oxfmt": {
|
|
67
68
|
"optional": true
|
|
68
69
|
},
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
},
|
|
76
77
|
"scripts": {
|
|
77
78
|
"build": "vp pack",
|
|
78
|
-
"check": "
|
|
79
|
+
"check": "oxfmt && oxlint --fix --fix-suggestions",
|
|
79
80
|
"dev": "vp pack --watch",
|
|
80
81
|
"test": "vp test"
|
|
81
82
|
}
|
package/dist/lint.d.mts
DELETED
package/dist/lint.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default}from"./lint/base.mjs";
|