@typescript-eslint/eslint-plugin
Advanced tools
Comparing version 8.0.0-alpha.31 to 8.0.0-alpha.32
@@ -52,2 +52,5 @@ "use strict"; | ||
}, | ||
ignoreClassWithStaticInitBlock: { | ||
type: 'boolean', | ||
}, | ||
reportUsedIgnorePattern: { | ||
@@ -76,2 +79,3 @@ type: 'boolean', | ||
caughtErrors: 'all', | ||
ignoreClassWithStaticInitBlock: false, | ||
reportUsedIgnorePattern: false, | ||
@@ -88,2 +92,5 @@ }; | ||
options.caughtErrors = firstOption.caughtErrors ?? options.caughtErrors; | ||
options.ignoreClassWithStaticInitBlock = | ||
firstOption.ignoreClassWithStaticInitBlock ?? | ||
options.ignoreClassWithStaticInitBlock; | ||
options.reportUsedIgnorePattern = | ||
@@ -304,2 +311,8 @@ firstOption.reportUsedIgnorePattern ?? | ||
} | ||
if (def.type === utils_1.TSESLint.Scope.DefinitionType.ClassName) { | ||
const hasStaticBlock = def.node.body.body.some(node => node.type === utils_1.AST_NODE_TYPES.StaticBlock); | ||
if (options.ignoreClassWithStaticInitBlock && hasStaticBlock) { | ||
continue; | ||
} | ||
} | ||
// skip catch variables | ||
@@ -306,0 +319,0 @@ if (def.type === utils_1.TSESLint.Scope.DefinitionType.CatchClause) { |
{ | ||
"name": "@typescript-eslint/eslint-plugin", | ||
"version": "8.0.0-alpha.31", | ||
"version": "8.0.0-alpha.32", | ||
"description": "TypeScript plugin for ESLint", | ||
@@ -63,6 +63,6 @@ "files": [ | ||
"@eslint-community/regexpp": "^4.10.0", | ||
"@typescript-eslint/scope-manager": "8.0.0-alpha.31", | ||
"@typescript-eslint/type-utils": "8.0.0-alpha.31", | ||
"@typescript-eslint/utils": "8.0.0-alpha.31", | ||
"@typescript-eslint/visitor-keys": "8.0.0-alpha.31", | ||
"@typescript-eslint/scope-manager": "8.0.0-alpha.32", | ||
"@typescript-eslint/type-utils": "8.0.0-alpha.32", | ||
"@typescript-eslint/utils": "8.0.0-alpha.32", | ||
"@typescript-eslint/visitor-keys": "8.0.0-alpha.32", | ||
"graphemer": "^1.4.0", | ||
@@ -78,4 +78,4 @@ "ignore": "^5.3.1", | ||
"@types/natural-compare": "*", | ||
"@typescript-eslint/rule-schema-to-typescript-types": "8.0.0-alpha.31", | ||
"@typescript-eslint/rule-tester": "8.0.0-alpha.31", | ||
"@typescript-eslint/rule-schema-to-typescript-types": "8.0.0-alpha.32", | ||
"@typescript-eslint/rule-tester": "8.0.0-alpha.32", | ||
"ajv": "^6.12.6", | ||
@@ -82,0 +82,0 @@ "cross-env": "^7.0.3", |
Sorry, the diff of this file is not supported yet
2468138
28202
+ Added@typescript-eslint/scope-manager@8.0.0-alpha.32(transitive)
+ Added@typescript-eslint/type-utils@8.0.0-alpha.32(transitive)
+ Added@typescript-eslint/utils@8.0.0-alpha.32(transitive)
+ Added@typescript-eslint/visitor-keys@8.0.0-alpha.32(transitive)
- Removed@typescript-eslint/scope-manager@8.0.0-alpha.31(transitive)
- Removed@typescript-eslint/type-utils@8.0.0-alpha.31(transitive)
- Removed@typescript-eslint/utils@8.0.0-alpha.31(transitive)
- Removed@typescript-eslint/visitor-keys@8.0.0-alpha.31(transitive)