lukastaegert/eslint-plugin-tree-shaking

Static blocks result in "Unknown node type StaticBlock."

Opened this issue · 0 comments

ESLint version: 8.57.0

ESLint plugins:

"eslint-config-prettier": "~9.0.0",
"eslint-formatter-azure-devops": "^1.2.0",
"eslint-plugin-import": "~2.26.0",
"eslint-plugin-jest": "~27.4.3",
"eslint-plugin-jsdoc": "~46.2.6",
"eslint-plugin-prettier": "~5.0.0",
"eslint-plugin-tree-shaking": "^1.12.2",
"eslint-plugin-tsdoc": "~0.2.14",

Given a class with a static block, eslint-plugin-tree-shaking produces the following error:

error  Unknown node type StaticBlock.
If you are using the latest version of this plugin, please consider filing an issue noting this message, the offending statement, your ESLint version, and any active ESLint presets and plugins  tree-shaking/no-side-effects-in-initialization

For example:

class Foo {
    static {
        console.log("FOO");
    }
}