JSCS v3 does not play well with Flow
UnsungHero97 opened this issue · 5 comments
I'm using JSCS v3 with the Airbnb preset, pulling in the latest changes on master (9eaa1f7), and I'm seeing the following error:
Expected end of node list but "Whitespace" found at src/utils.js :
1 |/*
--------^
2 | * @flow
3 | */
This is the entirety of the file I'm trying to lint:
/*
* @flow
*/
export function isValid(key :?Uint8Array) :boolean {
return key instanceof Uint8Array;
}
If I remove the Flow type annotations, JSCS has no problem with the file. It seems like JSCS v3 is not playing well with Flow.
Oh yeah, cst itself doesn't support flow atm
@hzoo thanks for the quick response! so what's the plan going forward? should I expect Flow support in JSCS v3, or is that too big of a feature for a product at EOL?
It's a CST change, so it depends on if anyone wants to make a PR for it (I don't think there needs to much change in JSCS itself if at all). It could definetely happen if anyone is up to do a PR in that repo.
will the changes to CST eventually go in ESLint, when ESLint switches over to CST? if so, it seems like a good use of time for this to eventually be implemented :)
will the changes to CST eventually go in ESLint, when ESLint switches over to CST?
To note: that's an "if" and pretty big one :)