@isentinel/eslint-config 6.2.0 → 6.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/README.md +29 -19
- package/dist/cli.mjs +6 -6
- package/dist/index.d.mts +946 -162
- package/dist/index.mjs +784 -490
- package/dist/lint-cli.mjs +64 -54
- package/dist/oxfmt.mjs +61 -22
- package/dist/oxlint.d.mts +1007 -97
- package/dist/oxlint.mjs +236 -136
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -349,11 +349,13 @@ engines would run (default mode or `--fix`), the runner checks whether the
|
|
|
349
349
|
resolved config is hybrid; if it is not, it **runs ESLint only, skips oxlint,
|
|
350
350
|
and prints one stderr warning** (enable hybrid mode, or pass `--oxlint` to run
|
|
351
351
|
oxlint explicitly). The check is cheap: the factory records the hybrid status in
|
|
352
|
-
`node_modules/.cache/isentinel-lint/`
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
352
|
+
`node_modules/.cache/isentinel-lint/` whenever the runner's ESLint children
|
|
353
|
+
evaluate the config (other evaluations, such as tests or scripts that build a
|
|
354
|
+
different config, do not write it), and the runner trusts that cache unless your
|
|
355
|
+
ESLint config is newer, in which case it probes `eslint --print-config` once and
|
|
356
|
+
caches the result. If the status cannot be determined it fails open and runs
|
|
357
|
+
both engines as before. Explicit `--eslint` / `--oxlint` runs skip the check
|
|
358
|
+
entirely.
|
|
357
359
|
|
|
358
360
|
Any trailing positional arguments are treated as paths to lint (default `.`).
|
|
359
361
|
|
|
@@ -990,19 +992,21 @@ as in the factories, so oxfmt formats the same files the linter would. TOML,
|
|
|
990
992
|
`.mdx` and other files the linter does not format are ignored.
|
|
991
993
|
|
|
992
994
|
In standalone mode, oxfmt never sees the linter's options. The factories warn
|
|
993
|
-
once per lint run when you set any of these, because they do not change
|
|
994
|
-
|
|
995
|
-
or `gitignore` (`false` or custom files).
|
|
996
|
-
|
|
995
|
+
once per lint run when you set any of these, because they do not change what
|
|
996
|
+
oxfmt formats: `formatters` (any value except `true`), `componentExts`,
|
|
997
|
+
`ignores`, or `gitignore` (`false` or custom files). They change only which
|
|
998
|
+
Markdown code blocks ESLint formats: `formatters` chooses their languages, and
|
|
999
|
+
the ignores choose their files. Set the equivalent in `isentinelOxfmt` instead
|
|
1000
|
+
(`formatters`, `componentExts`, `ignorePatterns`, and format options).
|
|
997
1001
|
`stylistic: false` turns off the stylistic lint rules but not oxfmt. The rule
|
|
998
1002
|
widths also come from the oxfmt config only, not from
|
|
999
1003
|
`formatters.prettierOptions` or `formatters.oxfmtOptions`. The setup wizard
|
|
1000
1004
|
copies migrated `.eslintignore` patterns to both configs.
|
|
1001
1005
|
|
|
1002
|
-
With `formatter: "standalone"`, the linter enables `oxfmt/oxfmt`
|
|
1003
|
-
keeps the rules that turn off formatting
|
|
1004
|
-
stays in ESLint, because oxfmt does not
|
|
1005
|
-
all of this for you.
|
|
1006
|
+
With `formatter: "standalone"`, the linter enables `oxfmt/oxfmt` only in
|
|
1007
|
+
Markdown code blocks (see below), but keeps the rules that turn off formatting
|
|
1008
|
+
conflicts. Lua formatting (Stylua) stays in ESLint, because oxfmt does not
|
|
1009
|
+
format Lua. The setup wizard can write all of this for you.
|
|
1006
1010
|
|
|
1007
1011
|
`isentinel-lint` runs `oxfmt --check` next to the linters whenever it finds an
|
|
1008
1012
|
`oxfmt.config.ts` or `oxfmt.config.mts`, and `oxfmt --write` last with `--fix`.
|
|
@@ -1031,12 +1035,18 @@ becomes implicit only if it fits. It comes from `stylistic.maxLen`, else
|
|
|
1031
1035
|
`useOxfmt.printWidth` is the width the rule gives oxfmt to predict its output.
|
|
1032
1036
|
It always comes from the root `printWidth` of the oxfmt config, so that `--fix`
|
|
1033
1037
|
agrees with oxfmt. An override that changes `printWidth` or `tabWidth` for JS or
|
|
1034
|
-
TS files gets a warning, because the linter uses the root values.
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
TS files gets a warning, because the linter uses the root values. The comment
|
|
1039
|
+
length rules take their `tabSize` from the same oxfmt widths.
|
|
1040
|
+
|
|
1041
|
+
Markdown prose and Markdown code blocks are formatted separately, in both modes.
|
|
1042
|
+
Oxfmt formats the prose at the Markdown width (`jsdocPrintWidth`, else 80) and
|
|
1043
|
+
leaves code blocks alone (`embeddedLanguageFormatting: "off"`). ESLint formats
|
|
1044
|
+
each code block with `oxfmt/oxfmt` and the options of its language, the same as
|
|
1045
|
+
a file of that language: a TypeScript block uses the root `printWidth`, a YAML
|
|
1046
|
+
block the YAML options. Overrides and `.editorconfig` sections, which match by
|
|
1047
|
+
path, do not reach code blocks; the config's `ignorePatterns` do. The lint rules
|
|
1048
|
+
in a code block use the same widths as in a source file. ESLint does not format
|
|
1049
|
+
code blocks in files it ignores.
|
|
1040
1050
|
|
|
1041
1051
|
The stylistic `indent` and `quotes`, and the JSON bracket spacing, follow the
|
|
1042
1052
|
oxfmt options (`useTabs`, `tabWidth`, `singleQuote`, `bracketSpacing`) unless
|
package/dist/cli.mjs
CHANGED
|
@@ -83,7 +83,7 @@ function oxfmtConfigNamesIn(directory) {
|
|
|
83
83
|
}
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region package.json
|
|
86
|
-
var version = "6.
|
|
86
|
+
var version = "6.4.0";
|
|
87
87
|
var package_default = {
|
|
88
88
|
name: "@isentinel/eslint-config",
|
|
89
89
|
version,
|
|
@@ -145,7 +145,7 @@ var package_default = {
|
|
|
145
145
|
"dev": "npx @eslint/config-inspector --config eslint-inspector.config.ts",
|
|
146
146
|
"gen": "node scripts/typegen.ts && node scripts/typegen-oxlint.ts && node scripts/typegen-defaults.ts && node scripts/typegen-defaults-oxlint.ts && node scripts/versiongen.ts && node scripts/stylistic-gen.ts && node scripts/type-aware-gen.ts && node scripts/roblox-allowed-words-gen.ts && node scripts/gen-package-extensions.ts",
|
|
147
147
|
"postgen": "echo 'Generation complete!'",
|
|
148
|
-
"lint": "isentinel-lint",
|
|
148
|
+
"lint": "isentinel-lint --eslint-args \"--max-warnings 0\" --oxlint-args --deny-warnings",
|
|
149
149
|
"oxlint": "oxlint",
|
|
150
150
|
"prepack": "nr build",
|
|
151
151
|
"release": "bumpp -r",
|
|
@@ -264,8 +264,8 @@ var package_default = {
|
|
|
264
264
|
"eslint-plugin-react-naming-convention": "^5.10.0",
|
|
265
265
|
"eslint-plugin-react-x": "^5.10.0",
|
|
266
266
|
"eslint-plugin-testing-library": "^7.16.2",
|
|
267
|
-
"oxlint": ">=1.
|
|
268
|
-
"oxlint-tsgolint": ">=0.
|
|
267
|
+
"oxlint": ">=1.92.0",
|
|
268
|
+
"oxlint-tsgolint": ">=7.0.2005"
|
|
269
269
|
},
|
|
270
270
|
peerDependenciesMeta: {
|
|
271
271
|
"@vitest/eslint-plugin": { "optional": true },
|
|
@@ -281,8 +281,8 @@ var package_default = {
|
|
|
281
281
|
"oxlint": { "optional": true },
|
|
282
282
|
"oxlint-tsgolint": { "optional": true }
|
|
283
283
|
},
|
|
284
|
-
packageManager: "pnpm@
|
|
285
|
-
engines: { "node": ">=24.
|
|
284
|
+
packageManager: "pnpm@12.18.0+sha512.9d7882d5dc82147ecfc4e062aa34834e0ad0296710a1837a1115ae012127d36b7109e321ac1598a1dd0a65597681b1e99917e12ed0d749eae91187943363beb3",
|
|
285
|
+
engines: { "node": ">=24.15.0" },
|
|
286
286
|
publishConfig: { "access": "public" }
|
|
287
287
|
};
|
|
288
288
|
//#endregion
|