eslint-plugin-svelte 3.12.2 → 3.12.3

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/lib/main.d.ts CHANGED
@@ -14,7 +14,7 @@ export declare const configs: {
14
14
  export declare const rules: Record<string, Rule.RuleModule>;
15
15
  export declare const meta: {
16
16
  name: "eslint-plugin-svelte";
17
- version: "3.12.2";
17
+ version: "3.12.3";
18
18
  };
19
19
  export declare const processors: {
20
20
  '.svelte': typeof processor;
package/lib/meta.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare const name: "eslint-plugin-svelte";
2
- export declare const version: "3.12.2";
2
+ export declare const version: "3.12.3";
package/lib/meta.js CHANGED
@@ -2,4 +2,4 @@
2
2
  // This file has been automatically generated,
3
3
  // in order to update its content execute "pnpm run update"
4
4
  export const name = 'eslint-plugin-svelte';
5
- export const version = '3.12.2';
5
+ export const version = '3.12.3';
@@ -331,12 +331,23 @@ export default createRule('no-top-level-browser-globals', {
331
331
  const end = pp.range[1];
332
332
  return (n) => start <= n.range[0] && n.range[1] <= end;
333
333
  }
334
- if (!guardInfo.not &&
335
- parent.type === 'LogicalExpression' &&
336
- parent.operator === '&&' &&
337
- parent.left === guardInfo.node) {
338
- const block = parent.right;
339
- return (n) => block.range[0] <= n.range[0] && n.range[1] <= block.range[1];
334
+ if (parent.type === 'LogicalExpression') {
335
+ if (!guardInfo.not && parent.operator === '&&') {
336
+ const parentChecker = getGuardChecker({ not: guardInfo.not, node: parent });
337
+ if (parent.left === guardInfo.node) {
338
+ const block = parent.right;
339
+ return (n) => {
340
+ if (parentChecker?.(n)) {
341
+ return true;
342
+ }
343
+ return block.range[0] <= n.range[0] && n.range[1] <= block.range[1];
344
+ };
345
+ }
346
+ return parentChecker;
347
+ }
348
+ if (guardInfo.not && parent.operator === '||') {
349
+ return getGuardChecker({ not: guardInfo.not, node: parent });
350
+ }
340
351
  }
341
352
  return null;
342
353
  }
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "eslint-plugin-svelte",
3
- "version": "3.12.2",
3
+ "version": "3.12.3",
4
4
  "description": "ESLint plugin for Svelte using AST",
5
- "repository": "git+https://github.com/sveltejs/eslint-plugin-svelte.git",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/sveltejs/eslint-plugin-svelte.git",
8
+ "directory": "packages/eslint-plugin-svelte"
9
+ },
6
10
  "homepage": "https://sveltejs.github.io/eslint-plugin-svelte",
7
11
  "author": "Yosuke Ota (https://github.com/ota-meshi)",
8
12
  "funding": "https://github.com/sponsors/ota-meshi",
@@ -58,6 +62,8 @@
58
62
  "@types/postcss-safe-parser": "^5.0.4",
59
63
  "@types/semver": "^7.7.0",
60
64
  "@types/stylus": "^0.48.43",
65
+ "@typescript-eslint/scope-manager": "^8.43.0",
66
+ "@typescript-eslint/types": "^8.43.0",
61
67
  "acorn": "^8.15.0",
62
68
  "assert": "^2.1.0",
63
69
  "esbuild": "^0.25.9",