@isentinel/eslint-config 6.0.0-beta.21 → 6.0.0-beta.22
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/dist/cli.mjs +6 -7
- package/dist/index.d.mts +135 -91
- package/dist/index.mjs +20 -3
- package/dist/lint-cli.mjs +1 -1
- package/dist/oxlint.d.mts +204 -162
- package/dist/oxlint.mjs +20 -4
- package/package.json +18 -19
package/dist/oxlint.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import globals from "globals";
|
|
|
18
18
|
const staysInEslint = {
|
|
19
19
|
"e18e/* (optionally type-aware)": "Four e18e rules (prefer-array-at, prefer-array-to-reversed, prefer-array-to-sorted, prefer-spread-syntax) run without type information but detect more with it, so they stay in ESLint (see optionallyTypeAwareRules); the rest run in oxlint as a jsPlugin",
|
|
20
20
|
"eslint-comments/*": "Lints eslint-disable directives, which only exist in ESLint-linted code; oxlint-comments covers oxlint directives",
|
|
21
|
-
"flawless/naming-convention": "Type-aware custom rule; oxlint jsPlugins have no type information. The syntax-only flawless rules (arrow-return-style, max-lines-per-function, no-export-default-arrow, padding-after-expect-assertions, prefer-parameter-destructuring, the react jsx-shorthand-*, purity, no-unnecessary-use-*, prefer-destructuring-assignment) are mapped and run in oxlint. flawless/no-redundant-tsconfig-options, flawless/toml-* and flawless/yaml-* lint non-JS files and stay in ESLint",
|
|
21
|
+
"flawless/naming-convention": "Type-aware custom rule; oxlint jsPlugins have no type information. The syntax-only flawless rules (arrow-return-style, max-lines-per-function, no-conditional-in-test, no-export-default-arrow, padding-after-expect-assertions, prefer-ending-with-an-expect, prefer-expect-assertions-count, prefer-parameter-destructuring, the react jsx-shorthand-*, purity, no-unnecessary-use-*, prefer-destructuring-assignment) are mapped and run in oxlint. flawless/no-redundant-tsconfig-options, flawless/toml-* and flawless/yaml-* lint non-JS files and stay in ESLint",
|
|
22
22
|
"flawless/prefer-read-only-props": "Type-aware custom rule; oxlint jsPlugins have no type information",
|
|
23
23
|
"format-lua/*": "Oxlint cannot lint Lua files",
|
|
24
24
|
"jest/* (type-aware)": "Four type-aware jest rules stay in ESLint (see typeAwareJsPluginRules); the rest run in oxlint via eslint-plugin-jest as a jsPlugin (renamed jest-js, since oxlint reserves the native jest prefix), which honors settings.jest.globalPackage = @rbxts/jest-globals (the NATIVE oxlint jest plugin does not, https://github.com/oxc-project/oxc/issues/23290)",
|
|
@@ -534,11 +534,14 @@ const oxlintRuleMapping = {
|
|
|
534
534
|
"flawless/jsx-shorthand-boolean": "js-plugin",
|
|
535
535
|
"flawless/jsx-shorthand-fragment": "js-plugin",
|
|
536
536
|
"flawless/max-lines-per-function": "js-plugin",
|
|
537
|
+
"flawless/no-conditional-in-test": "js-plugin",
|
|
537
538
|
"flawless/no-export-default-arrow": "js-plugin",
|
|
538
539
|
"flawless/no-unnecessary-use-callback": "js-plugin",
|
|
539
540
|
"flawless/no-unnecessary-use-memo": "js-plugin",
|
|
540
541
|
"flawless/padding-after-expect-assertions": "js-plugin",
|
|
541
542
|
"flawless/prefer-destructuring-assignment": "js-plugin",
|
|
543
|
+
"flawless/prefer-ending-with-an-expect": "js-plugin",
|
|
544
|
+
"flawless/prefer-expect-assertions-count": "js-plugin",
|
|
542
545
|
"flawless/prefer-parameter-destructuring": "js-plugin",
|
|
543
546
|
"flawless/purity": "js-plugin",
|
|
544
547
|
"react/error-boundaries": "js-plugin",
|
|
@@ -658,7 +661,6 @@ const oxlintRuleMapping = {
|
|
|
658
661
|
"vitest/no-alias-methods": "native",
|
|
659
662
|
"vitest/no-commented-out-tests": "native",
|
|
660
663
|
"vitest/no-conditional-expect": "native",
|
|
661
|
-
"vitest/no-conditional-in-test": "native",
|
|
662
664
|
"vitest/no-conditional-tests": "native",
|
|
663
665
|
"vitest/no-disabled-tests": "native",
|
|
664
666
|
"vitest/no-duplicate-hooks": "native",
|
|
@@ -3680,7 +3682,7 @@ function oxlintStylistic(options = {}) {
|
|
|
3680
3682
|
//#endregion
|
|
3681
3683
|
//#region src/rules/test.ts
|
|
3682
3684
|
/**
|
|
3683
|
-
* Rules that make no sense in a type test (`*.
|
|
3685
|
+
* Rules that make no sense in a type test (`*.spec-d.ts`): these files assert
|
|
3684
3686
|
* with `expectTypeOf`/`assertType` at compile time, run no expectations, and
|
|
3685
3687
|
* name their blocks after the types under test.
|
|
3686
3688
|
*
|
|
@@ -3689,6 +3691,13 @@ function oxlintStylistic(options = {}) {
|
|
|
3689
3691
|
*/
|
|
3690
3692
|
function typeTestRules(prefix) {
|
|
3691
3693
|
return {
|
|
3694
|
+
...prefix === "vitest" ? {
|
|
3695
|
+
"flawless/prefer-ending-with-an-expect": "off",
|
|
3696
|
+
"vitest/consistent-test-filename": ["error", {
|
|
3697
|
+
allTestPattern: ".*\\.(test|spec)-d\\.[tj]sx?$",
|
|
3698
|
+
pattern: ".*\\.spec-d\\.[tj]sx?$"
|
|
3699
|
+
}]
|
|
3700
|
+
} : {},
|
|
3692
3701
|
[`${prefix}/expect-expect`]: "off",
|
|
3693
3702
|
[`${prefix}/prefer-expect-assertions`]: "off",
|
|
3694
3703
|
[`${prefix}/prefer-lowercase-title`]: "off"
|
|
@@ -3721,6 +3730,7 @@ function jestExtendedRules() {
|
|
|
3721
3730
|
*/
|
|
3722
3731
|
function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = true, stylistic = true } = {}) {
|
|
3723
3732
|
return {
|
|
3733
|
+
"flawless/prefer-expect-assertions-count": "error",
|
|
3724
3734
|
"jest/consistent-test-it": "error",
|
|
3725
3735
|
"jest/expect-expect": "warn",
|
|
3726
3736
|
"jest/max-expects": "error",
|
|
@@ -3797,6 +3807,13 @@ function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = tr
|
|
|
3797
3807
|
*/
|
|
3798
3808
|
function vitestRules({ extended = false, isInEditor = false, stylistic = true } = {}) {
|
|
3799
3809
|
return {
|
|
3810
|
+
"flawless/no-conditional-in-test": ["error", { allowOptionalChaining: false }],
|
|
3811
|
+
"flawless/prefer-ending-with-an-expect": ["warn", { assertFunctionNames: [
|
|
3812
|
+
"expect",
|
|
3813
|
+
"expectTypeOf",
|
|
3814
|
+
"assertType"
|
|
3815
|
+
] }],
|
|
3816
|
+
"flawless/prefer-expect-assertions-count": "warn",
|
|
3800
3817
|
"vitest/consistent-each-for": ["error", {
|
|
3801
3818
|
describe: "for",
|
|
3802
3819
|
it: "for",
|
|
@@ -3816,7 +3833,6 @@ function vitestRules({ extended = false, isInEditor = false, stylistic = true }
|
|
|
3816
3833
|
"vitest/no-alias-methods": "error",
|
|
3817
3834
|
"vitest/no-commented-out-tests": "warn",
|
|
3818
3835
|
"vitest/no-conditional-expect": "error",
|
|
3819
|
-
"vitest/no-conditional-in-test": "error",
|
|
3820
3836
|
"vitest/no-conditional-tests": "error",
|
|
3821
3837
|
"vitest/no-disabled-tests": isInEditor ? "off" : "error",
|
|
3822
3838
|
"vitest/no-duplicate-hooks": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.22",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dist"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@antfu/install-pkg": "
|
|
56
|
+
"@antfu/install-pkg": "2.0.1",
|
|
57
57
|
"@clack/prompts": "1.7.0",
|
|
58
58
|
"@cspell/eslint-plugin": "10.0.1",
|
|
59
59
|
"@e18e/eslint-plugin": "0.5.1",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@oxlint/plugins": "1.74.0",
|
|
65
65
|
"@pobammer-ts/small-rules": "2.7.0",
|
|
66
66
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
68
|
-
"@typescript-eslint/parser": "8.
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "8.65.0",
|
|
68
|
+
"@typescript-eslint/parser": "8.65.0",
|
|
69
69
|
"ansis": "4.3.1",
|
|
70
70
|
"concurrently": "10.0.3",
|
|
71
71
|
"eslint-config-flat-gitignore": "2.3.0",
|
|
@@ -76,15 +76,15 @@
|
|
|
76
76
|
"eslint-plugin-better-max-params": "1.0.0",
|
|
77
77
|
"eslint-plugin-comment-length": "2.3.1",
|
|
78
78
|
"eslint-plugin-de-morgan": "2.1.3",
|
|
79
|
-
"eslint-plugin-flawless": "1.
|
|
79
|
+
"eslint-plugin-flawless": "1.4.0",
|
|
80
80
|
"eslint-plugin-format-lua": "2.0.0",
|
|
81
81
|
"eslint-plugin-import-lite": "0.6.0",
|
|
82
|
-
"eslint-plugin-jsdoc": "63.
|
|
82
|
+
"eslint-plugin-jsdoc": "63.2.0",
|
|
83
83
|
"eslint-plugin-jsonc": "3.3.0",
|
|
84
84
|
"eslint-plugin-oxfmt": "0.14.0",
|
|
85
85
|
"eslint-plugin-package-json": "1.6.0",
|
|
86
86
|
"eslint-plugin-perfectionist": "5.10.0",
|
|
87
|
-
"eslint-plugin-pnpm": "1.
|
|
87
|
+
"eslint-plugin-pnpm": "1.7.0",
|
|
88
88
|
"eslint-plugin-promise": "7.3.0",
|
|
89
89
|
"eslint-plugin-roblox-ts": "1.4.1",
|
|
90
90
|
"eslint-plugin-sentinel": "0.1.2",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"oxfmt": "0.59.0",
|
|
102
102
|
"oxlint-plugin-eslint": "1.74.0",
|
|
103
103
|
"oxlint-plugin-oxlint-comments": "0.1.0",
|
|
104
|
-
"prettier": "3.9.
|
|
104
|
+
"prettier": "3.9.6",
|
|
105
105
|
"semver": "7.8.5",
|
|
106
106
|
"toml-eslint-parser": "1.0.3",
|
|
107
107
|
"yaml-eslint-parser": "2.1.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@antfu/ni": "30.2.0",
|
|
112
|
-
"@eslint-react/shared": "5.17.
|
|
112
|
+
"@eslint-react/shared": "5.17.3",
|
|
113
113
|
"@eslint/config-inspector": "3.1.0",
|
|
114
114
|
"@isentinel/tsconfig": "1.2.0",
|
|
115
115
|
"@stylistic/eslint-plugin-migrate": "4.4.1",
|
|
@@ -119,30 +119,30 @@
|
|
|
119
119
|
"@types/semver": "7.7.1",
|
|
120
120
|
"@types/yargs": "17.0.35",
|
|
121
121
|
"@vitest/eslint-plugin": "1.6.23",
|
|
122
|
-
"bumpp": "
|
|
122
|
+
"bumpp": "12.0.0",
|
|
123
123
|
"eslint": "10.7.0",
|
|
124
124
|
"eslint-plugin-erasable-syntax-only": "0.4.2",
|
|
125
125
|
"eslint-plugin-eslint-plugin": "7.5.0",
|
|
126
|
-
"eslint-plugin-jest": "29.15.
|
|
126
|
+
"eslint-plugin-jest": "29.15.5",
|
|
127
127
|
"eslint-plugin-jest-extended": "3.0.1",
|
|
128
128
|
"eslint-plugin-n": "18.2.2",
|
|
129
|
-
"eslint-plugin-react-jsx": "5.17.
|
|
130
|
-
"eslint-plugin-react-naming-convention": "5.17.
|
|
131
|
-
"eslint-plugin-react-x": "5.17.
|
|
129
|
+
"eslint-plugin-react-jsx": "5.17.3",
|
|
130
|
+
"eslint-plugin-react-naming-convention": "5.17.3",
|
|
131
|
+
"eslint-plugin-react-x": "5.17.3",
|
|
132
132
|
"eslint-typegen": "2.3.1",
|
|
133
133
|
"jiti": "2.7.0",
|
|
134
134
|
"oxlint": "1.74.0",
|
|
135
135
|
"oxlint-tsgolint": "0.25.0",
|
|
136
136
|
"parse-gitignore-ts": "1.0.0",
|
|
137
137
|
"picomatch": "4.0.5",
|
|
138
|
-
"pnpm-workspace-yaml": "1.
|
|
138
|
+
"pnpm-workspace-yaml": "1.7.0",
|
|
139
139
|
"publint": "0.3.21",
|
|
140
|
-
"tsdown": "0.22.
|
|
140
|
+
"tsdown": "0.22.12",
|
|
141
141
|
"type-fest": "5.8.0",
|
|
142
142
|
"typescript": "6.0.3",
|
|
143
143
|
"unplugin-unused": "0.5.7",
|
|
144
144
|
"vitest": "4.1.10",
|
|
145
|
-
"@isentinel/eslint-config": "6.0.0-beta.
|
|
145
|
+
"@isentinel/eslint-config": "6.0.0-beta.22"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
148
|
"@vitest/eslint-plugin": "^1.6.4",
|
|
@@ -201,8 +201,7 @@
|
|
|
201
201
|
"dev": "npx @eslint/config-inspector --config eslint-inspector.config.ts",
|
|
202
202
|
"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",
|
|
203
203
|
"postgen": "echo 'Generation complete!'",
|
|
204
|
-
"lint": "
|
|
205
|
-
"lint:ci": "concurrently 'oxlint' 'eslint --cache --cache-strategy content'",
|
|
204
|
+
"lint": "isentinel-lint",
|
|
206
205
|
"oxlint": "oxlint",
|
|
207
206
|
"release": "bumpp",
|
|
208
207
|
"stub": "tsdown",
|