oxlint 1.73.0 → 1.74.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/configuration_schema.json +130 -6
- package/dist/bindings.js +26 -26
- package/dist/index.d.ts +69 -2
- package/dist/lint.js +27 -27
- package/dist/plugins-dev.d.ts +57 -100
- package/dist/plugins-dev.js +1 -1
- package/package.json +20 -20
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"markdownDescription": "Enabled or disabled specific global variables."
|
|
49
49
|
},
|
|
50
50
|
"ignorePatterns": {
|
|
51
|
-
"description": "Globs to ignore during linting.
|
|
51
|
+
"description": "Globs to ignore during linting. Patterns use gitignore-style matching,\nrooted at the directory containing the configuration file.\nFiles outside that directory cannot be matched; patterns containing `..`\nare rejected as a configuration error.",
|
|
52
52
|
"default": [],
|
|
53
53
|
"type": "array",
|
|
54
54
|
"items": {
|
|
55
55
|
"type": "string"
|
|
56
56
|
},
|
|
57
|
-
"markdownDescription": "Globs to ignore during linting.
|
|
57
|
+
"markdownDescription": "Globs to ignore during linting. Patterns use gitignore-style matching,\nrooted at the directory containing the configuration file.\nFiles outside that directory cannot be matched; patterns containing `..`\nare rejected as a configuration error."
|
|
58
58
|
},
|
|
59
59
|
"jsPlugins": {
|
|
60
60
|
"description": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nBasic usage with a TypeScript plugin and a local plugin path.\n\nTypeScript plugin files are supported in the following environments:\n- Deno and Bun: TypeScript files are supported natively.\n- Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in\ntype-stripping enabled by default.\n\nFor older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.ts\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```",
|
|
@@ -3544,7 +3544,24 @@
|
|
|
3544
3544
|
]
|
|
3545
3545
|
},
|
|
3546
3546
|
"jsdoc/require-param": {
|
|
3547
|
-
"
|
|
3547
|
+
"anyOf": [
|
|
3548
|
+
{
|
|
3549
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
"type": "array",
|
|
3553
|
+
"items": [
|
|
3554
|
+
{
|
|
3555
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"$ref": "#/definitions/RequireParamConfig"
|
|
3559
|
+
}
|
|
3560
|
+
],
|
|
3561
|
+
"maxItems": 2,
|
|
3562
|
+
"minItems": 2
|
|
3563
|
+
}
|
|
3564
|
+
]
|
|
3548
3565
|
},
|
|
3549
3566
|
"jsdoc/require-param-description": {
|
|
3550
3567
|
"anyOf": [
|
|
@@ -13036,6 +13053,26 @@
|
|
|
13036
13053
|
},
|
|
13037
13054
|
"additionalProperties": false
|
|
13038
13055
|
},
|
|
13056
|
+
"Namespaces": {
|
|
13057
|
+
"oneOf": [
|
|
13058
|
+
{
|
|
13059
|
+
"description": "Allow declarations directly inside TypeScript namespace or module bodies.",
|
|
13060
|
+
"type": "string",
|
|
13061
|
+
"enum": [
|
|
13062
|
+
"allow"
|
|
13063
|
+
],
|
|
13064
|
+
"markdownDescription": "Allow declarations directly inside TypeScript namespace or module bodies."
|
|
13065
|
+
},
|
|
13066
|
+
{
|
|
13067
|
+
"description": "Disallow declarations directly inside TypeScript namespace or module bodies.",
|
|
13068
|
+
"type": "string",
|
|
13069
|
+
"enum": [
|
|
13070
|
+
"disallow"
|
|
13071
|
+
],
|
|
13072
|
+
"markdownDescription": "Disallow declarations directly inside TypeScript namespace or module bodies."
|
|
13073
|
+
}
|
|
13074
|
+
]
|
|
13075
|
+
},
|
|
13039
13076
|
"NativeAllowList": {
|
|
13040
13077
|
"anyOf": [
|
|
13041
13078
|
{
|
|
@@ -14116,6 +14153,16 @@
|
|
|
14116
14153
|
}
|
|
14117
14154
|
],
|
|
14118
14155
|
"markdownDescription": "Controls whether function declarations in nested blocks are allowed in strict mode (ES6+ behavior)."
|
|
14156
|
+
},
|
|
14157
|
+
"namespaces": {
|
|
14158
|
+
"description": "Controls whether declarations directly inside TypeScript namespace or module bodies are allowed.",
|
|
14159
|
+
"default": null,
|
|
14160
|
+
"allOf": [
|
|
14161
|
+
{
|
|
14162
|
+
"$ref": "#/definitions/Namespaces"
|
|
14163
|
+
}
|
|
14164
|
+
],
|
|
14165
|
+
"markdownDescription": "Controls whether declarations directly inside TypeScript namespace or module bodies are allowed."
|
|
14119
14166
|
}
|
|
14120
14167
|
},
|
|
14121
14168
|
"additionalProperties": false
|
|
@@ -14812,7 +14859,6 @@
|
|
|
14812
14859
|
"properties": {
|
|
14813
14860
|
"allow": {
|
|
14814
14861
|
"description": "These strings will be compiled into regular expressions with the u flag and be used to test against the imported path.\nA common use case is to allow importing `package.json`. This is because `package.json` commonly lives outside of the TS root directory,\nso statically importing it would lead to root directory conflicts, especially with `resolveJsonModule` enabled.\nYou can also use it to allow importing any JSON if your environment doesn't support JSON modules, or use it for other cases where `import` statements cannot work.\n\nWith `{ allow: ['/package\\\\.json$'] }`:\n\nExamples of **correct** code for this rule:\n```ts\nconsole.log(require('../package.json').version);\n```",
|
|
14815
|
-
"default": [],
|
|
14816
14862
|
"type": "array",
|
|
14817
14863
|
"items": {
|
|
14818
14864
|
"type": "string"
|
|
@@ -16249,11 +16295,12 @@
|
|
|
16249
16295
|
"type": "object",
|
|
16250
16296
|
"properties": {
|
|
16251
16297
|
"ignoreProps": {
|
|
16252
|
-
"
|
|
16298
|
+
"description": "Prop names to ignore, as regular expression patterns.",
|
|
16253
16299
|
"type": "array",
|
|
16254
16300
|
"items": {
|
|
16255
16301
|
"type": "string"
|
|
16256
|
-
}
|
|
16302
|
+
},
|
|
16303
|
+
"markdownDescription": "Prop names to ignore, as regular expression patterns."
|
|
16257
16304
|
}
|
|
16258
16305
|
},
|
|
16259
16306
|
"additionalProperties": false
|
|
@@ -17720,6 +17767,83 @@
|
|
|
17720
17767
|
},
|
|
17721
17768
|
"additionalProperties": false
|
|
17722
17769
|
},
|
|
17770
|
+
"RequireParamConfig": {
|
|
17771
|
+
"type": "object",
|
|
17772
|
+
"properties": {
|
|
17773
|
+
"checkConstructors": {
|
|
17774
|
+
"description": "Whether to check constructor methods.",
|
|
17775
|
+
"default": false,
|
|
17776
|
+
"type": "boolean",
|
|
17777
|
+
"markdownDescription": "Whether to check constructor methods."
|
|
17778
|
+
},
|
|
17779
|
+
"checkDestructured": {
|
|
17780
|
+
"description": "Whether to check destructured parameters.",
|
|
17781
|
+
"default": true,
|
|
17782
|
+
"type": "boolean",
|
|
17783
|
+
"markdownDescription": "Whether to check destructured parameters."
|
|
17784
|
+
},
|
|
17785
|
+
"checkDestructuredRoots": {
|
|
17786
|
+
"description": "Whether to check destructured parameters when you have code like\n`function doSomething({ a, b }) { ... }`. Because there is no named\nparameter in this example, when this option is `true` you must\nhave a `@param` tag that corresponds to `{a, b}`.",
|
|
17787
|
+
"default": true,
|
|
17788
|
+
"type": "boolean",
|
|
17789
|
+
"markdownDescription": "Whether to check destructured parameters when you have code like\n`function doSomething({ a, b }) { ... }`. Because there is no named\nparameter in this example, when this option is `true` you must\nhave a `@param` tag that corresponds to `{a, b}`."
|
|
17790
|
+
},
|
|
17791
|
+
"checkGetters": {
|
|
17792
|
+
"description": "Whether to check getter methods.",
|
|
17793
|
+
"default": true,
|
|
17794
|
+
"type": "boolean",
|
|
17795
|
+
"markdownDescription": "Whether to check getter methods."
|
|
17796
|
+
},
|
|
17797
|
+
"checkRestProperty": {
|
|
17798
|
+
"description": "Whether to check rest properties.",
|
|
17799
|
+
"default": false,
|
|
17800
|
+
"type": "boolean",
|
|
17801
|
+
"markdownDescription": "Whether to check rest properties."
|
|
17802
|
+
},
|
|
17803
|
+
"checkSetters": {
|
|
17804
|
+
"description": "Whether to check setter methods.",
|
|
17805
|
+
"default": true,
|
|
17806
|
+
"type": "boolean",
|
|
17807
|
+
"markdownDescription": "Whether to check setter methods."
|
|
17808
|
+
},
|
|
17809
|
+
"checkTypesPattern": {
|
|
17810
|
+
"description": "Regex pattern to match types that exempt parameters from checking.",
|
|
17811
|
+
"default": "^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$",
|
|
17812
|
+
"type": "string",
|
|
17813
|
+
"markdownDescription": "Regex pattern to match types that exempt parameters from checking."
|
|
17814
|
+
},
|
|
17815
|
+
"exemptedBy": {
|
|
17816
|
+
"description": "List of JSDoc tags that exempt functions from `@param` checking.",
|
|
17817
|
+
"default": [
|
|
17818
|
+
"inheritdoc"
|
|
17819
|
+
],
|
|
17820
|
+
"type": "array",
|
|
17821
|
+
"items": {
|
|
17822
|
+
"type": "string"
|
|
17823
|
+
},
|
|
17824
|
+
"markdownDescription": "List of JSDoc tags that exempt functions from `@param` checking."
|
|
17825
|
+
},
|
|
17826
|
+
"ignoreWhenAllParamsMissing": {
|
|
17827
|
+
"description": "Set to `true` to ignore reporting when all params are missing. Defaults to `false`.",
|
|
17828
|
+
"default": false,
|
|
17829
|
+
"type": "boolean",
|
|
17830
|
+
"markdownDescription": "Set to `true` to ignore reporting when all params are missing. Defaults to `false`."
|
|
17831
|
+
},
|
|
17832
|
+
"interfaceExemptsParamsCheck": {
|
|
17833
|
+
"description": "Set if you wish TypeScript interfaces to exempt checks for the existence of `@param`'s.\nWill check for a type defining the function itself (on a variable declaration) or if there is a single destructured object with a type. Defaults to `false`.",
|
|
17834
|
+
"default": false,
|
|
17835
|
+
"type": "boolean",
|
|
17836
|
+
"markdownDescription": "Set if you wish TypeScript interfaces to exempt checks for the existence of `@param`'s.\nWill check for a type defining the function itself (on a variable declaration) or if there is a single destructured object with a type. Defaults to `false`."
|
|
17837
|
+
},
|
|
17838
|
+
"useDefaultObjectProperties": {
|
|
17839
|
+
"description": "Set to `true` if you wish to expect documentation of properties on objects supplied as default values. Defaults to `false`.",
|
|
17840
|
+
"default": false,
|
|
17841
|
+
"type": "boolean",
|
|
17842
|
+
"markdownDescription": "Set to `true` if you wish to expect documentation of properties on objects supplied as default values. Defaults to `false`."
|
|
17843
|
+
}
|
|
17844
|
+
},
|
|
17845
|
+
"additionalProperties": false
|
|
17846
|
+
},
|
|
17723
17847
|
"RequireParamDescriptionConfig": {
|
|
17724
17848
|
"type": "object",
|
|
17725
17849
|
"properties": {
|
package/dist/bindings.js
CHANGED
|
@@ -37,7 +37,7 @@ function requireNative() {
|
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
39
|
let binding = require("@oxlint/binding-android-arm64"), bindingPackageVersion = require("@oxlint/binding-android-arm64/package.json").version;
|
|
40
|
-
if (bindingPackageVersion !== "1.
|
|
40
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
41
41
|
return binding;
|
|
42
42
|
} catch (e) {
|
|
43
43
|
loadErrors.push(e);
|
|
@@ -50,7 +50,7 @@ function requireNative() {
|
|
|
50
50
|
}
|
|
51
51
|
try {
|
|
52
52
|
let binding = require("@oxlint/binding-android-arm-eabi"), bindingPackageVersion = require("@oxlint/binding-android-arm-eabi/package.json").version;
|
|
53
|
-
if (bindingPackageVersion !== "1.
|
|
53
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
54
54
|
return binding;
|
|
55
55
|
} catch (e) {
|
|
56
56
|
loadErrors.push(e);
|
|
@@ -64,7 +64,7 @@ function requireNative() {
|
|
|
64
64
|
}
|
|
65
65
|
try {
|
|
66
66
|
let binding = require("@oxlint/binding-win32-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-win32-x64-gnu/package.json").version;
|
|
67
|
-
if (bindingPackageVersion !== "1.
|
|
67
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
68
68
|
return binding;
|
|
69
69
|
} catch (e) {
|
|
70
70
|
loadErrors.push(e);
|
|
@@ -77,7 +77,7 @@ function requireNative() {
|
|
|
77
77
|
}
|
|
78
78
|
try {
|
|
79
79
|
let binding = require("@oxlint/binding-win32-x64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-x64-msvc/package.json").version;
|
|
80
|
-
if (bindingPackageVersion !== "1.
|
|
80
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
81
|
return binding;
|
|
82
82
|
} catch (e) {
|
|
83
83
|
loadErrors.push(e);
|
|
@@ -91,7 +91,7 @@ function requireNative() {
|
|
|
91
91
|
}
|
|
92
92
|
try {
|
|
93
93
|
let binding = require("@oxlint/binding-win32-ia32-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-ia32-msvc/package.json").version;
|
|
94
|
-
if (bindingPackageVersion !== "1.
|
|
94
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
95
95
|
return binding;
|
|
96
96
|
} catch (e) {
|
|
97
97
|
loadErrors.push(e);
|
|
@@ -104,7 +104,7 @@ function requireNative() {
|
|
|
104
104
|
}
|
|
105
105
|
try {
|
|
106
106
|
let binding = require("@oxlint/binding-win32-arm64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-arm64-msvc/package.json").version;
|
|
107
|
-
if (bindingPackageVersion !== "1.
|
|
107
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
108
108
|
return binding;
|
|
109
109
|
} catch (e) {
|
|
110
110
|
loadErrors.push(e);
|
|
@@ -118,7 +118,7 @@ function requireNative() {
|
|
|
118
118
|
}
|
|
119
119
|
try {
|
|
120
120
|
let binding = require("@oxlint/binding-darwin-universal"), bindingPackageVersion = require("@oxlint/binding-darwin-universal/package.json").version;
|
|
121
|
-
if (bindingPackageVersion !== "1.
|
|
121
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
122
122
|
return binding;
|
|
123
123
|
} catch (e) {
|
|
124
124
|
loadErrors.push(e);
|
|
@@ -131,7 +131,7 @@ function requireNative() {
|
|
|
131
131
|
}
|
|
132
132
|
try {
|
|
133
133
|
let binding = require("@oxlint/binding-darwin-x64"), bindingPackageVersion = require("@oxlint/binding-darwin-x64/package.json").version;
|
|
134
|
-
if (bindingPackageVersion !== "1.
|
|
134
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
135
135
|
return binding;
|
|
136
136
|
} catch (e) {
|
|
137
137
|
loadErrors.push(e);
|
|
@@ -144,7 +144,7 @@ function requireNative() {
|
|
|
144
144
|
}
|
|
145
145
|
try {
|
|
146
146
|
let binding = require("@oxlint/binding-darwin-arm64"), bindingPackageVersion = require("@oxlint/binding-darwin-arm64/package.json").version;
|
|
147
|
-
if (bindingPackageVersion !== "1.
|
|
147
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
148
148
|
return binding;
|
|
149
149
|
} catch (e) {
|
|
150
150
|
loadErrors.push(e);
|
|
@@ -158,7 +158,7 @@ function requireNative() {
|
|
|
158
158
|
}
|
|
159
159
|
try {
|
|
160
160
|
let binding = require("@oxlint/binding-freebsd-x64"), bindingPackageVersion = require("@oxlint/binding-freebsd-x64/package.json").version;
|
|
161
|
-
if (bindingPackageVersion !== "1.
|
|
161
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
162
162
|
return binding;
|
|
163
163
|
} catch (e) {
|
|
164
164
|
loadErrors.push(e);
|
|
@@ -171,7 +171,7 @@ function requireNative() {
|
|
|
171
171
|
}
|
|
172
172
|
try {
|
|
173
173
|
let binding = require("@oxlint/binding-freebsd-arm64"), bindingPackageVersion = require("@oxlint/binding-freebsd-arm64/package.json").version;
|
|
174
|
-
if (bindingPackageVersion !== "1.
|
|
174
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
175
175
|
return binding;
|
|
176
176
|
} catch (e) {
|
|
177
177
|
loadErrors.push(e);
|
|
@@ -185,7 +185,7 @@ function requireNative() {
|
|
|
185
185
|
}
|
|
186
186
|
try {
|
|
187
187
|
let binding = require("@oxlint/binding-linux-x64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-x64-musl/package.json").version;
|
|
188
|
-
if (bindingPackageVersion !== "1.
|
|
188
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
189
189
|
return binding;
|
|
190
190
|
} catch (e) {
|
|
191
191
|
loadErrors.push(e);
|
|
@@ -198,7 +198,7 @@ function requireNative() {
|
|
|
198
198
|
}
|
|
199
199
|
try {
|
|
200
200
|
let binding = require("@oxlint/binding-linux-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-x64-gnu/package.json").version;
|
|
201
|
-
if (bindingPackageVersion !== "1.
|
|
201
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
202
202
|
return binding;
|
|
203
203
|
} catch (e) {
|
|
204
204
|
loadErrors.push(e);
|
|
@@ -212,7 +212,7 @@ function requireNative() {
|
|
|
212
212
|
}
|
|
213
213
|
try {
|
|
214
214
|
let binding = require("@oxlint/binding-linux-arm64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-musl/package.json").version;
|
|
215
|
-
if (bindingPackageVersion !== "1.
|
|
215
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
216
216
|
return binding;
|
|
217
217
|
} catch (e) {
|
|
218
218
|
loadErrors.push(e);
|
|
@@ -225,7 +225,7 @@ function requireNative() {
|
|
|
225
225
|
}
|
|
226
226
|
try {
|
|
227
227
|
let binding = require("@oxlint/binding-linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-gnu/package.json").version;
|
|
228
|
-
if (bindingPackageVersion !== "1.
|
|
228
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
229
229
|
return binding;
|
|
230
230
|
} catch (e) {
|
|
231
231
|
loadErrors.push(e);
|
|
@@ -239,7 +239,7 @@ function requireNative() {
|
|
|
239
239
|
}
|
|
240
240
|
try {
|
|
241
241
|
let binding = require("@oxlint/binding-linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-musleabihf/package.json").version;
|
|
242
|
-
if (bindingPackageVersion !== "1.
|
|
242
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
243
|
return binding;
|
|
244
244
|
} catch (e) {
|
|
245
245
|
loadErrors.push(e);
|
|
@@ -252,7 +252,7 @@ function requireNative() {
|
|
|
252
252
|
}
|
|
253
253
|
try {
|
|
254
254
|
let binding = require("@oxlint/binding-linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-gnueabihf/package.json").version;
|
|
255
|
-
if (bindingPackageVersion !== "1.
|
|
255
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
256
256
|
return binding;
|
|
257
257
|
} catch (e) {
|
|
258
258
|
loadErrors.push(e);
|
|
@@ -266,7 +266,7 @@ function requireNative() {
|
|
|
266
266
|
}
|
|
267
267
|
try {
|
|
268
268
|
let binding = require("@oxlint/binding-linux-loong64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-musl/package.json").version;
|
|
269
|
-
if (bindingPackageVersion !== "1.
|
|
269
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
270
270
|
return binding;
|
|
271
271
|
} catch (e) {
|
|
272
272
|
loadErrors.push(e);
|
|
@@ -279,7 +279,7 @@ function requireNative() {
|
|
|
279
279
|
}
|
|
280
280
|
try {
|
|
281
281
|
let binding = require("@oxlint/binding-linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-gnu/package.json").version;
|
|
282
|
-
if (bindingPackageVersion !== "1.
|
|
282
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
283
283
|
return binding;
|
|
284
284
|
} catch (e) {
|
|
285
285
|
loadErrors.push(e);
|
|
@@ -293,7 +293,7 @@ function requireNative() {
|
|
|
293
293
|
}
|
|
294
294
|
try {
|
|
295
295
|
let binding = require("@oxlint/binding-linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-musl/package.json").version;
|
|
296
|
-
if (bindingPackageVersion !== "1.
|
|
296
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
297
297
|
return binding;
|
|
298
298
|
} catch (e) {
|
|
299
299
|
loadErrors.push(e);
|
|
@@ -306,7 +306,7 @@ function requireNative() {
|
|
|
306
306
|
}
|
|
307
307
|
try {
|
|
308
308
|
let binding = require("@oxlint/binding-linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-gnu/package.json").version;
|
|
309
|
-
if (bindingPackageVersion !== "1.
|
|
309
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
310
310
|
return binding;
|
|
311
311
|
} catch (e) {
|
|
312
312
|
loadErrors.push(e);
|
|
@@ -320,7 +320,7 @@ function requireNative() {
|
|
|
320
320
|
}
|
|
321
321
|
try {
|
|
322
322
|
let binding = require("@oxlint/binding-linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-ppc64-gnu/package.json").version;
|
|
323
|
-
if (bindingPackageVersion !== "1.
|
|
323
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
324
324
|
return binding;
|
|
325
325
|
} catch (e) {
|
|
326
326
|
loadErrors.push(e);
|
|
@@ -333,7 +333,7 @@ function requireNative() {
|
|
|
333
333
|
}
|
|
334
334
|
try {
|
|
335
335
|
let binding = require("@oxlint/binding-linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-s390x-gnu/package.json").version;
|
|
336
|
-
if (bindingPackageVersion !== "1.
|
|
336
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
337
337
|
return binding;
|
|
338
338
|
} catch (e) {
|
|
339
339
|
loadErrors.push(e);
|
|
@@ -347,7 +347,7 @@ function requireNative() {
|
|
|
347
347
|
}
|
|
348
348
|
try {
|
|
349
349
|
let binding = require("@oxlint/binding-openharmony-arm64"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm64/package.json").version;
|
|
350
|
-
if (bindingPackageVersion !== "1.
|
|
350
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
return binding;
|
|
352
352
|
} catch (e) {
|
|
353
353
|
loadErrors.push(e);
|
|
@@ -360,7 +360,7 @@ function requireNative() {
|
|
|
360
360
|
}
|
|
361
361
|
try {
|
|
362
362
|
let binding = require("@oxlint/binding-openharmony-x64"), bindingPackageVersion = require("@oxlint/binding-openharmony-x64/package.json").version;
|
|
363
|
-
if (bindingPackageVersion !== "1.
|
|
363
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
364
364
|
return binding;
|
|
365
365
|
} catch (e) {
|
|
366
366
|
loadErrors.push(e);
|
|
@@ -373,7 +373,7 @@ function requireNative() {
|
|
|
373
373
|
}
|
|
374
374
|
try {
|
|
375
375
|
let binding = require("@oxlint/binding-openharmony-arm"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm/package.json").version;
|
|
376
|
-
if (bindingPackageVersion !== "1.
|
|
376
|
+
if (bindingPackageVersion !== "1.74.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
377
377
|
return binding;
|
|
378
378
|
} catch (e) {
|
|
379
379
|
loadErrors.push(e);
|
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ type AllowKind = "functions" | "arrowFunctions" | "generatorFunctions" | "method
|
|
|
114
114
|
*/
|
|
115
115
|
type NoInnerDeclarationsConfig = "functions" | "both";
|
|
116
116
|
type BlockScopedFunctions = "allow" | "disallow";
|
|
117
|
+
type Namespaces = "allow" | "disallow";
|
|
117
118
|
type NoMagicNumbersNumber = number | string;
|
|
118
119
|
type NoRestrictedImportsConfigEnum = string | RestrictedPath | NoRestrictedImportsConfig;
|
|
119
120
|
type PossiblePaths = string | RestrictedPath;
|
|
@@ -482,7 +483,10 @@ interface Oxlintrc$1 {
|
|
|
482
483
|
*/
|
|
483
484
|
globals?: OxlintGlobals;
|
|
484
485
|
/**
|
|
485
|
-
* Globs to ignore during linting.
|
|
486
|
+
* Globs to ignore during linting. Patterns use gitignore-style matching,
|
|
487
|
+
* rooted at the directory containing the configuration file.
|
|
488
|
+
* Files outside that directory cannot be matched; patterns containing `..`
|
|
489
|
+
* are rejected as a configuration error.
|
|
486
490
|
*/
|
|
487
491
|
ignorePatterns?: string[];
|
|
488
492
|
/**
|
|
@@ -923,7 +927,7 @@ interface DummyRuleMap {
|
|
|
923
927
|
"jsdoc/empty-tags"?: RuleNoConfig | [AllowWarnDeny, EmptyTagsConfig];
|
|
924
928
|
"jsdoc/implements-on-classes"?: RuleNoConfig;
|
|
925
929
|
"jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
|
|
926
|
-
"jsdoc/require-param"?:
|
|
930
|
+
"jsdoc/require-param"?: RuleNoConfig | [AllowWarnDeny, RequireParamConfig];
|
|
927
931
|
"jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
|
|
928
932
|
"jsdoc/require-param-name"?: RuleNoConfig;
|
|
929
933
|
"jsdoc/require-param-type"?: RuleNoConfig | [AllowWarnDeny, RequireParamTypeConfig];
|
|
@@ -2348,6 +2352,56 @@ interface NoDefaultsConfig {
|
|
|
2348
2352
|
*/
|
|
2349
2353
|
noOptionalParamNames?: boolean;
|
|
2350
2354
|
}
|
|
2355
|
+
interface RequireParamConfig {
|
|
2356
|
+
/**
|
|
2357
|
+
* Whether to check constructor methods.
|
|
2358
|
+
*/
|
|
2359
|
+
checkConstructors?: boolean;
|
|
2360
|
+
/**
|
|
2361
|
+
* Whether to check destructured parameters.
|
|
2362
|
+
*/
|
|
2363
|
+
checkDestructured?: boolean;
|
|
2364
|
+
/**
|
|
2365
|
+
* Whether to check destructured parameters when you have code like
|
|
2366
|
+
* `function doSomething({ a, b }) { ... }`. Because there is no named
|
|
2367
|
+
* parameter in this example, when this option is `true` you must
|
|
2368
|
+
* have a `@param` tag that corresponds to `{a, b}`.
|
|
2369
|
+
*/
|
|
2370
|
+
checkDestructuredRoots?: boolean;
|
|
2371
|
+
/**
|
|
2372
|
+
* Whether to check getter methods.
|
|
2373
|
+
*/
|
|
2374
|
+
checkGetters?: boolean;
|
|
2375
|
+
/**
|
|
2376
|
+
* Whether to check rest properties.
|
|
2377
|
+
*/
|
|
2378
|
+
checkRestProperty?: boolean;
|
|
2379
|
+
/**
|
|
2380
|
+
* Whether to check setter methods.
|
|
2381
|
+
*/
|
|
2382
|
+
checkSetters?: boolean;
|
|
2383
|
+
/**
|
|
2384
|
+
* Regex pattern to match types that exempt parameters from checking.
|
|
2385
|
+
*/
|
|
2386
|
+
checkTypesPattern?: string;
|
|
2387
|
+
/**
|
|
2388
|
+
* List of JSDoc tags that exempt functions from `@param` checking.
|
|
2389
|
+
*/
|
|
2390
|
+
exemptedBy?: string[];
|
|
2391
|
+
/**
|
|
2392
|
+
* Set to `true` to ignore reporting when all params are missing. Defaults to `false`.
|
|
2393
|
+
*/
|
|
2394
|
+
ignoreWhenAllParamsMissing?: boolean;
|
|
2395
|
+
/**
|
|
2396
|
+
* Set if you wish TypeScript interfaces to exempt checks for the existence of `@param`'s.
|
|
2397
|
+
* Will check for a type defining the function itself (on a variable declaration) or if there is a single destructured object with a type. Defaults to `false`.
|
|
2398
|
+
*/
|
|
2399
|
+
interfaceExemptsParamsCheck?: boolean;
|
|
2400
|
+
/**
|
|
2401
|
+
* Set to `true` if you wish to expect documentation of properties on objects supplied as default values. Defaults to `false`.
|
|
2402
|
+
*/
|
|
2403
|
+
useDefaultObjectProperties?: boolean;
|
|
2404
|
+
}
|
|
2351
2405
|
interface RequireParamDescriptionConfig {
|
|
2352
2406
|
/**
|
|
2353
2407
|
* The description string to set by default for destructured roots. Defaults to "The root object".
|
|
@@ -3027,6 +3081,10 @@ interface NoInnerDeclarationsOptions {
|
|
|
3027
3081
|
* Controls whether function declarations in nested blocks are allowed in strict mode (ES6+ behavior).
|
|
3028
3082
|
*/
|
|
3029
3083
|
blockScopedFunctions?: BlockScopedFunctions;
|
|
3084
|
+
/**
|
|
3085
|
+
* Controls whether declarations directly inside TypeScript namespace or module bodies are allowed.
|
|
3086
|
+
*/
|
|
3087
|
+
namespaces?: Namespaces;
|
|
3030
3088
|
}
|
|
3031
3089
|
interface NoInvalidRegexpConfig {
|
|
3032
3090
|
/**
|
|
@@ -5794,7 +5852,13 @@ interface TripleSlashReferenceConfig {
|
|
|
5794
5852
|
* What to enforce for `/// <reference lib="..." />` references.
|
|
5795
5853
|
*/
|
|
5796
5854
|
lib?: AlwaysNever;
|
|
5855
|
+
/**
|
|
5856
|
+
* What to enforce for `/// <reference path="..." />` references.
|
|
5857
|
+
*/
|
|
5797
5858
|
path?: PathOption;
|
|
5859
|
+
/**
|
|
5860
|
+
* What to enforce for `/// <reference types="..." />` references.
|
|
5861
|
+
*/
|
|
5798
5862
|
types?: TypesOption;
|
|
5799
5863
|
}
|
|
5800
5864
|
interface UnboundMethodConfig {
|
|
@@ -6330,6 +6394,9 @@ interface NoReservedPropsConfig {
|
|
|
6330
6394
|
vueVersion?: number;
|
|
6331
6395
|
}
|
|
6332
6396
|
interface Options {
|
|
6397
|
+
/**
|
|
6398
|
+
* Prop names to ignore, as regular expression patterns.
|
|
6399
|
+
*/
|
|
6333
6400
|
ignoreProps?: string[];
|
|
6334
6401
|
}
|
|
6335
6402
|
interface RequireDirectExport {
|
package/dist/lint.js
CHANGED
|
@@ -4776,7 +4776,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
|
|
|
4776
4776
|
return deserializeObjectAssignmentTarget(int32[pos >> 2]);
|
|
4777
4777
|
}
|
|
4778
4778
|
function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
4779
|
-
return uint8[pos] ===
|
|
4779
|
+
return uint8[pos] === 255 ? null : deserializeAssignmentTargetMaybeDefault(pos);
|
|
4780
4780
|
}
|
|
4781
4781
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
4782
4782
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -4808,7 +4808,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
|
|
|
4808
4808
|
return deserializeAssignmentTargetPropertyProperty(int32[pos >> 2]);
|
|
4809
4809
|
}
|
|
4810
4810
|
function deserializeOptionExpression(pos) {
|
|
4811
|
-
return uint8[pos] ===
|
|
4811
|
+
return uint8[pos] === 255 ? null : deserializeExpression(pos);
|
|
4812
4812
|
}
|
|
4813
4813
|
function deserializeBoxBlockStatement(pos) {
|
|
4814
4814
|
return deserializeBlockStatement(int32[pos >> 2]);
|
|
@@ -4899,10 +4899,10 @@ function deserializeOptionBoxTSTypeAnnotation(pos) {
|
|
|
4899
4899
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxTSTypeAnnotation(pos);
|
|
4900
4900
|
}
|
|
4901
4901
|
function deserializeOptionStatement(pos) {
|
|
4902
|
-
return uint8[pos] ===
|
|
4902
|
+
return uint8[pos] === 255 ? null : deserializeStatement(pos);
|
|
4903
4903
|
}
|
|
4904
4904
|
function deserializeOptionForStatementInit(pos) {
|
|
4905
|
-
return uint8[pos] ===
|
|
4905
|
+
return uint8[pos] === 255 ? null : deserializeForStatementInit(pos);
|
|
4906
4906
|
}
|
|
4907
4907
|
function deserializeOptionLabelIdentifier(pos) {
|
|
4908
4908
|
return int32[(pos >> 2) + 4] === 0 && int32[(pos >> 2) + 5] === 0 ? null : deserializeLabelIdentifier(pos);
|
|
@@ -4924,7 +4924,7 @@ function deserializeOptionBoxBlockStatement(pos) {
|
|
|
4924
4924
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxBlockStatement(pos);
|
|
4925
4925
|
}
|
|
4926
4926
|
function deserializeOptionCatchParameter(pos) {
|
|
4927
|
-
return uint8[pos + 16] ===
|
|
4927
|
+
return uint8[pos + 16] === 255 ? null : deserializeCatchParameter(pos);
|
|
4928
4928
|
}
|
|
4929
4929
|
function deserializeBoxBindingIdentifier(pos) {
|
|
4930
4930
|
return deserializeBindingIdentifier(int32[pos >> 2]);
|
|
@@ -4952,7 +4952,7 @@ function deserializeOptionBoxBindingRestElement(pos) {
|
|
|
4952
4952
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxBindingRestElement(pos);
|
|
4953
4953
|
}
|
|
4954
4954
|
function deserializeOptionBindingPattern(pos) {
|
|
4955
|
-
return uint8[pos] ===
|
|
4955
|
+
return uint8[pos] === 255 ? null : deserializeBindingPattern(pos);
|
|
4956
4956
|
}
|
|
4957
4957
|
function deserializeVecOptionBindingPattern(pos) {
|
|
4958
4958
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -5006,7 +5006,7 @@ function deserializeOptionBoxExpression(pos) {
|
|
|
5006
5006
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxExpression(pos);
|
|
5007
5007
|
}
|
|
5008
5008
|
function deserializeOptionTSAccessibility(pos) {
|
|
5009
|
-
return uint8[pos] ===
|
|
5009
|
+
return uint8[pos] === 255 ? null : deserializeTSAccessibility(pos);
|
|
5010
5010
|
}
|
|
5011
5011
|
function deserializeVecTSClassImplements(pos) {
|
|
5012
5012
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -5107,7 +5107,7 @@ function deserializeOptionStringLiteral(pos) {
|
|
|
5107
5107
|
return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
|
|
5108
5108
|
}
|
|
5109
5109
|
function deserializeOptionModuleExportName(pos) {
|
|
5110
|
-
return uint8[pos] ===
|
|
5110
|
+
return uint8[pos] === 255 ? null : deserializeModuleExportName(pos);
|
|
5111
5111
|
}
|
|
5112
5112
|
function deserializeF64(pos) {
|
|
5113
5113
|
return float64[pos >> 3];
|
|
@@ -5157,7 +5157,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
|
|
|
5157
5157
|
return deserializeJSXSpreadAttribute(int32[pos >> 2]);
|
|
5158
5158
|
}
|
|
5159
5159
|
function deserializeOptionJSXAttributeValue(pos) {
|
|
5160
|
-
return uint8[pos] ===
|
|
5160
|
+
return uint8[pos] === 255 ? null : deserializeJSXAttributeValue(pos);
|
|
5161
5161
|
}
|
|
5162
5162
|
function deserializeBoxJSXExpressionContainer(pos) {
|
|
5163
5163
|
return deserializeJSXExpressionContainer(int32[pos >> 2]);
|
|
@@ -5310,7 +5310,7 @@ function deserializeBoxTSQualifiedName(pos) {
|
|
|
5310
5310
|
return deserializeTSQualifiedName(int32[pos >> 2]);
|
|
5311
5311
|
}
|
|
5312
5312
|
function deserializeOptionTSType(pos) {
|
|
5313
|
-
return uint8[pos] ===
|
|
5313
|
+
return uint8[pos] === 255 ? null : deserializeTSType(pos);
|
|
5314
5314
|
}
|
|
5315
5315
|
function deserializeVecTSTypeParameter(pos) {
|
|
5316
5316
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -5374,7 +5374,7 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
|
5374
5374
|
return deserializeTSImportTypeQualifiedName(int32[pos >> 2]);
|
|
5375
5375
|
}
|
|
5376
5376
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
5377
|
-
return uint8[pos] ===
|
|
5377
|
+
return uint8[pos] === 255 ? null : deserializeTSMappedTypeModifierOperator(pos);
|
|
5378
5378
|
}
|
|
5379
5379
|
function deserializeBoxTSExternalModuleReference(pos) {
|
|
5380
5380
|
return deserializeTSExternalModuleReference(int32[pos >> 2]);
|
|
@@ -10768,14 +10768,14 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10768
10768
|
* @public
|
|
10769
10769
|
*/
|
|
10770
10770
|
get isTypeVariable() {
|
|
10771
|
-
return this.defs.length === 0
|
|
10771
|
+
return this.defs.length === 0 || this.defs.some((def) => def.isTypeDefinition);
|
|
10772
10772
|
}
|
|
10773
10773
|
/**
|
|
10774
10774
|
* `true` if the variable is valid in a value context, false otherwise
|
|
10775
10775
|
* @public
|
|
10776
10776
|
*/
|
|
10777
10777
|
get isValueVariable() {
|
|
10778
|
-
return this.defs.length === 0
|
|
10778
|
+
return this.defs.length === 0 || this.defs.some((def) => def.isVariableDefinition);
|
|
10779
10779
|
}
|
|
10780
10780
|
};
|
|
10781
10781
|
exports.Variable = Variable;
|
|
@@ -11036,6 +11036,15 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11036
11036
|
}
|
|
11037
11037
|
};
|
|
11038
11038
|
exports.ClassScope = ClassScope;
|
|
11039
|
+
})), require_ClassStaticBlockScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11040
|
+
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ClassStaticBlockScope = void 0;
|
|
11041
|
+
let ScopeBase_1 = require_ScopeBase(), ScopeType_1 = require_ScopeType();
|
|
11042
|
+
var ClassStaticBlockScope = class extends ScopeBase_1.ScopeBase {
|
|
11043
|
+
constructor(scopeManager, upperScope, block) {
|
|
11044
|
+
super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, !1);
|
|
11045
|
+
}
|
|
11046
|
+
};
|
|
11047
|
+
exports.ClassStaticBlockScope = ClassStaticBlockScope;
|
|
11039
11048
|
})), require_ConditionalTypeScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11040
11049
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ConditionalTypeScope = void 0;
|
|
11041
11050
|
let ScopeBase_1 = require_ScopeBase(), ScopeType_1 = require_ScopeType();
|
|
@@ -11204,7 +11213,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11204
11213
|
})), __exportStar = exports && exports.__exportStar || function(m, exports$3) {
|
|
11205
11214
|
for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports$3, p) && __createBinding(exports$3, m, p);
|
|
11206
11215
|
};
|
|
11207
|
-
Object.defineProperty(exports, "__esModule", { value: !0 }), __exportStar(require_BlockScope(), exports), __exportStar(require_CatchScope(), exports), __exportStar(require_ClassFieldInitializerScope(), exports), __exportStar(require_ClassScope(), exports), __exportStar(require_ConditionalTypeScope(), exports), __exportStar(require_ForScope(), exports), __exportStar(require_FunctionExpressionNameScope(), exports), __exportStar(require_FunctionScope(), exports), __exportStar(require_FunctionTypeScope(), exports), __exportStar(require_GlobalScope(), exports), __exportStar(require_MappedTypeScope(), exports), __exportStar(require_ModuleScope(), exports), __exportStar(require_Scope(), exports), __exportStar(require_ScopeType(), exports), __exportStar(require_SwitchScope(), exports), __exportStar(require_TSEnumScope(), exports), __exportStar(require_TSModuleScope(), exports), __exportStar(require_TypeScope(), exports), __exportStar(require_WithScope(), exports);
|
|
11216
|
+
Object.defineProperty(exports, "__esModule", { value: !0 }), __exportStar(require_BlockScope(), exports), __exportStar(require_CatchScope(), exports), __exportStar(require_ClassFieldInitializerScope(), exports), __exportStar(require_ClassScope(), exports), __exportStar(require_ClassStaticBlockScope(), exports), __exportStar(require_ConditionalTypeScope(), exports), __exportStar(require_ForScope(), exports), __exportStar(require_FunctionExpressionNameScope(), exports), __exportStar(require_FunctionScope(), exports), __exportStar(require_FunctionTypeScope(), exports), __exportStar(require_GlobalScope(), exports), __exportStar(require_MappedTypeScope(), exports), __exportStar(require_ModuleScope(), exports), __exportStar(require_Scope(), exports), __exportStar(require_ScopeType(), exports), __exportStar(require_SwitchScope(), exports), __exportStar(require_TSEnumScope(), exports), __exportStar(require_TSModuleScope(), exports), __exportStar(require_TypeScope(), exports), __exportStar(require_WithScope(), exports);
|
|
11208
11217
|
})), require_VisitorBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11209
11218
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.VisitorBase = void 0;
|
|
11210
11219
|
let visitor_keys_1 = require_dist$2();
|
|
@@ -11877,15 +11886,6 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11877
11886
|
return Referencer_1.Referencer;
|
|
11878
11887
|
}
|
|
11879
11888
|
});
|
|
11880
|
-
})), require_ClassStaticBlockScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11881
|
-
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ClassStaticBlockScope = void 0;
|
|
11882
|
-
let ScopeBase_1 = require_ScopeBase(), ScopeType_1 = require_ScopeType();
|
|
11883
|
-
var ClassStaticBlockScope = class extends ScopeBase_1.ScopeBase {
|
|
11884
|
-
constructor(scopeManager, upperScope, block) {
|
|
11885
|
-
super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, !1);
|
|
11886
|
-
}
|
|
11887
|
-
};
|
|
11888
|
-
exports.ClassStaticBlockScope = ClassStaticBlockScope;
|
|
11889
11889
|
})), require_ScopeManager = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11890
11890
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ScopeManager = void 0;
|
|
11891
11891
|
let assert_1 = require_assert$1(), scope_1 = require_scope(), ClassFieldInitializerScope_1 = require_ClassFieldInitializerScope(), ClassStaticBlockScope_1 = require_ClassStaticBlockScope();
|
|
@@ -14109,7 +14109,7 @@ function resetSettings() {
|
|
|
14109
14109
|
}
|
|
14110
14110
|
//#endregion
|
|
14111
14111
|
//#region package.json
|
|
14112
|
-
var version = "1.
|
|
14112
|
+
var version = "1.74.0";
|
|
14113
14113
|
//#endregion
|
|
14114
14114
|
//#region src-js/plugins/context.ts
|
|
14115
14115
|
const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
|
|
@@ -15369,7 +15369,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15369
15369
|
})), require_fast_json_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15370
15370
|
module.exports = function(data, opts) {
|
|
15371
15371
|
opts ||= {}, typeof opts == "function" && (opts = { cmp: opts });
|
|
15372
|
-
var cycles = typeof opts.cycles == "boolean"
|
|
15372
|
+
var cycles = typeof opts.cycles == "boolean" && opts.cycles, cmp = opts.cmp && (function(f) {
|
|
15373
15373
|
return function(node) {
|
|
15374
15374
|
return function(a, b) {
|
|
15375
15375
|
return f({
|
|
@@ -16126,7 +16126,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16126
16126
|
var $opExpr = "'" + $opStr + "'";
|
|
16127
16127
|
out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { ";
|
|
16128
16128
|
} else {
|
|
16129
|
-
$exclIsNumber && $schema === void 0 ? ($exclusive = !0, $errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaExcl, $notOp += "=") : ($exclIsNumber && ($schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema)), $schemaExcl === (
|
|
16129
|
+
$exclIsNumber && $schema === void 0 ? ($exclusive = !0, $errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaExcl, $notOp += "=") : ($exclIsNumber && ($schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema)), $schemaExcl === (!$exclIsNumber || $schemaValue) ? ($exclusive = !0, $errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $notOp += "=") : ($exclusive = !1, $opStr += "="));
|
|
16130
16130
|
var $opExpr = "'" + $opStr + "'";
|
|
16131
16131
|
out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { ";
|
|
16132
16132
|
}
|
|
@@ -17732,7 +17732,7 @@ function conformHookFn(hookFn, hookName) {
|
|
|
17732
17732
|
return hookFn;
|
|
17733
17733
|
}
|
|
17734
17734
|
//#endregion
|
|
17735
|
-
//#region ../../node_modules/.pnpm/eslint@10.
|
|
17735
|
+
//#region ../../node_modules/.pnpm/eslint@10.6.0/node_modules/eslint/lib/shared/assert.js
|
|
17736
17736
|
/**
|
|
17737
17737
|
* @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
|
|
17738
17738
|
* @author Josh Goldberg
|
package/dist/plugins-dev.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-any.d.ts
|
|
2
2
|
/**
|
|
3
3
|
Returns a boolean for whether the given type is `any`.
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ const anyA = get(anyObject, 'a');
|
|
|
29
29
|
*/
|
|
30
30
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
32
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
33
33
|
/**
|
|
34
34
|
Returns a boolean for whether the given key is an optional key of type.
|
|
35
35
|
|
|
@@ -72,7 +72,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
72
72
|
*/
|
|
73
73
|
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
74
74
|
//#endregion
|
|
75
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
75
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
76
76
|
/**
|
|
77
77
|
Extract all optional keys from the given type.
|
|
78
78
|
|
|
@@ -107,10 +107,10 @@ const update2: UpdateOperation<User> = {
|
|
|
107
107
|
@category Utilities
|
|
108
108
|
*/
|
|
109
109
|
type OptionalKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
110
|
-
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
111
|
-
: never;
|
|
110
|
+
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never; }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
111
|
+
: never; // Should never happen
|
|
112
112
|
//#endregion
|
|
113
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
113
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
114
114
|
/**
|
|
115
115
|
Extract all required keys from the given type.
|
|
116
116
|
|
|
@@ -142,9 +142,9 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
142
142
|
@category Utilities
|
|
143
143
|
*/
|
|
144
144
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
145
|
-
? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
|
|
145
|
+
? Exclude<keyof Type, OptionalKeysOf<Type>> : never; // Should never happen
|
|
146
146
|
//#endregion
|
|
147
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
147
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-never.d.ts
|
|
148
148
|
/**
|
|
149
149
|
Returns a boolean for whether the given type is `never`.
|
|
150
150
|
|
|
@@ -200,7 +200,7 @@ type B = IsTrueFixed<never>;
|
|
|
200
200
|
*/
|
|
201
201
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
202
202
|
//#endregion
|
|
203
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
203
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/if.d.ts
|
|
204
204
|
/**
|
|
205
205
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
206
206
|
|
|
@@ -295,22 +295,22 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
295
295
|
*/
|
|
296
296
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
297
297
|
//#endregion
|
|
298
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
298
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/internal/type.d.ts
|
|
299
299
|
/**
|
|
300
300
|
An if-else-like type that resolves depending on whether the given type is `any` or `never`.
|
|
301
301
|
|
|
302
302
|
@example
|
|
303
303
|
```
|
|
304
|
-
// When `T` is
|
|
305
|
-
type A = IfNotAnyOrNever<string, 'VALID'
|
|
304
|
+
// When `T` is neither `any` nor `never` (like `string`) => Returns `IfNot` branch
|
|
305
|
+
type A = IfNotAnyOrNever<string, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
306
306
|
//=> 'VALID'
|
|
307
307
|
|
|
308
308
|
// When `T` is `any` => Returns `IfAny` branch
|
|
309
|
-
type B = IfNotAnyOrNever<any, 'VALID'
|
|
309
|
+
type B = IfNotAnyOrNever<any, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
310
310
|
//=> 'IS_ANY'
|
|
311
311
|
|
|
312
312
|
// When `T` is `never` => Returns `IfNever` branch
|
|
313
|
-
type C = IfNotAnyOrNever<never, 'VALID'
|
|
313
|
+
type C = IfNotAnyOrNever<never, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
314
314
|
//=> 'IS_NEVER'
|
|
315
315
|
```
|
|
316
316
|
|
|
@@ -323,7 +323,7 @@ import type {StringRepeat} from 'type-fest';
|
|
|
323
323
|
type NineHundredNinetyNineSpaces = StringRepeat<' ', 999>;
|
|
324
324
|
|
|
325
325
|
// The following implementation is not tail recursive
|
|
326
|
-
type TrimLeft<S extends string> = IfNotAnyOrNever<S, S extends ` ${infer R}` ? TrimLeft<R> : S>;
|
|
326
|
+
type TrimLeft<S extends string> = IfNotAnyOrNever<S, {ifNot: S extends ` ${infer R}` ? TrimLeft<R> : S}>;
|
|
327
327
|
|
|
328
328
|
// Hence, instantiations with long strings will fail
|
|
329
329
|
// @ts-expect-error
|
|
@@ -332,7 +332,7 @@ type T1 = TrimLeft<NineHundredNinetyNineSpaces>;
|
|
|
332
332
|
// Error: Type instantiation is excessively deep and possibly infinite.
|
|
333
333
|
|
|
334
334
|
// To fix this, move the recursion into a helper type
|
|
335
|
-
type TrimLeftOptimised<S extends string> = IfNotAnyOrNever<S, _TrimLeftOptimised<S
|
|
335
|
+
type TrimLeftOptimised<S extends string> = IfNotAnyOrNever<S, {ifNot: _TrimLeftOptimised<S>}>;
|
|
336
336
|
|
|
337
337
|
type _TrimLeftOptimised<S extends string> = S extends ` ${infer R}` ? _TrimLeftOptimised<R> : S;
|
|
338
338
|
|
|
@@ -340,9 +340,13 @@ type T2 = TrimLeftOptimised<NineHundredNinetyNineSpaces>;
|
|
|
340
340
|
//=> ''
|
|
341
341
|
```
|
|
342
342
|
*/
|
|
343
|
-
type IfNotAnyOrNever<T,
|
|
343
|
+
type IfNotAnyOrNever<T, Cases extends {
|
|
344
|
+
ifNot: unknown;
|
|
345
|
+
ifAny?: unknown;
|
|
346
|
+
ifNever?: unknown;
|
|
347
|
+
}> = IsAny<T> extends true ? 'ifAny' extends keyof Cases ? Cases['ifAny'] : any : IsNever<T> extends true ? 'ifNever' extends keyof Cases ? Cases['ifNever'] : never : Cases['ifNot'];
|
|
344
348
|
//#endregion
|
|
345
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
349
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/simplify.d.ts
|
|
346
350
|
/**
|
|
347
351
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
348
352
|
|
|
@@ -401,9 +405,9 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
401
405
|
@see {@link SimplifyDeep}
|
|
402
406
|
@category Object
|
|
403
407
|
*/
|
|
404
|
-
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
408
|
+
type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
405
409
|
//#endregion
|
|
406
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
410
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-equal.d.ts
|
|
407
411
|
/**
|
|
408
412
|
Returns a boolean for whether the two given types are equal.
|
|
409
413
|
|
|
@@ -434,7 +438,7 @@ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false
|
|
|
434
438
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
435
439
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
436
440
|
//#endregion
|
|
437
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
441
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
438
442
|
/**
|
|
439
443
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
440
444
|
|
|
@@ -526,9 +530,9 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
526
530
|
@see {@link PickIndexSignature}
|
|
527
531
|
@category Object
|
|
528
532
|
*/
|
|
529
|
-
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
533
|
+
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType]; };
|
|
530
534
|
//#endregion
|
|
531
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
535
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
532
536
|
/**
|
|
533
537
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
534
538
|
|
|
@@ -574,11 +578,11 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
574
578
|
@see {@link OmitIndexSignature}
|
|
575
579
|
@category Object
|
|
576
580
|
*/
|
|
577
|
-
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
581
|
+
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType]; };
|
|
578
582
|
//#endregion
|
|
579
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
583
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/merge.d.ts
|
|
580
584
|
// Merges two objects without worrying about index signatures.
|
|
581
|
-
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source>;
|
|
585
|
+
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>;
|
|
582
586
|
/**
|
|
583
587
|
Merge two types into a new type. Keys of the second type overrides keys of the first type.
|
|
584
588
|
|
|
@@ -642,13 +646,12 @@ Note: If you want a merge type that more accurately reflects the runtime behavio
|
|
|
642
646
|
@category Object
|
|
643
647
|
*/
|
|
644
648
|
type Merge<Destination, Source> = Destination extends unknown // For distributing `Destination`
|
|
645
|
-
? Source extends unknown // For distributing `Source`
|
|
646
|
-
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
647
|
-
: never;
|
|
648
|
-
// Should never happen
|
|
649
|
+
? Source extends unknown // For distributing `Source`
|
|
650
|
+
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
651
|
+
: never; // Should never happen
|
|
649
652
|
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
650
653
|
//#endregion
|
|
651
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
654
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/internal/object.d.ts
|
|
652
655
|
/**
|
|
653
656
|
Merges user specified options with default options.
|
|
654
657
|
|
|
@@ -701,38 +704,11 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
|
|
|
701
704
|
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
702
705
|
```
|
|
703
706
|
*/
|
|
704
|
-
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
|
|
705
|
-
? Result : never;
|
|
706
|
-
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key] }>>>;
|
|
707
|
-
/**
|
|
708
|
-
Collapses literal types in a union into their corresponding primitive types, when possible. For example, `CollapseLiterals<'foo' | 'bar' | (string & {})>` returns `string`.
|
|
709
|
-
|
|
710
|
-
Note: This doesn't collapse literals within tagged types. For example, `CollapseLiterals<Tagged<'foo' | (string & {}), 'Tag'>>` returns `("foo" & Tag<"Tag", never>) | (string & Tag<"Tag", never>)` and not `string & Tag<"Tag", never>`.
|
|
711
|
-
|
|
712
|
-
Use-case: For collapsing unions created using {@link LiteralUnion}.
|
|
713
|
-
|
|
714
|
-
@example
|
|
715
|
-
```
|
|
716
|
-
import type {LiteralUnion} from 'type-fest';
|
|
717
|
-
|
|
718
|
-
type A = CollapseLiterals<'foo' | 'bar' | (string & {})>;
|
|
719
|
-
//=> string
|
|
720
|
-
|
|
721
|
-
type B = CollapseLiterals<LiteralUnion<1 | 2 | 3, number>>;
|
|
722
|
-
//=> number
|
|
723
|
-
|
|
724
|
-
type C = CollapseLiterals<LiteralUnion<'onClick' | 'onChange', `on${string}`>>;
|
|
725
|
-
//=> `on${string}`
|
|
726
|
-
|
|
727
|
-
type D = CollapseLiterals<'click' | 'change' | (`on${string}` & {})>;
|
|
728
|
-
//=> 'click' | 'change' | `on${string}`
|
|
729
|
-
|
|
730
|
-
type E = CollapseLiterals<LiteralUnion<'foo' | 'bar', string> | null | undefined>;
|
|
731
|
-
//=> string | null | undefined
|
|
732
|
-
```
|
|
733
|
-
*/
|
|
707
|
+
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends (infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
|
|
708
|
+
) ? Result : never;
|
|
709
|
+
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key]; }>>>;
|
|
734
710
|
//#endregion
|
|
735
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
711
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/except.d.ts
|
|
736
712
|
/**
|
|
737
713
|
Filter out keys from an object.
|
|
738
714
|
|
|
@@ -763,10 +739,12 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
763
739
|
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
764
740
|
type ExceptOptions = {
|
|
765
741
|
/**
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
742
|
+
Disallow assigning non-specified properties.
|
|
743
|
+
|
|
744
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
745
|
+
|
|
746
|
+
@default false
|
|
747
|
+
*/
|
|
770
748
|
requireExactProps?: boolean;
|
|
771
749
|
};
|
|
772
750
|
type DefaultExceptOptions = {
|
|
@@ -828,9 +806,9 @@ type PostPayloadFixed = Except<UserData, 'email'>;
|
|
|
828
806
|
@category Object
|
|
829
807
|
*/
|
|
830
808
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
831
|
-
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
809
|
+
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
832
810
|
//#endregion
|
|
833
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
811
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/require-at-least-one.d.ts
|
|
834
812
|
/**
|
|
835
813
|
Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
|
|
836
814
|
|
|
@@ -852,11 +830,14 @@ const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
|
|
|
852
830
|
|
|
853
831
|
@category Object
|
|
854
832
|
*/
|
|
855
|
-
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType,
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
833
|
+
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, {
|
|
834
|
+
ifNot: If<IsNever<KeysType>, never, _RequireAtLeastOne<ObjectType, If<IsAny<KeysType>, keyof ObjectType, KeysType>>>;
|
|
835
|
+
}>;
|
|
836
|
+
type _RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [
|
|
837
|
+
// For each `Key` in `KeysType` make a mapped type:
|
|
838
|
+
Key in KeysType]-?: Required<Pick<ObjectType, Key>> // 1. Make `Key`'s type required
|
|
839
|
+
& Partial<Pick<ObjectType, Exclude<KeysType, Key>>> // 2. Make all other keys in `KeysType` optional
|
|
840
|
+
; }[KeysType] & Except<ObjectType, KeysType>; // 3. Add the remaining keys not in `KeysType`
|
|
860
841
|
//#endregion
|
|
861
842
|
//#region src-js/plugins/tokens.d.ts
|
|
862
843
|
/**
|
|
@@ -1247,7 +1228,7 @@ interface StrictVisitorObject {
|
|
|
1247
1228
|
TSUnionType?: (node: TSUnionType) => void;
|
|
1248
1229
|
"TSUnionType:exit"?: (node: TSUnionType) => void;
|
|
1249
1230
|
}
|
|
1250
|
-
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined } & Record<string, BivarianceHackHandler<(node: Node) => void> | undefined>;
|
|
1231
|
+
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined; } & Record<string, BivarianceHackHandler<(node: Node) => void> | undefined>;
|
|
1251
1232
|
//#endregion
|
|
1252
1233
|
//#region src-js/plugins/types.d.ts
|
|
1253
1234
|
type BeforeHook = () => boolean | void;
|
|
@@ -2675,9 +2656,6 @@ interface Definition {
|
|
|
2675
2656
|
}
|
|
2676
2657
|
type DefinitionType = "CatchClause" | "ClassName" | "FunctionName" | "ImplicitGlobalVariable" | "ImportBinding" | "Parameter" | "Variable";
|
|
2677
2658
|
type Identifier = IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName;
|
|
2678
|
-
/**
|
|
2679
|
-
* Discard TS-ESLint `ScopeManager`, to free memory.
|
|
2680
|
-
*/
|
|
2681
2659
|
/**
|
|
2682
2660
|
* Determine whether the given identifier node is a reference to a global variable.
|
|
2683
2661
|
* @param node - `Identifier` node to check.
|
|
@@ -3084,12 +3062,12 @@ type Envs$1 = Record<string, true>;
|
|
|
3084
3062
|
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
|
3085
3063
|
*/
|
|
3086
3064
|
type JSONSchema4TypeName = "string" //
|
|
3087
|
-
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
3065
|
+
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
3088
3066
|
/**
|
|
3089
3067
|
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
|
3090
3068
|
*/
|
|
3091
3069
|
type JSONSchema4Type = string //
|
|
3092
|
-
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
3070
|
+
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
3093
3071
|
// Workaround for infinite type recursion
|
|
3094
3072
|
interface JSONSchema4Object {
|
|
3095
3073
|
[key: string]: JSONSchema4Type;
|
|
@@ -3357,9 +3335,6 @@ interface SuggestionBase {
|
|
|
3357
3335
|
data?: DiagnosticData | null | undefined;
|
|
3358
3336
|
fix: FixFn;
|
|
3359
3337
|
}
|
|
3360
|
-
/**
|
|
3361
|
-
* Suggested fix in form sent to Rust.
|
|
3362
|
-
*/
|
|
3363
3338
|
//#endregion
|
|
3364
3339
|
//#region src-js/plugins/source_code.d.ts
|
|
3365
3340
|
declare const SOURCE_CODE: Readonly<{
|
|
@@ -4100,12 +4075,6 @@ interface LanguageOptions {
|
|
|
4100
4075
|
env?: Envs;
|
|
4101
4076
|
parserOptions?: ParserOptions;
|
|
4102
4077
|
}
|
|
4103
|
-
/**
|
|
4104
|
-
* Language options config, with `parser` and `ecmaVersion` properties, and extended `parserOptions`.
|
|
4105
|
-
* These properties should not be present in `languageOptions` config,
|
|
4106
|
-
* but could be if test cases are ported from ESLint.
|
|
4107
|
-
* For internal use only.
|
|
4108
|
-
*/
|
|
4109
4078
|
/**
|
|
4110
4079
|
* Source type.
|
|
4111
4080
|
*
|
|
@@ -4143,12 +4112,6 @@ interface ParserOptions {
|
|
|
4143
4112
|
*/
|
|
4144
4113
|
ignoreNonFatalErrors?: boolean;
|
|
4145
4114
|
}
|
|
4146
|
-
/**
|
|
4147
|
-
* Parser options config, with extended `ecmaFeatures`.
|
|
4148
|
-
* These properties should not be present in `languageOptions` config,
|
|
4149
|
-
* but could be if test cases are ported from ESLint.
|
|
4150
|
-
* For internal use only.
|
|
4151
|
-
*/
|
|
4152
4115
|
/**
|
|
4153
4116
|
* ECMA features config.
|
|
4154
4117
|
*/
|
|
@@ -4160,12 +4123,6 @@ interface EcmaFeatures {
|
|
|
4160
4123
|
*/
|
|
4161
4124
|
jsx?: boolean;
|
|
4162
4125
|
}
|
|
4163
|
-
/**
|
|
4164
|
-
* ECMA features config, with `globalReturn` and `impliedStrict` properties.
|
|
4165
|
-
* These properties should not be present in `ecmaFeatures` config,
|
|
4166
|
-
* but could be if test cases are ported from ESLint.
|
|
4167
|
-
* For internal use only.
|
|
4168
|
-
*/
|
|
4169
4126
|
/**
|
|
4170
4127
|
* Parser language.
|
|
4171
4128
|
*/
|
package/dist/plugins-dev.js
CHANGED
|
@@ -10,7 +10,7 @@ var import_json_stable_stringify_without_jsonify = /* @__PURE__ */ __toESM((/* @
|
|
|
10
10
|
opts ||= {}, typeof opts == "function" && (opts = { cmp: opts });
|
|
11
11
|
var space = opts.space || "";
|
|
12
12
|
typeof space == "number" && (space = Array(space + 1).join(" "));
|
|
13
|
-
var cycles = typeof opts.cycles == "boolean"
|
|
13
|
+
var cycles = typeof opts.cycles == "boolean" && opts.cycles, replacer = opts.replacer || function(key, value) {
|
|
14
14
|
return value;
|
|
15
15
|
}, cmp = opts.cmp && (function(f) {
|
|
16
16
|
return function(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.74.0",
|
|
4
4
|
"description": "Linter for the JavaScript Oxidation Compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -87,24 +87,24 @@
|
|
|
87
87
|
},
|
|
88
88
|
"preferUnplugged": true,
|
|
89
89
|
"optionalDependencies": {
|
|
90
|
-
"@oxlint/binding-darwin-arm64": "1.
|
|
91
|
-
"@oxlint/binding-android-arm64": "1.
|
|
92
|
-
"@oxlint/binding-win32-arm64-msvc": "1.
|
|
93
|
-
"@oxlint/binding-linux-arm64-gnu": "1.
|
|
94
|
-
"@oxlint/binding-linux-arm64-musl": "1.
|
|
95
|
-
"@oxlint/binding-openharmony-arm64": "1.
|
|
96
|
-
"@oxlint/binding-android-arm-eabi": "1.
|
|
97
|
-
"@oxlint/binding-linux-arm-gnueabihf": "1.
|
|
98
|
-
"@oxlint/binding-linux-arm-musleabihf": "1.
|
|
99
|
-
"@oxlint/binding-win32-ia32-msvc": "1.
|
|
100
|
-
"@oxlint/binding-linux-ppc64-gnu": "1.
|
|
101
|
-
"@oxlint/binding-linux-riscv64-gnu": "1.
|
|
102
|
-
"@oxlint/binding-linux-riscv64-musl": "1.
|
|
103
|
-
"@oxlint/binding-linux-s390x-gnu": "1.
|
|
104
|
-
"@oxlint/binding-darwin-x64": "1.
|
|
105
|
-
"@oxlint/binding-win32-x64-msvc": "1.
|
|
106
|
-
"@oxlint/binding-freebsd-x64": "1.
|
|
107
|
-
"@oxlint/binding-linux-x64-gnu": "1.
|
|
108
|
-
"@oxlint/binding-linux-x64-musl": "1.
|
|
90
|
+
"@oxlint/binding-darwin-arm64": "1.74.0",
|
|
91
|
+
"@oxlint/binding-android-arm64": "1.74.0",
|
|
92
|
+
"@oxlint/binding-win32-arm64-msvc": "1.74.0",
|
|
93
|
+
"@oxlint/binding-linux-arm64-gnu": "1.74.0",
|
|
94
|
+
"@oxlint/binding-linux-arm64-musl": "1.74.0",
|
|
95
|
+
"@oxlint/binding-openharmony-arm64": "1.74.0",
|
|
96
|
+
"@oxlint/binding-android-arm-eabi": "1.74.0",
|
|
97
|
+
"@oxlint/binding-linux-arm-gnueabihf": "1.74.0",
|
|
98
|
+
"@oxlint/binding-linux-arm-musleabihf": "1.74.0",
|
|
99
|
+
"@oxlint/binding-win32-ia32-msvc": "1.74.0",
|
|
100
|
+
"@oxlint/binding-linux-ppc64-gnu": "1.74.0",
|
|
101
|
+
"@oxlint/binding-linux-riscv64-gnu": "1.74.0",
|
|
102
|
+
"@oxlint/binding-linux-riscv64-musl": "1.74.0",
|
|
103
|
+
"@oxlint/binding-linux-s390x-gnu": "1.74.0",
|
|
104
|
+
"@oxlint/binding-darwin-x64": "1.74.0",
|
|
105
|
+
"@oxlint/binding-win32-x64-msvc": "1.74.0",
|
|
106
|
+
"@oxlint/binding-freebsd-x64": "1.74.0",
|
|
107
|
+
"@oxlint/binding-linux-x64-gnu": "1.74.0",
|
|
108
|
+
"@oxlint/binding-linux-x64-musl": "1.74.0"
|
|
109
109
|
}
|
|
110
110
|
}
|