@nelsonlaidev/oxlint-config 0.1.4 → 0.2.1

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/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Personal Oxlint configurations for Nelson Lai projects.
4
4
 
5
+ This package is synced from `eslint-config` and aims to enable every supported Oxlint rule that is also enabled in `eslint-config`.
6
+
5
7
  ## Installation
6
8
 
7
9
  ```bash
@@ -14,13 +16,22 @@ Create an `oxlint.config.ts` file with the following content:
14
16
  import { defineConfig } from '@nelsonlaidev/oxlint-config'
15
17
 
16
18
  export default defineConfig({
17
- // Custom OxLint configuration options
19
+ config: {
20
+ // Custom OxLint configuration options
21
+ },
22
+ custom: {
23
+ react: true,
24
+ },
18
25
  })
19
26
  ```
20
27
 
21
28
  ### Notes
22
29
 
23
- If you are using pnpm/bun, add the following to your `.npmrc` to hoist ESLint plugin dependencies so the Oxlint can resolve them:
30
+ This package follows `eslint-config` as the source of truth. When a rule is enabled there, we enable the corresponding Oxlint rule here when Oxlint supports it.
31
+
32
+ `unused-imports` is intentionally not included. That plugin requires type information, and Oxlint `jsPlugins` does not support that currently.
33
+
34
+ If you are using pnpm, add the following to your `.npmrc` to hoist ESLint plugin dependencies so the Oxlint can resolve them:
24
35
 
25
36
  ```ini
26
37
  public-hoist-pattern[]=*eslint-plugin*
package/dist/index.d.mts CHANGED
@@ -129,9 +129,16 @@ type CustomConfig = {
129
129
  vitest?: VitestConfig;
130
130
  playwright?: PlaywrightConfig;
131
131
  };
132
+ type DefineConfigOptions = {
133
+ config?: OxlintConfig$1;
134
+ custom?: CustomConfig;
135
+ };
132
136
  //#endregion
133
137
  //#region src/base.d.ts
134
- declare const defineConfig: (config?: OxlintConfig$1, userConfig?: CustomConfig) => OxlintConfig$1;
138
+ declare const defineConfig: ({
139
+ config,
140
+ custom: userConfig
141
+ }?: DefineConfigOptions) => OxlintConfig$1;
135
142
  //#endregion
136
143
  //#region src/globs.d.ts
137
144
  declare const GLOB_SRC_EXT = "{js,jsx,ts,tsx,cjs,cts,mjs,mts}";
@@ -141,5 +148,5 @@ declare const GLOB_JSX = "**/*.{jsx,cjsx,mjsx}";
141
148
  declare const GLOB_TS = "**/*.{ts,cts,mts}";
142
149
  declare const GLOB_TSX = "**/*.{tsx,ctsx,mtsx}";
143
150
  //#endregion
144
- export { CustomConfig, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, type OxlintConfig, TailwindCSSConfig, defineConfig };
151
+ export { CustomConfig, DefineConfigOptions, GLOB_JS, GLOB_JSX, GLOB_SRC, GLOB_SRC_EXT, GLOB_TS, GLOB_TSX, type OxlintConfig, TailwindCSSConfig, defineConfig };
145
152
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/playwright.ts","../src/types/tailwindcss.ts","../src/types/vitest.ts","../src/types/config.ts","../src/base.ts","../src/globs.ts"],"mappings":";;;;KAEY,gBAAA;;;AAAZ;EAIE,KAAA,EAAO,cAAA;;;;;EAKP,mBAAA;EAKA;;;;EAAA,sBAAA;AAAA;;;KCdU,iBAAA;;;ADAZ;ECIE,UAAA;;;;EAIA,cAAA;EDCA;;;ECGA,QAAA;;;;AAZF;EAiBE,sBAAA;;;;;EAKA,YAAA;EALA;;;EASA,YAAA;EAIY;;;EAAZ,SAAA,GAAY,SAAA;EAEZ,SAAA;IAkBE;;;;IAbA,QAAA;IAwCF;;;;IAnCE,OAAA;EAAA;EAGF,UAAA;IA6CE;;;;IAxCA,KAAA;;AClDJ;;;IDuDI,cAAA;ICnDmB;;;;IDwDnB,iBAAA;IE1DoB;;;;IF+DpB,YAAA;IE1D2B;;;;IF+D3B,eAAA;EAAA;EEhEF;;;;EFuEA,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EGjCtD;;;;EHuCX,MAAA;EAEA,UAAA;IGwDD;;;;IHnDG,cAAA;EAAA;AAAA;;;KC1FQ,YAAA;;;AFAZ;EEIE,KAAA,EAAO,cAAA;AAAA;;;KCFG,YAAA;EACV,MAAA;EACA,KAAA;EACA,WAAA,GAAc,iBAAA;EACd,MAAA,GAAS,YAAA;EACT,UAAA,GAAa,gBAAA;AAAA;;;cCqCF,YAAA,GAAgB,MAAA,GAAQ,cAAA,EAAmB,UAAA,GAAY,YAAA,KAAoB,cAAA;;;cC9C3E,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/playwright.ts","../src/types/tailwindcss.ts","../src/types/vitest.ts","../src/types/config.ts","../src/base.ts","../src/globs.ts"],"mappings":";;;;KAEY,gBAAA;;;AAAZ;EAIE,KAAA,EAAO,cAAA;;;;;EAKP,mBAAA;EAKA;;;;EAAA,sBAAA;AAAA;;;KCdU,iBAAA;;;ADAZ;ECIE,UAAA;;;;EAIA,cAAA;EDCA;;;ECGA,QAAA;;;;AAZF;EAiBE,sBAAA;;;;;EAKA,YAAA;EALA;;;EASA,YAAA;EAIY;;;EAAZ,SAAA,GAAY,SAAA;EAEZ,SAAA;IAkBE;;;;IAbA,QAAA;IAwCF;;;;IAnCE,OAAA;EAAA;EAGF,UAAA;IA6CE;;;;IAxCA,KAAA;;AClDJ;;;IDuDI,cAAA;ICnDmB;;;;IDwDnB,iBAAA;IEzDoB;;;;IF8DpB,YAAA;IEzD2B;;;;IF8D3B,eAAA;EAAA;EE/DF;;;;EFsEA,QAAA,cAAsB,KAAA;IAAQ,OAAA;IAAiB,OAAA;IAAkB,GAAA;EAAA;EEhE5C;;;;EFsErB,MAAA;EAEA,UAAA;IExEqB;;;;IF6EnB,cAAA;EAAA;AAAA;;;KC1FQ,YAAA;;;AFAZ;EEIE,KAAA,EAAO,cAAA;AAAA;;;KCDG,YAAA;EACV,MAAA;EACA,KAAA;EACA,WAAA,GAAc,iBAAA;EACd,MAAA,GAAS,YAAA;EACT,UAAA,GAAa,gBAAA;AAAA;AAAA,KAGH,mBAAA;EACV,MAAA,GAAS,cAAA;EACT,MAAA,GAAS,YAAA;AAAA;;;cC+BE,YAAA;EAAgB,MAAA;EAAA,MAAA,EAAA;AAAA,IAA0C,mBAAA,KAA2B,cAAA;;;cC9CrF,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}