@typescript-eslint/scope-manager 8.53.2-alpha.7 → 8.53.2-alpha.8

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.
@@ -59,22 +59,13 @@ function isStrictScope(scope, block, isMethodDefinition) {
59
59
  }
60
60
  // Search 'use strict' directive.
61
61
  for (const stmt of body.body) {
62
- if (stmt.type !== types_1.AST_NODE_TYPES.ExpressionStatement) {
62
+ if (stmt.type !== types_1.AST_NODE_TYPES.ExpressionStatement ||
63
+ stmt.directive == null) {
63
64
  break;
64
65
  }
65
66
  if (stmt.directive === 'use strict') {
66
67
  return true;
67
68
  }
68
- const expr = stmt.expression;
69
- if (expr.type !== types_1.AST_NODE_TYPES.Literal) {
70
- break;
71
- }
72
- if (expr.raw === '"use strict"' || expr.raw === "'use strict'") {
73
- return true;
74
- }
75
- if (expr.value === 'use strict') {
76
- return true;
77
- }
78
69
  }
79
70
  return false;
80
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/scope-manager",
3
- "version": "8.53.2-alpha.7",
3
+ "version": "8.53.2-alpha.8",
4
4
  "description": "TypeScript scope analyser for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -47,11 +47,11 @@
47
47
  "typecheck": "yarn run -BT nx typecheck"
48
48
  },
49
49
  "dependencies": {
50
- "@typescript-eslint/types": "8.53.2-alpha.7",
51
- "@typescript-eslint/visitor-keys": "8.53.2-alpha.7"
50
+ "@typescript-eslint/types": "8.53.2-alpha.8",
51
+ "@typescript-eslint/visitor-keys": "8.53.2-alpha.8"
52
52
  },
53
53
  "devDependencies": {
54
- "@typescript-eslint/typescript-estree": "8.53.2-alpha.7",
54
+ "@typescript-eslint/typescript-estree": "8.53.2-alpha.8",
55
55
  "@vitest/coverage-v8": "^3.2.4",
56
56
  "@vitest/pretty-format": "^3.2.4",
57
57
  "eslint": "*",