@anolilab/oxlint-config 1.0.4 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## @anolilab/oxlint-config [2.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/oxlint-config@1.0.5...@anolilab/oxlint-config@2.0.0) (2026-10-21)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * **oxlint-config:** run the JS-plugin and native rules eslint-config enables (#1245)
6
+
7
+ ### Features
8
+
9
+ * **oxlint-config:** run the JS-plugin and native rules eslint-config enables ([#1245](https://github.com/anolilab/javascript-style-guide/issues/1245)) ([ca63d08](https://github.com/anolilab/javascript-style-guide/commit/ca63d084e0b1d8a569a045dd79ec48eb13ea6ee7))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * **@anolilab/eslint-config:** upgraded to 31.0.0
15
+ * **@anolilab/prettier-config:** upgraded to 11.0.0
16
+ * **eslint-plugin-regexp:** 3.1.1 → 3.3.1
17
+ * **oxlint:** 1.88.0 → 1.89.0
18
+
19
+ ## @anolilab/oxlint-config [1.0.5](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/oxlint-config@1.0.4...@anolilab/oxlint-config@1.0.5) (2026-10-16)
20
+
21
+
22
+ ### Dependencies
23
+
24
+ * **@anolilab/eslint-config:** upgraded to 30.0.7
25
+ * **oxlint:** 1.87.0 → 1.88.0
26
+
1
27
  ## @anolilab/oxlint-config [1.0.4](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/oxlint-config@1.0.3...@anolilab/oxlint-config@1.0.4) (2026-10-12)
2
28
 
3
29
 
package/README.md CHANGED
@@ -28,14 +28,16 @@ and leaves the `style` category to [`@anolilab/oxfmt-config`](https://anolilab.c
28
28
  ## Install
29
29
 
30
30
  ```sh
31
- npm install --save-dev @anolilab/oxlint-config oxlint
31
+ npm install --save-dev @anolilab/oxlint-config oxlint oxlint-tsgolint
32
32
  ```
33
33
 
34
34
  ```sh
35
- pnpm add -D @anolilab/oxlint-config oxlint
35
+ pnpm add -D @anolilab/oxlint-config oxlint oxlint-tsgolint
36
36
  ```
37
37
 
38
- > `oxlint` is a peer dependency, install it alongside this package.
38
+ > `oxlint` and `oxlint-tsgolint` are peer dependencies. Install both alongside this package. The
39
+ > config turns on type-aware linting, and oxlint looks for `oxlint-tsgolint` in your project.
40
+ > Without it, oxlint stops with `Failed to find tsgolint executable`.
39
41
 
40
42
  ## Setup
41
43
 
@@ -84,10 +86,31 @@ Relax or tighten individual rules on top of the shared base:
84
86
 
85
87
  - `categories`: `correctness: "error"`, `suspicious: "warn"`, `pedantic: "warn"`
86
88
  - `plugins`: `typescript`, `unicorn`, `oxc`, `import`, `promise`, `node`, `jsdoc`, `react`, `jsx-a11y`
87
-
88
- The `style` category is intentionally left off — formatting is the formatter's job. Pair this
89
+ - `jsPlugins`: `sonarjs`, `regexp`, `eslint-comments`, `no-secrets`, `react-doctor`. ESLint plugins
90
+ oxlint loads unchanged, with the rules `@anolilab/eslint-config` enables for them, and the
91
+ [`oxlint-plugin-react-doctor`](https://www.npmjs.com/package/oxlint-plugin-react-doctor) rule set.
92
+ - `rules`: the rules `@anolilab/eslint-config` enables for every JS/TS file that oxlint can run,
93
+ with ESLint's severity and options. Rules that apply only to some files (tests, markdown, JSON),
94
+ and rules oxlint does not implement stay in ESLint.
95
+ - **Type-aware rules.** `options.typeAware` is on, so the `typescript/*` rules that need type
96
+ information run through [`oxlint-tsgolint`](https://www.npmjs.com/package/oxlint-tsgolint). That
97
+ package must be installed next to `oxlint`. A consumer that sets its own `options` keeps this
98
+ setting.
99
+ - **Severity parity.** Every rule that `@anolilab/eslint-config` runs at `error` or `warn` runs here at
100
+ the same severity. Rules from the `style`, `restriction` and `nursery` categories that ESLint enables are
101
+ listed explicitly.
102
+ - **React Doctor.** Its rules are enabled except the 80 that oxlint already runs natively under the
103
+ same name (for example `jsx-a11y/alt-text`, `react/rules-of-hooks`, `no-eval`), so no finding is
104
+ reported twice. Where React Doctor is stricter than the native rule, the native rule is pinned to
105
+ React Doctor's severity. The React Doctor rules that match an ESLint rule of the same concept are
106
+ `error` and turn that ESLint rule off, but only when its plugin is loaded. The rest are `warn`.
107
+
108
+ The `style` category is left off as a category — formatting is the formatter's job. The rules ESLint runs from it are listed explicitly above. Pair this
89
109
  with [`@anolilab/oxfmt-config`](https://anolilab.com/nodejs/packages/oxfmt-config).
90
110
 
111
+ `@anolilab/eslint-config` reads this file when it is present and turns off the rules it runs, so
112
+ no rule is reported twice.
113
+
91
114
  ## Related
92
115
 
93
116
  - [`@anolilab/oxfmt-config`](https://anolilab.com/nodejs/packages/oxfmt-config)
package/dist/bin.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{existsSync as s}from"node:fs";import{writeFile as l}from"node:fs/promises";import{join as n}from"node:path";import{exit as i}from"node:process";const r="./node_modules/@anolilab/oxlint-config/.oxlintrc.json",a=async o=>{for(const e of[".oxlintrc.json",".oxlintrc.jsonc","oxlint.config.ts","oxlint.config.mts","oxlint.config.cts"])if(s(n(o,e))){console.warn(`⚠️ ${e} already exists;
2
+ import{existsSync as s}from"node:fs";import{writeFile as a}from"node:fs/promises";import{join as n}from"node:path";import{exit as t}from"node:process";const r="./node_modules/@anolilab/oxlint-config/.oxlintrc.json",l=async o=>{for(const e of[".oxlintrc.json",".oxlintrc.jsonc","oxlint.config.ts","oxlint.config.mts","oxlint.config.cts"])if(s(n(o,e))){console.warn(`⚠️ ${e} already exists;
3
3
  Make sure that it extends @anolilab/oxlint-config for it to work as it should:
4
4
  ${JSON.stringify({extends:[r]},void 0,4)}
5
- `);return}const c=n(o,".oxlintrc.json");await l(c,`${JSON.stringify({$schema:"./node_modules/oxlint/configuration_schema.json",extends:[r],rules:{}},void 0,4)}
6
- `,"utf8")},t=process.cwd(),f=n(t,"package.json");s(f)||(console.error("No package.json found in the current directory. You need to run this command in a directory with a package.json file."),i(1));console.log("Configuring @anolilab/oxlint-config",t,`
7
- `);try{await a(t),console.log("Everything went well, have fun!"),i(0)}catch(o){console.error("Something went wrong:",o),i(1)}
5
+ `);return}const c=n(o,".oxlintrc.json");await a(c,`${JSON.stringify({$schema:"./node_modules/oxlint/configuration_schema.json",extends:[r],rules:{}},void 0,4)}
6
+ `,"utf8")},i=process.cwd(),f=n(i,"package.json");s(f)||(console.error("No package.json found in the current directory. You need to run this command in a directory with a package.json file."),t(1));console.log("Configuring @anolilab/oxlint-config",i,`
7
+ `);try{await l(i),console.log("Everything went well, have fun!"),t(0)}catch(o){console.error("Something went wrong:",o),t(1)}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./packem_shared/default-DLYJuchD.cjs");module.exports=e.default;
1
+ "use strict";const e=require("./packem_shared/default-Cm-bEKxQ.cjs");module.exports=e.default;