@slowpoketail/oxc 1.2.2 → 1.3.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 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
- 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
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
- copies or substantial portions of the Software.
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
- 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.
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,13 @@
2
2
 
3
3
  This package contains shareable configurations of Oxlint and Oxfmt.
4
4
 
5
- By default, only `base` configuration dependencies are included for you when this package is installed.
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.
6
7
 
7
- For others, running lint should hint at missing dependencies. For completion, these additional dependencies are listed in the `peerDependencies` section of the `package.json`.
8
+ JavaScript plugins use `fileURLToPath(import.meta.resolve(...))` to resolve their ESM entry points
9
+ from this package rather than from the consuming project. This also avoids UnoCSS's incompatible
10
+ CommonJS export shape. Locally linked copies must have their dependencies installed and be built
11
+ before use.
8
12
 
9
13
  ## Usage
10
14
 
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 _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
- /**
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 { _default as default };
5
+ export { fmt as default };
package/dist/fmt.mjs CHANGED
@@ -1 +1 @@
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
+ 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};
@@ -1 +1 @@
1
- import e from"eslint-plugin-perfectionist";const t={categories:{correctness:`error`,perf:`warn`,restriction:`error`,style:`warn`,suspicious:`warn`},jsPlugins:[{name:`perfectionist`,specifier:`eslint-plugin-perfectionist`}],plugins:[`eslint`,`import`,`jest`,`jsdoc`,`oxc`,`promise`,`typescript`,`unicorn`,`vitest`],rules:{"eslint/sort-imports":`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`,"perfectionist/sort-imports":`off`,...e.configs[`recommended-natural`].rules}};export{t as default};
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`,`jest`,`jsdoc`,`promise`,`typescript`,`unicorn`,`vitest`],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-magic-numbers":`off`,"eslint/no-ternary":`off`,"eslint/no-undefined":`off`,"import/group-exports":`off`,"import/prefer-default-export":`off`}};export{n as default};
@@ -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};
@@ -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
- declare const tailwind: OxlintConfig;
4
+ type TailwindOptions = Settings;
5
+ declare const tailwind: (options?: TailwindOptions) => OxlintConfig;
4
6
  //#endregion
5
7
  export { tailwind as default };
@@ -1 +1 @@
1
- import e from"eslint-plugin-better-tailwindcss";const t={env:{browser:!0},jsPlugins:[{name:`better-tailwindcss`,specifier:`eslint-plugin-better-tailwindcss`}],rules:{...e.configs[`recommended-warn`].rules,"better-tailwindcss/enforce-consistent-important-position":`warn`,"better-tailwindcss/enforce-consistent-line-wrapping":[`warn`,{indent:`tab`,strictness:`loose`}],"better-tailwindcss/enforce-logical-properties":`warn`}};export{t as default};
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};
@@ -1 +1 @@
1
- import e from"@unocss/eslint-plugin";const t={env:{browser:!0},jsPlugins:[{name:`unocss`,specifier:`@unocss/eslint-plugin`}],rules:{...e.configs.recommended.rules,"unocss/enforce-class-compile":`error`}};export{t as default};
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};
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "@slowpoketail/oxc",
3
- "version": "1.2.2",
3
+ "version": "1.3.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": {
@@ -40,29 +44,21 @@
40
44
  "access": "public"
41
45
  },
42
46
  "dependencies": {
47
+ "@unocss/eslint-plugin": "66.11.0",
48
+ "eslint-plugin-better-tailwindcss": "4.9.1",
43
49
  "eslint-plugin-perfectionist": "5.12.1"
44
50
  },
45
51
  "devDependencies": {
46
52
  "@types/node": "26.6.5",
47
- "@unocss/eslint-plugin": "66.11.0",
48
- "eslint-plugin-better-tailwindcss": "4.9.1",
49
53
  "typescript": "7.0.2",
50
54
  "vite-plus": "1.3.0"
51
55
  },
52
56
  "peerDependencies": {
53
- "@unocss/eslint-plugin": "*",
54
- "eslint-plugin-better-tailwindcss": "*",
55
57
  "oxfmt": "*",
56
58
  "oxlint": "*",
57
59
  "vite-plus": "*"
58
60
  },
59
61
  "peerDependenciesMeta": {
60
- "@unocss/eslint-plugin": {
61
- "optional": true
62
- },
63
- "eslint-plugin-better-tailwindcss": {
64
- "optional": true
65
- },
66
62
  "oxfmt": {
67
63
  "optional": true
68
64
  },