@nelsonlaidev/oxlint-config 0.2.5 → 0.3.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 +10 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +769 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +52 -17
package/README.md
CHANGED
|
@@ -7,7 +7,15 @@ This package is synced from `eslint-config` and aims to enable every supported O
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm i -D @nelsonlaidev/oxlint-config oxlint
|
|
10
|
+
npm i -D @nelsonlaidev/oxlint-config oxlint oxlint-tsgolint
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`oxlint-tsgolint` is optional — it enables type-aware linting rules. Omit it if you set `typeAware: false` in your config.
|
|
14
|
+
|
|
15
|
+
Some presets use Oxlint `jsPlugins`. These are declared as peer dependencies and most modern package managers (npm >=7, pnpm, yarn) install them automatically. Only run the command below if your package manager does not auto-install peers:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm i -D @nelsonlaidev/eslint-plugin @stylistic/eslint-plugin eslint-plugin-command eslint-plugin-de-morgan eslint-plugin-import-zod eslint-plugin-regexp eslint-plugin-simple-import-sort eslint-plugin-sonarjs
|
|
11
19
|
```
|
|
12
20
|
|
|
13
21
|
Create an `oxlint.config.ts` file with the following content:
|
|
@@ -31,12 +39,6 @@ This package follows `eslint-config` as the source of truth. When a rule is enab
|
|
|
31
39
|
|
|
32
40
|
`unused-imports` is intentionally not included. Oxlint's built-in `no-unused-vars` rule with `fix.imports: "safe-fix"` accomplishes the same goal natively.
|
|
33
41
|
|
|
34
|
-
If you are using pnpm, add the following to your `.npmrc` to hoist ESLint plugin dependencies so the Oxlint can resolve them:
|
|
35
|
-
|
|
36
|
-
```ini
|
|
37
|
-
public-hoist-pattern[]=*eslint-plugin*
|
|
38
|
-
```
|
|
39
|
-
|
|
40
42
|
### What's Included
|
|
41
43
|
|
|
42
44
|
This config includes opinionated rules from the following plugins:
|
|
@@ -94,6 +96,7 @@ These use `jsPlugins` and are checked for consistency via `sync:check`.
|
|
|
94
96
|
- `playwright`
|
|
95
97
|
- `sonarjs`
|
|
96
98
|
- `zod`
|
|
99
|
+
- `command`
|
|
97
100
|
- `stylistic`
|
|
98
101
|
- `de-morgan`
|
|
99
102
|
- `tailwindcss`
|
|
@@ -104,7 +107,6 @@ These use `jsPlugins` and are checked for consistency via `sync:check`.
|
|
|
104
107
|
|
|
105
108
|
| Config | Reason |
|
|
106
109
|
| ------------------- | --------------------------------------------------------------- |
|
|
107
|
-
| `command.ts` | Codemod for ESLint only, cannot be migrated |
|
|
108
110
|
| `comments.ts` | Plugin that comments out eslint-disable directives |
|
|
109
111
|
| `gitignore.ts` | File-based ignores, handled by Oxlint config |
|
|
110
112
|
| `ignores.ts` | File ignore patterns |
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Selectors } from "eslint-plugin-better-tailwindcss/types";
|
|
2
1
|
import { OxlintConfig, OxlintConfig as OxlintConfig$1, OxlintOverride } from "oxlint";
|
|
2
|
+
import { Selectors } from "eslint-plugin-better-tailwindcss/types";
|
|
3
3
|
|
|
4
4
|
//#region src/types/playwright.d.ts
|
|
5
5
|
type PlaywrightConfig = {
|
package/dist/index.d.mts.map
CHANGED
|
@@ -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;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;;;
|
|
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;;;cCiCE,YAAA;EAAgB,MAAA;EAAA,MAAA,EAAA;AAAA,IAA0C,mBAAA,KAA2B,cAAA;;;cChDrF,YAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA;AAAA,cAEA,OAAA;AAAA,cACA,QAAA"}
|