oxlint 1.69.0 → 1.71.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 +6332 -1305
- package/dist/bindings.js +37 -31
- package/dist/index.d.ts +1763 -344
- package/dist/js_config.js +1 -1
- package/dist/lint.js +27 -13
- package/dist/plugins-dev.js +3 -3
- package/package.json +20 -20
package/dist/js_config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { t as getErrorMessage$1 } from "./utils.js";
|
|
|
2
2
|
import { extname } from "node:path";
|
|
3
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
4
|
//#region ../shared/src-js/utils.ts
|
|
5
|
-
const ArrayIsArray$1 = Array.isArray, isObject$1 = (v) => typeof v == "object" && !!v && !ArrayIsArray$1(v), TS_MODULE_EXTENSIONS = new Set([
|
|
5
|
+
const ArrayIsArray$1 = Array.isArray, isObject$1 = (v) => typeof v == "object" && !!v && !ArrayIsArray$1(v), TS_MODULE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
6
6
|
".ts",
|
|
7
7
|
".mts",
|
|
8
8
|
".cts"
|
package/dist/lint.js
CHANGED
|
@@ -502,7 +502,7 @@ function traverse(node) {
|
|
|
502
502
|
}
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src-js/utils/typed_arrays.ts
|
|
505
|
-
const EMPTY_UINT8_ARRAY = new Uint8Array(), EMPTY_INT32_ARRAY = new Int32Array(), FunctionPrototypeCall$1 = Function.prototype.call, ObjectPrototype__defineGetter__$1 = Object.prototype.__defineGetter__, MathMax$4 = Math.max, StringFromCodePoint$1 = String.fromCodePoint;
|
|
505
|
+
const EMPTY_UINT8_ARRAY = /* @__PURE__ */ new Uint8Array(), EMPTY_INT32_ARRAY = /* @__PURE__ */ new Int32Array(), FunctionPrototypeCall$1 = Function.prototype.call, ObjectPrototype__defineGetter__$1 = Object.prototype.__defineGetter__, MathMax$4 = Math.max, StringFromCodePoint$1 = String.fromCodePoint;
|
|
506
506
|
let tokens = null, tokensUint8 = null, tokensInt32 = null, tokensLen = 0, allTokensDeserialized = !1;
|
|
507
507
|
const cachedTokens = [];
|
|
508
508
|
let previousTokens = [];
|
|
@@ -5823,7 +5823,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5823
5823
|
/**
|
|
5824
5824
|
* @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
|
|
5825
5825
|
*/
|
|
5826
|
-
let KEY_BLACKLIST = new Set([
|
|
5826
|
+
let KEY_BLACKLIST = /* @__PURE__ */ new Set([
|
|
5827
5827
|
"parent",
|
|
5828
5828
|
"leadingComments",
|
|
5829
5829
|
"trailingComments"
|
|
@@ -10431,7 +10431,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10431
10431
|
})), require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10432
10432
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.lib = void 0;
|
|
10433
10433
|
let decorators_1 = require_decorators(), decorators_legacy_1 = require_decorators_legacy(), dom_1 = require_dom(), dom_asynciterable_1 = require_dom_asynciterable(), dom_iterable_1 = require_dom_iterable(), es5_1 = require_es5(), es6_1 = require_es6(), es7_1 = require_es7(), es2015_1 = require_es2015(), es2015_collection_1 = require_es2015_collection(), es2015_core_1 = require_es2015_core(), es2015_generator_1 = require_es2015_generator(), es2015_iterable_1 = require_es2015_iterable(), es2015_promise_1 = require_es2015_promise(), es2015_proxy_1 = require_es2015_proxy(), es2015_reflect_1 = require_es2015_reflect(), es2015_symbol_1 = require_es2015_symbol(), es2015_symbol_wellknown_1 = require_es2015_symbol_wellknown(), es2016_1 = require_es2016(), es2016_array_include_1 = require_es2016_array_include(), es2016_full_1 = require_es2016_full(), es2016_intl_1 = require_es2016_intl(), es2017_1 = require_es2017(), es2017_arraybuffer_1 = require_es2017_arraybuffer(), es2017_date_1 = require_es2017_date(), es2017_full_1 = require_es2017_full(), es2017_intl_1 = require_es2017_intl(), es2017_object_1 = require_es2017_object(), es2017_sharedmemory_1 = require_es2017_sharedmemory(), es2017_string_1 = require_es2017_string(), es2017_typedarrays_1 = require_es2017_typedarrays(), es2018_1 = require_es2018(), es2018_asyncgenerator_1 = require_es2018_asyncgenerator(), es2018_asynciterable_1 = require_es2018_asynciterable(), es2018_full_1 = require_es2018_full(), es2018_intl_1 = require_es2018_intl(), es2018_promise_1 = require_es2018_promise(), es2018_regexp_1 = require_es2018_regexp(), es2019_1 = require_es2019(), es2019_array_1 = require_es2019_array(), es2019_full_1 = require_es2019_full(), es2019_intl_1 = require_es2019_intl(), es2019_object_1 = require_es2019_object(), es2019_string_1 = require_es2019_string(), es2019_symbol_1 = require_es2019_symbol(), es2020_1 = require_es2020(), es2020_bigint_1 = require_es2020_bigint(), es2020_date_1 = require_es2020_date(), es2020_full_1 = require_es2020_full(), es2020_intl_1 = require_es2020_intl(), es2020_number_1 = require_es2020_number(), es2020_promise_1 = require_es2020_promise(), es2020_sharedmemory_1 = require_es2020_sharedmemory(), es2020_string_1 = require_es2020_string(), es2020_symbol_wellknown_1 = require_es2020_symbol_wellknown(), es2021_1 = require_es2021(), es2021_full_1 = require_es2021_full(), es2021_intl_1 = require_es2021_intl(), es2021_promise_1 = require_es2021_promise(), es2021_string_1 = require_es2021_string(), es2021_weakref_1 = require_es2021_weakref(), es2022_1 = require_es2022(), es2022_array_1 = require_es2022_array(), es2022_error_1 = require_es2022_error(), es2022_full_1 = require_es2022_full(), es2022_intl_1 = require_es2022_intl(), es2022_object_1 = require_es2022_object(), es2022_regexp_1 = require_es2022_regexp(), es2022_string_1 = require_es2022_string(), es2023_1 = require_es2023(), es2023_array_1 = require_es2023_array(), es2023_collection_1 = require_es2023_collection(), es2023_full_1 = require_es2023_full(), es2023_intl_1 = require_es2023_intl(), es2024_1 = require_es2024(), es2024_arraybuffer_1 = require_es2024_arraybuffer(), es2024_collection_1 = require_es2024_collection(), es2024_full_1 = require_es2024_full(), es2024_object_1 = require_es2024_object(), es2024_promise_1 = require_es2024_promise(), es2024_regexp_1 = require_es2024_regexp(), es2024_sharedmemory_1 = require_es2024_sharedmemory(), es2024_string_1 = require_es2024_string(), es2025_1 = require_es2025(), es2025_collection_1 = require_es2025_collection(), es2025_float16_1 = require_es2025_float16(), es2025_full_1 = require_es2025_full(), es2025_intl_1 = require_es2025_intl(), es2025_iterator_1 = require_es2025_iterator(), es2025_promise_1 = require_es2025_promise(), es2025_regexp_1 = require_es2025_regexp(), esnext_1 = require_esnext(), esnext_array_1 = require_esnext_array(), esnext_asynciterable_1 = require_esnext_asynciterable(), esnext_bigint_1 = require_esnext_bigint(), esnext_collection_1 = require_esnext_collection(), esnext_date_1 = require_esnext_date(), esnext_decorators_1 = require_esnext_decorators(), esnext_disposable_1 = require_esnext_disposable(), esnext_error_1 = require_esnext_error(), esnext_float16_1 = require_esnext_float16(), esnext_full_1 = require_esnext_full(), esnext_intl_1 = require_esnext_intl(), esnext_iterator_1 = require_esnext_iterator(), esnext_object_1 = require_esnext_object(), esnext_promise_1 = require_esnext_promise(), esnext_regexp_1 = require_esnext_regexp(), esnext_sharedmemory_1 = require_esnext_sharedmemory(), esnext_string_1 = require_esnext_string(), esnext_symbol_1 = require_esnext_symbol(), esnext_temporal_1 = require_esnext_temporal(), esnext_typedarrays_1 = require_esnext_typedarrays(), esnext_weakref_1 = require_esnext_weakref(), lib_1 = require_lib$1(), scripthost_1 = require_scripthost(), webworker_1 = require_webworker(), webworker_asynciterable_1 = require_webworker_asynciterable(), webworker_importscripts_1 = require_webworker_importscripts(), webworker_iterable_1 = require_webworker_iterable();
|
|
10434
|
-
exports.lib = new Map([
|
|
10434
|
+
exports.lib = /* @__PURE__ */ new Map([
|
|
10435
10435
|
["es5", es5_1.es5],
|
|
10436
10436
|
["es6", es6_1.es6],
|
|
10437
10437
|
["es2015", es2015_1.es2015],
|
|
@@ -10844,7 +10844,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10844
10844
|
let scopes = scopeManager.nodeToScope.get(scope.block);
|
|
10845
10845
|
scopes ? scopes.push(scope) : scopeManager.nodeToScope.set(scope.block, [scope]);
|
|
10846
10846
|
}
|
|
10847
|
-
let generator = (0, ID_1.createIdGenerator)(), VARIABLE_SCOPE_TYPES = new Set([
|
|
10847
|
+
let generator = (0, ID_1.createIdGenerator)(), VARIABLE_SCOPE_TYPES = /* @__PURE__ */ new Set([
|
|
10848
10848
|
ScopeType_1.ScopeType.classFieldInitializer,
|
|
10849
10849
|
ScopeType_1.ScopeType.classStaticBlock,
|
|
10850
10850
|
ScopeType_1.ScopeType.function,
|
|
@@ -11227,7 +11227,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11227
11227
|
*/
|
|
11228
11228
|
visitChildren(node, excludeArr = []) {
|
|
11229
11229
|
if (node?.type == null) return;
|
|
11230
|
-
let exclude = new Set([...excludeArr, "parent"]), children = this.#childVisitorKeys[node.type] ?? Object.keys(node);
|
|
11230
|
+
let exclude = /* @__PURE__ */ new Set([...excludeArr, "parent"]), children = this.#childVisitorKeys[node.type] ?? Object.keys(node);
|
|
11231
11231
|
for (let key of children) {
|
|
11232
11232
|
if (exclude.has(key)) continue;
|
|
11233
11233
|
let child = node[key];
|
|
@@ -12144,7 +12144,7 @@ function resetGlobals() {
|
|
|
12144
12144
|
/**
|
|
12145
12145
|
* `Map` of variables defined by environments.
|
|
12146
12146
|
*/
|
|
12147
|
-
const ENVS = new Map([
|
|
12147
|
+
const ENVS = /* @__PURE__ */ new Map([
|
|
12148
12148
|
["amd", {
|
|
12149
12149
|
readonly: ["define", "require"],
|
|
12150
12150
|
writable: []
|
|
@@ -14109,7 +14109,7 @@ function resetSettings() {
|
|
|
14109
14109
|
}
|
|
14110
14110
|
//#endregion
|
|
14111
14111
|
//#region package.json
|
|
14112
|
-
var version = "1.
|
|
14112
|
+
var version = "1.71.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;
|
|
@@ -17658,12 +17658,15 @@ function getPluginName(plugin, pluginName, pluginNameIsAlias) {
|
|
|
17658
17658
|
throw Error("Plugin must either define `meta.name`, be loaded from an NPM package with a `name` field in `package.json`, or be given an alias in config");
|
|
17659
17659
|
}
|
|
17660
17660
|
/**
|
|
17661
|
-
* Normalize plugin name by stripping common
|
|
17661
|
+
* Normalize plugin name by stripping common plugin prefixes and suffixes.
|
|
17662
17662
|
*
|
|
17663
|
-
* This handles the various naming conventions used in the ESLint
|
|
17663
|
+
* This handles the various naming conventions used in the ESLint and Oxlint plugin ecosystems:
|
|
17664
17664
|
* - `eslint-plugin-foo` -> `foo`
|
|
17665
|
+
* - `oxlint-plugin-foo` -> `foo`
|
|
17665
17666
|
* - `@scope/eslint-plugin` -> `@scope`
|
|
17666
17667
|
* - `@scope/eslint-plugin-foo` -> `@scope/foo`
|
|
17668
|
+
* - `@scope/oxlint-plugin` -> `@scope`
|
|
17669
|
+
* - `@scope/oxlint-plugin-foo` -> `@scope/foo`
|
|
17667
17670
|
*
|
|
17668
17671
|
* This logic is replicated on Rust side in `normalize_plugin_name` in `crates/oxc_linter/src/config/plugins.rs`.
|
|
17669
17672
|
* The 2 implementations must be kept in sync.
|
|
@@ -17672,10 +17675,21 @@ function getPluginName(plugin, pluginName, pluginNameIsAlias) {
|
|
|
17672
17675
|
* @returns Normalized plugin name
|
|
17673
17676
|
*/
|
|
17674
17677
|
function normalizePluginName(name) {
|
|
17675
|
-
let slashIndex = name.indexOf("/");
|
|
17676
|
-
if (slashIndex === -1)
|
|
17678
|
+
let pluginPrefixes = ["eslint-plugin", "oxlint-plugin"], slashIndex = name.indexOf("/");
|
|
17679
|
+
if (slashIndex === -1) {
|
|
17680
|
+
for (let prefix of pluginPrefixes) {
|
|
17681
|
+
let prefixWithDash = `${prefix}-`;
|
|
17682
|
+
if (name.startsWith(prefixWithDash)) return name.slice(prefixWithDash.length);
|
|
17683
|
+
}
|
|
17684
|
+
return name;
|
|
17685
|
+
}
|
|
17677
17686
|
let scope = name.slice(0, slashIndex), rest = name.slice(slashIndex + 1);
|
|
17678
|
-
|
|
17687
|
+
for (let prefix of pluginPrefixes) {
|
|
17688
|
+
if (rest === prefix) return scope;
|
|
17689
|
+
let prefixWithDash = `${prefix}-`;
|
|
17690
|
+
if (rest.startsWith(prefixWithDash)) return `${scope}/${rest.slice(prefixWithDash.length)}`;
|
|
17691
|
+
}
|
|
17692
|
+
return name;
|
|
17679
17693
|
}
|
|
17680
17694
|
/**
|
|
17681
17695
|
* Serialize default options to JSON and deserialize again.
|
|
@@ -20203,7 +20217,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20203
20217
|
module.exports = CodePathAnalyzer;
|
|
20204
20218
|
})))(), 1);
|
|
20205
20219
|
/** Mapping from node type name to node type ID */
|
|
20206
|
-
const NODE_TYPE_IDS_MAP = new Map([
|
|
20220
|
+
const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
|
|
20207
20221
|
["DebuggerStatement", 0],
|
|
20208
20222
|
["EmptyStatement", 1],
|
|
20209
20223
|
["Literal", 2],
|
package/dist/plugins-dev.js
CHANGED
|
@@ -188,7 +188,7 @@ function getItOnly() {
|
|
|
188
188
|
}
|
|
189
189
|
const EMPTY_LANGUAGE_OPTIONS = {};
|
|
190
190
|
let sharedConfig = {};
|
|
191
|
-
const TEST_CASE_PROP_KEYS = new Set([
|
|
191
|
+
const TEST_CASE_PROP_KEYS = /* @__PURE__ */ new Set([
|
|
192
192
|
"code",
|
|
193
193
|
"name",
|
|
194
194
|
"only",
|
|
@@ -822,7 +822,7 @@ function assertInvalidTestCaseIsWellFormed(test, seenTestCases, ruleName) {
|
|
|
822
822
|
function assertTestCaseCommonPropertiesAreWellFormed(test) {
|
|
823
823
|
assert(typeof test.code == "string", "Test case must specify a string value for `code`"), test.name && assert(typeof test.name == "string", "Optional test case property `name` must be a string"), ObjectHasOwn(test, "only") && assert(typeof test.only == "boolean", "Optional test case property `only` must be a boolean"), ObjectHasOwn(test, "filename") && assert(typeof test.filename == "string", "Optional test case property `filename` must be a string"), ObjectHasOwn(test, "options") && assert(ArrayIsArray(test.options), "Optional test case property `options` must be an array");
|
|
824
824
|
}
|
|
825
|
-
const DUPLICATION_IGNORED_PROPS = new Set([
|
|
825
|
+
const DUPLICATION_IGNORED_PROPS = /* @__PURE__ */ new Set([
|
|
826
826
|
"name",
|
|
827
827
|
"errors",
|
|
828
828
|
"output"
|
|
@@ -855,7 +855,7 @@ function isSerializable(value, seenObjects = /* @__PURE__ */ new Set()) {
|
|
|
855
855
|
for (let property in value) {
|
|
856
856
|
if (!ObjectHasOwn(value, property)) continue;
|
|
857
857
|
let prop = value[property];
|
|
858
|
-
if (!isSerializablePrimitiveOrPlainObject(prop) || !(typeof prop != "object" || !prop) && !isSerializable(prop, new Set([...seenObjects, value]))) return !1;
|
|
858
|
+
if (!isSerializablePrimitiveOrPlainObject(prop) || !(typeof prop != "object" || !prop) && !isSerializable(prop, /* @__PURE__ */ new Set([...seenObjects, value]))) return !1;
|
|
859
859
|
}
|
|
860
860
|
return !0;
|
|
861
861
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.71.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.71.0",
|
|
91
|
+
"@oxlint/binding-android-arm64": "1.71.0",
|
|
92
|
+
"@oxlint/binding-win32-arm64-msvc": "1.71.0",
|
|
93
|
+
"@oxlint/binding-linux-arm64-gnu": "1.71.0",
|
|
94
|
+
"@oxlint/binding-linux-arm64-musl": "1.71.0",
|
|
95
|
+
"@oxlint/binding-openharmony-arm64": "1.71.0",
|
|
96
|
+
"@oxlint/binding-android-arm-eabi": "1.71.0",
|
|
97
|
+
"@oxlint/binding-linux-arm-gnueabihf": "1.71.0",
|
|
98
|
+
"@oxlint/binding-linux-arm-musleabihf": "1.71.0",
|
|
99
|
+
"@oxlint/binding-win32-ia32-msvc": "1.71.0",
|
|
100
|
+
"@oxlint/binding-linux-ppc64-gnu": "1.71.0",
|
|
101
|
+
"@oxlint/binding-linux-riscv64-gnu": "1.71.0",
|
|
102
|
+
"@oxlint/binding-linux-riscv64-musl": "1.71.0",
|
|
103
|
+
"@oxlint/binding-linux-s390x-gnu": "1.71.0",
|
|
104
|
+
"@oxlint/binding-darwin-x64": "1.71.0",
|
|
105
|
+
"@oxlint/binding-win32-x64-msvc": "1.71.0",
|
|
106
|
+
"@oxlint/binding-freebsd-x64": "1.71.0",
|
|
107
|
+
"@oxlint/binding-linux-x64-gnu": "1.71.0",
|
|
108
|
+
"@oxlint/binding-linux-x64-musl": "1.71.0"
|
|
109
109
|
}
|
|
110
110
|
}
|