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

TypeError: Cannot read property 'getJSDocComment' of undefined #140

Open
spiritualfather opened this issue Oct 7, 2024 · 3 comments
Open

Comments

@spiritualfather
Copy link

Could this be related to the new release?

Error:

[2024-10-07T09:22:37.312Z] > eslint "src/v2" "--quiet"
[2024-10-07T09:22:37.312Z] 
[2024-10-07T09:22:38.815Z] 
[2024-10-07T09:22:38.815Z] Oops! Something went wrong! :(
[2024-10-07T09:22:38.815Z] 
[2024-10-07T09:22:38.815Z] ESLint: 7.32.0
[2024-10-07T09:22:38.815Z] 
[2024-10-07T09:22:38.815Z] TypeError: Cannot read property 'getJSDocComment' of undefined
[2024-10-07T09:22:38.815Z] Occurred while linting /app/client/src/v2/app/components/admin-config/admin-config.js:6
[2024-10-07T09:22:38.815Z]     at ClassDeclaration,ClassExpression (/app/client/node_modules/eslint-plugin-wc/lib/rules/no-constructor-attributes.js:113:71)
[2024-10-07T09:22:38.815Z]     at /app/client/node_modules/eslint/lib/linter/safe-emitter.js:45:58
[2024-10-07T09:22:38.815Z]     at Array.forEach (<anonymous>)
[2024-10-07T09:22:38.816Z]     at Object.emit (/app/client/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
[2024-10-07T09:22:38.816Z]     at NodeEventGenerator.applySelector (/app/client/node_modules/eslint/lib/linter/node-event-generator.js:293:26)
[2024-10-07T09:22:38.816Z]     at NodeEventGenerator.applySelectors (/app/client/node_modules/eslint/lib/linter/node-event-generator.js:322:22)
[2024-10-07T09:22:38.816Z]     at NodeEventGenerator.enterNode (/app/client/node_modules/eslint/lib/linter/node-event-generator.js:336:14)
[2024-10-07T09:22:38.816Z]     at CodePathAnalyzer.enterNode (/app/client/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23)
[2024-10-07T09:22:38.816Z]     at /app/client/node_modules/eslint/lib/linter/linter.js:960:32
[2024-10-07T09:22:38.816Z]     at Array.forEach (<anonymous>)
[2024-10-07T09:22:38.816Z]     at runRules (/app/client/node_modules/eslint/lib/linter/linter.js:955:15)
[2024-10-07T09:22:38.816Z]     at Linter._verifyWithoutProcessors (/app/client/node_modules/eslint/lib/linter/linter.js:1181:31)
[2024-10-07T09:22:38.816Z]     at Linter._verifyWithConfigArray (/app/client/node_modules/eslint/lib/linter/linter.js:1280:21)
[2024-10-07T09:22:38.816Z]     at Linter.verify (/app/client/node_modules/eslint/lib/linter/linter.js:1235:25)
[2024-10-07T09:22:38.816Z]     at Linter.verifyAndFix (/app/client/node_modules/eslint/lib/linter/linter.js:1428:29)
[2024-10-07T09:22:38.816Z]     at verifyText (/app/client/node_modules/eslint/lib/cli-engine/cli-engine.js:240:48)
[2024-10-07T09:22:38.816Z]     at CLIEngine.executeOnFiles (/app/client/node_modules/eslint/lib/cli-engine/cli-engine.js:808:28)
[2024-10-07T09:22:38.816Z]     at ESLint.lintFiles (/app/client/node_modules/eslint/lib/eslint/eslint.js:563:23)
[2024-10-07T09:22:38.816Z]     at Object.execute (/app/client/node_modules/eslint/lib/cli.js:301:36)
[2024-10-07T09:22:38.816Z]     at main (/app/client/node_modules/eslint/bin/eslint.js:132:52)
[2024-10-07T09:22:38.816Z]     at Object.<anonymous> (/app/client/node_modules/eslint/bin/eslint.js:136:2)
[2024-10-07T09:22:38.816Z]     at Module._compile (internal/modules/cjs/loader.js:1085:30)
[2024-10-07T09:22:38.816Z]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
[2024-10-07T09:22:38.816Z]     at Module.load (internal/modules/cjs/loader.js:950:32)
[2024-10-07T09:22:38.816Z]     at Function.Module._load (internal/modules/cjs/loader.js:791:14)
[2024-10-07T09:22:38.817Z]     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
[2024-10-07T09:22:38.817Z]     at internal/main/run_main_module.js:17:47
@43081j
Copy link
Owner

43081j commented Oct 7, 2024

2.2.0 was recently published which requires eslint 8.x. this wasn't a breaking change (i.e. a major version) because we already have code in our rules which rely on 8.x and above

presumably your setup just wasn't hitting that code so far

do you have any option to upgrade from eslint 7.x to 8.x? the jump should be easier than to 9.x

@herrbaehrt
Copy link

Although you already have code compliant with the rules that relies on version 8.x and above, this change could, will and does potentially break existing implementations that depend on the semver policy, which allows minor version updates.

That said, this release definitely marks a breaking change

@43081j
Copy link
Owner

43081j commented Oct 25, 2024

It really shouldn't have since we already required 8.x and above

That's why we really need an example from you so we can reproduce the problem

If you can reproduce the problem, showing that it works in the older version and now doesn't, at least I can investigate and see if it can be fixed

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

3 participants