oxlint 1.69.0 → 1.70.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 +4691 -688
- package/dist/bindings.js +37 -31
- package/dist/index.d.ts +1474 -327
- package/dist/lint.js +20 -6
- package/package.json +20 -20
package/dist/lint.js
CHANGED
|
@@ -14109,7 +14109,7 @@ function resetSettings() {
|
|
|
14109
14109
|
}
|
|
14110
14110
|
//#endregion
|
|
14111
14111
|
//#region package.json
|
|
14112
|
-
var version = "1.
|
|
14112
|
+
var version = "1.70.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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.70.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.70.0",
|
|
91
|
+
"@oxlint/binding-android-arm64": "1.70.0",
|
|
92
|
+
"@oxlint/binding-win32-arm64-msvc": "1.70.0",
|
|
93
|
+
"@oxlint/binding-linux-arm64-gnu": "1.70.0",
|
|
94
|
+
"@oxlint/binding-linux-arm64-musl": "1.70.0",
|
|
95
|
+
"@oxlint/binding-openharmony-arm64": "1.70.0",
|
|
96
|
+
"@oxlint/binding-android-arm-eabi": "1.70.0",
|
|
97
|
+
"@oxlint/binding-linux-arm-gnueabihf": "1.70.0",
|
|
98
|
+
"@oxlint/binding-linux-arm-musleabihf": "1.70.0",
|
|
99
|
+
"@oxlint/binding-win32-ia32-msvc": "1.70.0",
|
|
100
|
+
"@oxlint/binding-linux-ppc64-gnu": "1.70.0",
|
|
101
|
+
"@oxlint/binding-linux-riscv64-gnu": "1.70.0",
|
|
102
|
+
"@oxlint/binding-linux-riscv64-musl": "1.70.0",
|
|
103
|
+
"@oxlint/binding-linux-s390x-gnu": "1.70.0",
|
|
104
|
+
"@oxlint/binding-darwin-x64": "1.70.0",
|
|
105
|
+
"@oxlint/binding-win32-x64-msvc": "1.70.0",
|
|
106
|
+
"@oxlint/binding-freebsd-x64": "1.70.0",
|
|
107
|
+
"@oxlint/binding-linux-x64-gnu": "1.70.0",
|
|
108
|
+
"@oxlint/binding-linux-x64-musl": "1.70.0"
|
|
109
109
|
}
|
|
110
110
|
}
|