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

Chore: Add prettier config #698

Merged
merged 3 commits into from Dec 30, 2018
Merged

Chore: Add prettier config #698

merged 3 commits into from Dec 30, 2018

Conversation

michalsnik
Copy link
Member

This PR adds automatic generation for prettier config, that disables all layout rules. We're going to use this config in @vue/eslint-config-prettier as well as probably update information in prettier docs to point to this config, instead of a not-synced version that is currently provided.

@michalsnik michalsnik self-assigned this Dec 3, 2018
@armano2
Copy link
Collaborator

armano2 commented Dec 3, 2018

your gitconfig has wrong username/email :>

@armano2
Copy link
Collaborator

armano2 commented Dec 3, 2018

we should also propose update to https://github.com/prettier/eslint-config-prettier/blob/master/vue.js

@mysticatea
Copy link
Member

Thank you for this PR.

The name vue/prettier looks enabling prettier format to me. How do you think vue/no-layout-rules or something like?

Also we need the document about the preset.

@michalsnik
Copy link
Member Author

Good idea @mysticatea I realised after I started creating PR to eslint-config-prettier:D

Damn, good catch @armano2 - I ran docs deploy and it must've changed my config.

@michalsnik
Copy link
Member Author

Theoretically information about config could stay in prettier documentation. If you're going to configure prettier yourself, this is where this information should be present. And if you'll decide to use @vue/config-prettier - you'll be all set, without ever having to worry about turning any rules off @mysticatea . What do you think?

Change prettier config name to no-layout-rules
@armano2
Copy link
Collaborator

armano2 commented Dec 8, 2018

@michalsnik do you mind enabling require-meta-type rule in config. its required to make this work correctly.

Copy link
Member

@mysticatea mysticatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM.

@michalsnik michalsnik merged commit fd80ba4 into master Dec 30, 2018
@michalsnik michalsnik deleted the add-prettier-config branch December 30, 2018 22:17
@alexschomb
Copy link

Just to be sure. Which is the correct .eslintrc.js to use?

This is what I have now (but it seems to report no errors at all):

...
 extends: [
    'eslint:recommended',
    'plugin:vue/recommended',
    'prettier',
    'prettier/vue'
  ],
  plugins: ['vue', 'prettier'],
...

@michalsnik
Copy link
Member Author

This looks fine @alexschomb. Can you show full config, how do you run eslint, does the problem exist if you run eslint through terminal? Also what versions of these packages are you using?

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

Successfully merging this pull request may close these issues.

None yet

4 participants