I have a small issue with a boilerplate I'm setting up currently, I'm using Flow JS to type define my javascript for my react application, in the bacground i have a standard js running, but it is not playing nicely with my type notations
I keep getting the following warning on this type definition:
type NavItem = {
name: string;
link: string;
}
The warning
frontend/src/Components/Sidebar/Navigation.react.js:5:6: 'NavItem' is not defined.
what am i doing wrong, this is my config for standard js
"standard": {
"parser": "babel-eslint",
"plugins": [ "flowtype" ],
"rules": {
"use-flow-type": 1
},
"ignore": [
"flow-typed/**/*.js",
"src/registerServiceWorker.js"
]
},
If any one has any suggestions i would love them, im based out of the create-react-app cli tool if it makes any diffrence for you aswell :)
There is an open ticket in standardjs repo: #984 - it is related to that issue.
As a workaround you can downgrade to [email protected]
and wait for the fix. The downgrade worked for me with the exact same problem.
You can also try to edit standardjs rules - see: babel-eslint#known-issues and eslint-config-standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With