Comments (7)
Give v2.0.1 a go
from eslint-plugin-ft-flow.
This setting from the recommended configuration that was causing the issue for me:
"babelOptions": {
"parserOpts": {
"plugins": [
"flow",
"jsx"
]
}
}
Actually, it is only the "flow" plugin that causes the problem.
I got it solved by setting an empty babelOptions:{}
on my eslint configuration while I don't figure out why that setting isn't working for me.
Thanks for the plugin btw 🙇
from eslint-plugin-ft-flow.
I'll be honest I've never used flow enums yet, I'll give it a go today and see what could fix it
from eslint-plugin-ft-flow.
@Brianzchen It seems this should be configuration instead, I couldn't find a flow plugin for babel at least:
"parserOptions": {
"babelOptions": {
"parserOpts": {
"presets": ["@babel/preset-flow"],
"plugins": ["jsx", "babel-plugin-transform-flow-enums"]
}
}
}
from eslint-plugin-ft-flow.
Ok I just tested this and this is what I've realised, babelOptions
is basically an overwrite to babel.config.js
or .babelrc.js
specified in your root project, when you don't have parserOptions
defined it will just read your babel config instead which should always work, you basically NEED to have that configured otherwise your code doesn't actually run so we're just doubling up code to match eslint with any other babel parsing.
My suggestion here is that we just remove this property completely from the recommended setting, whatever you have defined in your babel config to traverse your code for runtime, testing and now eslint will all be the same. This project won't need to maintain all sorts of settings for different use cases.
Also note that this property was originally added before @babel/eslint-parser
was a thing but now pulling from babel configs is the standard.
Is that ok with you @maxcnunes? I can make this change quickly and then ship a patch immediately after
from eslint-plugin-ft-flow.
Yeah, makes sense to me, thanks.
from eslint-plugin-ft-flow.
That worked, thanks!
from eslint-plugin-ft-flow.
Related Issues (20)
- `ft-flow/enforce-suppression-code`: TypeError: Cannot read properties of undefined (reading 'startsWith') HOT 4
- Suggested improvements to `no-flow-fix-me-in-strict-files` rule HOT 7
- Improve test runner HOT 1
- Consider renaming `no-flow-fix-me-in-strict-files` to something like `no-flow-suppressions-in-strict-files` HOT 1
- improve readme generator
- Function type parameters spacing issues HOT 2
- Enums support consistent trailing comma
- Enums support unused value
- Switch to use `hermes-eslint` as the recommended parser HOT 14
- Q HOT 1
- Allow mixed type-import-style HOT 1
- Add meta.schema to rules
- Fix mapped types throwing eslint errors
- should depend on hermes-eslint with >=
- `globalScope.__defineGeneric` is not a function HOT 12
- No sourceCode in context HOT 2
- Fix all lint errors and enable as part of build
- flow type the repo
- Fix dodgy old file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-ft-flow.