Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static blocks result in "Unknown node type StaticBlock." #131

Open
ryantrem opened this issue Jul 29, 2024 · 0 comments
Open

Static blocks result in "Unknown node type StaticBlock." #131

ryantrem opened this issue Jul 29, 2024 · 0 comments

Comments

@ryantrem
Copy link

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");
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant