Eslint-plugin-vue: Migrate eslint-plugin-vue-trail to eslint-plugin-vue

Created on 3 Jun 2017  路  12Comments  路  Source: vuejs/eslint-plugin-vue

We're in the process of moving @mysticatea's eslint-plugin-vue-trial to this repository. Everything is going on on the dev branch.

I'm creating this issue so we can track progress and discuss further things in public (full transparency).

As we discussed eslint-plugin-vue-trial will be a great base for further work and future rules.

work in progress

Most helpful comment

Alright, I just released 3.0.0 under beta tag, so it's not marked as the latest release. I was testing it on hackernews vue example and everything seems cool. What do you think about posting a tweet about it? People can try it by simply running:

npm install eslint-plugin-vue@beta

Downside is that the whole documentation is still on dev branch. Maybe we should merge it with master and add information in readme that current version is still in beta phase and it's not something you get by default while installing eslint-plugin-vue. I think it would make perfect sense, but I'd like to know your opinions too @yyx990803 @mysticatea.

All 12 comments

Thank you to create the dev brunch and to invite me as a collaborator.

Unfortunately, I'm going to late join to develop because I'm busy in my job now. I guess that I can get time after 2 weeks. I'm sorry.

Currently html-end-tags and no-duplicate-attributes are working by halves because of parser's problem. Maybe it's better if 3.0.0 does not include those rules.

I'm writing new HTML parser for linting. It will resolve the following problems. However, I need more time.

  • vue-eslint-parser is rewriting AST of parse5 completely.
    This will be unnecessary by the new HTML parser.
  • vue-eslint-parser is making tokens of the AST similar to ESLint.
    The new HTML parser will make those in the tokenization phase.
  • parse5 discards helpful information for linting: duplicate attributes, invalid tokens, illegal end tags, ...
    The new HTML parser will keep those.

Sure @mysticatea no problem, take your time.

I think what we can do for now is to disable those rules in recommended configuration and mark them in readme as *beta, so you can work on new parser and don't worry about them that much.

In the meanwhile I'm preparing PR with:

  • separate simplified configs (base & recommended)
  • Improved rules' resolver
  • updated Readme and package.json
  • travis replaced by circleCI
  • jsx-uses-vars rule, that was previously available in eslint-plugin-vue (I'm also adding proper tests and documentation for this rule)
  • order-in-components rule, that I proposed here #13

I think I'd probably add more rules to v3.0.0 so we're not only checking templates but components' code as well. But I'll create separate issues for each proposition.

We can either release 3.0.0-beta and then 3.0.0 after new parser is implemented. Or release 3.0.0 and then integrate new parser and release it as 3.1.0 or 4.0.0 depending on the compatibility.
On one hand releasing 3.0.0 with new parser makes a lot of sense, but on the other hand current implementation has been battle tested and we can be quite sure it'll work as expected in most cases plus we could release it earlier and get a valuable feedback from devs sooner.

@mysticatea take your time! No need to be sorry. The new parser sounds great, and it sounds like it can be made useful not only for Vue but for generic HTML linting.

@michalsnik I think we should probably do a 3.0.0-beta first to indicate that it's unstable and for testing / collecting feedback.

Could you please add me to npm @yyx990803 so I can release 3.0.0-beta soon?

@michalsnik added. Make sure to release it with --tag beta :)

Sure thing @yyx990803, but you added me to eslint-config-vue, not plugin :)

@michalsnik whoops, fixed :)

Alright, I just released 3.0.0 under beta tag, so it's not marked as the latest release. I was testing it on hackernews vue example and everything seems cool. What do you think about posting a tweet about it? People can try it by simply running:

npm install eslint-plugin-vue@beta

Downside is that the whole documentation is still on dev branch. Maybe we should merge it with master and add information in readme that current version is still in beta phase and it's not something you get by default while installing eslint-plugin-vue. I think it would make perfect sense, but I'd like to know your opinions too @yyx990803 @mysticatea.

Cool!

@michalsnik yeah, I think we can merge it to master now. Should be fine as long as we make the beta information super prominent in the README.

I'd leave this issue open as a reference until we officially release it under latest tag.

Lots of things going on in v3. I'm closing this issue and I'll better create new milestone called Official release to track our progress.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KristofMorva picture KristofMorva  路  4Comments

sqal picture sqal  路  3Comments

mitar picture mitar  路  3Comments

prograhammer picture prograhammer  路  3Comments

lichnow picture lichnow  路  3Comments