strongly-recommended rules fails with vue-types
See original GitHub issueHi,
thanks for the great effort on this library!
I’m the author of a React’s prop-types
-like library for vue called vue-types.
I’ve been contacted by a user which reported an issue using vue-types
with eslint-plugin-vue
rules.
Basically the library generates a prop object at runtime, but that’s not picked up by some rules like require-default-prop
. If I got it right, since eslint it’s a static analyzer, it cannot manage runtime code (even if resolvers like those in eslint-plugin-import seems to somehow be able to do it).
I’m looking for a way to make this setup work without needing to disable the eslint rule which is pretty important from my point of view.
Any suggestion on where to start?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to get all rules as json of vue/strongly-recommended
I am currently using WebStorm and it gives it own linting errors as there is no way I an give a configuration file...
Read more >Available rules - eslint-plugin-vue
Rule ID Description
vue/multi‑word‑component‑names require component names to be always multi‑word...
vue/no‑arrow‑functions‑in‑watch disallow using arrow functions to define watcher...
vue/no‑computed‑properties‑in‑data disallow accessing computed properties in data...
Read more >eslint-plugin-vue-types
In your eslint configuration add plugin:vue-types/strongly-recommended after any plugin:vue/* preset. module.exports = { extends: [ // .
Read more >Eslint-plugin-vue-types NPM | npm.io
The rule extends vue/require-default-prop preventing it from reporting errors for props defined with VueTypes namespaced validators (like VueTypes.string or ...
Read more >Vue.js eslint Parsing error .: unexpected token
I am getting this error on a state.js file ( at => in the const ... to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for ...
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
Good job @dwightjack ! Happy you figured it out 😃 I guess we can close this issue now
Hi,
as an follow up to this issue I’ve released a plugin to whitelist
vue-types
’s definitions: https://github.com/dwightjack/eslint-plugin-vue-typesFeedbacks are welcome