Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use same linting rules for vue-cli and vetur? #1064

Closed
3 tasks done
gunhaxxor opened this issue Jan 18, 2019 · 3 comments
Closed
3 tasks done

How to use same linting rules for vue-cli and vetur? #1064

gunhaxxor opened this issue Jan 18, 2019 · 3 comments

Comments

@gunhaxxor
Copy link

gunhaxxor commented Jan 18, 2019

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Win 10 x64
  • Vetur version: 0.14.5
  • VS Code version: 1.30.2

Problem

I have vetur installed.
I'm creating a project with vue-cli.
When creating the project I chose to use typescript and class style components. I have concluded that vue-cli uses the tslint.json-file when I serve my app (npm run serve). But vetur's auto formatting introduces changes/rules that differ from what I've specified in the tslint.json.
Question: How can I make sure that the autoformatting won't conflict with the linting from vue-cli?

Reproducible Case

Install vue-cli
Install vetur
create a project
autoformat a .vue-file
save
serve project with vue-cli (npm run vue-cli)
see how vue-cli outputs a lot of linting warnings.

@octref
Copy link
Member

octref commented Mar 14, 2019

There are 3 formatters for script section. prettier, prettier-eslint and vscode-typescript. None of them have support for TSLint.

@octref octref closed this as completed Mar 14, 2019
@octref
Copy link
Member

octref commented Mar 14, 2019

So your best bet is to configure them to match your linting setting, or follow #170.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants