gajus / eslint-plugin-flowtype

Flow type linting rules for ESLint.
Other
1.08k stars 153 forks source link

TypeError: globalScope.__defineGeneric is not a function on define-flow-type #524

Open maxdygaf opened 1 year ago

maxdygaf commented 1 year ago

Es lint errors when there is not defined type

Oops! Something went wrong! :(

ESLint: 8.31.0

TypeError: globalScope.__defineGeneric is not a function
Occurred while linting /home/st.cremer/Сайты/flow/src/services/training/trainingTypes.js:7
Rule: "flowtype/define-flow-type"
    at makeDefined (/home/st.cremer/Сайты/flow/node_modules/eslint-plugin-flowtype/dist/rules/defineFlowType.js:21:21)
    at GenericTypeAnnotation (/home/st.cremer/Сайты/flow/node_modules/eslint-plugin-flowtype/dist/rules/defineFlowType.js:49:9)
    at ruleErrorHandler (/home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/linter.js:1115:28)
    at /home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (/home/st.cremer/Сайты/flow/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:795:23)
ajmeese7 commented 2 months ago

I am running into a similar error on my end:

[eslint] Error while loading rule 'flowtype/define-flow-type': context.getAllComments is not a function

Any advice would be appreciated!

chaitanya1248 commented 2 months ago

I am running into a similar error on my end:

[eslint] Error while loading rule 'flowtype/define-flow-type': context.getAllComments is not a function

Any advice would be appreciated!

Having the same issue. no clue on it

TharunKumarSoppari commented 1 month ago

ERROR in [eslint] Error while loading rule 'flowtype/define-flow-type': context.getAllComments is not a function

Occurred while linting

Any clue on it ?

kien-qs commented 1 month ago

I am running into a similar error on my end:

[eslint] Error while loading rule 'flowtype/define-flow-type': context.getAllComments is not a function

Any advice would be appreciated!

I am having the same issue after I updated the "eslint" to the newest version (from 8.57.0 to 9.9.0) I had also tried some others v9.x.x versions and it also ended up with this error Is anyone have any solution for this, it is really annoyed 😔

dennisat commented 1 month ago

Same here

dennisat commented 1 month ago

This is 1,5yars open issue!!! Does anybody know a workaround???