eslint-plugin-no-mistakes 0.73.1 → 0.75.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-no-mistakes",
3
- "version": "0.73.1",
3
+ "version": "0.75.0",
4
4
  "description": "ESLint and Oxlint rules that keep code static enough for no-mistakes analyzers and coding agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,11 +21,11 @@
21
21
  "test": "vitest run --coverage"
22
22
  },
23
23
  "devDependencies": {
24
- "@typescript-eslint/parser": "^8.70.0",
25
- "@vitest/coverage-v8": "^5.0.1",
24
+ "@typescript-eslint/parser": "^8.70.1",
25
+ "@vitest/coverage-v8": "^5.0.2",
26
26
  "eslint": "^10.11.0",
27
- "oxlint": "^1.85.0",
28
- "vitest": "^5.0.1"
27
+ "oxlint": "^1.86.0",
28
+ "vitest": "^5.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "eslint": ">=9"
@@ -20,6 +20,11 @@ function importedName(specifier) {
20
20
  return imported?.type === "Literal" ? String(imported.value) : imported?.name;
21
21
  }
22
22
 
23
+ // The module itself or any subpath of it; `@example/dbx` does not match.
24
+ function fromConfiguredModule(source, specifier) {
25
+ return !specifier || source === specifier || String(source).startsWith(`${specifier}/`);
26
+ }
27
+
23
28
  // Local names of configured factory (value) and type imports, by module.
24
29
  function scopedImports(program, options) {
25
30
  const factories = new Set();
@@ -27,7 +32,7 @@ function scopedImports(program, options) {
27
32
  const { importSpecifier, executorFactoryNames, executorTypeNames } = options;
28
33
  for (const statement of program?.body ?? []) {
29
34
  if (statement.type !== "ImportDeclaration") continue;
30
- if (importSpecifier && statement.source?.value !== importSpecifier) continue;
35
+ if (!fromConfiguredModule(statement.source?.value, importSpecifier)) continue;
31
36
  for (const specifier of statement.specifiers ?? []) {
32
37
  if (specifier.type !== "ImportSpecifier") continue;
33
38
  const imported = importedName(specifier);