eslint + flow support
See original GitHub issuemy project uses eslint + flow
importing images generally works because they can be found on the file system, but when adding query params, this throws off both eslint and flow.
my workaround right now is to update .flowconfig
to strip the query
[ignore]
[include]
[libs]
[lints]
[options]
module.name_mapper='^\(.+\.\(png\|gif\|jpg\|webp\)\)\?\(url\|original\|include\|inline\|webp\|sprite\)$' -> '\1'
[strict]
and to add // eslint-disable-line import/no-unresolved
on the import line when i do use a query.
not sure what the best way to fix this. either some extra settings for eslint-plugin-import or to have a different api for how to trigger special actions that don’t involve changing up the import line.
either way, this might not be a bug for this repo, but filing it here, in case others run into this. feel free to close.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top Results From Across the Web
gajus/eslint-plugin-flowtype: Flow type linting rules for ... - GitHub
They are simpler to construct, test, and use; They help to avoid temporal coupling; Their usage is side-effect free (no defensive copies); Identity...
Read more >ESLint | Flow
Learn how to use Flow with ESLint. ... ESLint is a static analysis tool which can help you quickly find and fix bugs...
Read more >eslint-plugin-flow - npm
Flowtype linting rules for ESLint.. Latest version: 2.29.1, last published: 6 years ago. Start using eslint-plugin-flow in your project by ...
Read more >eslint-plugin-flowtype-errors - npm package - Snyk
Lower barrier: Any editor that has ESLint support now supports Flow · Less editor configuration: No need to change your entire workflow to...
Read more >eslint-plugin-flowtype | Yarn - Package Manager
Flow type linting rules for ESLint. eslint-plugin-flowtype. Installation; Configuration. Shareable configurations; Community maintained configurations.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks 👍
I needed the SVG as well, here is a more complete regex:
The answer is a little out of date now. There is a resize option that includes an additional param of size, for example:
?resize&size=960
This is the regular expression I ended up using, but it is very loose at the end; you might want to tighten it up by limiting the options you can pass to it.