Skip to content

Add eslint configuration tab #2008

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

Merged
merged 8 commits into from
Aug 1, 2018
Merged

Add eslint configuration tab #2008

merged 8 commits into from
Aug 1, 2018

Conversation

michalsnik
Copy link
Member

@michalsnik michalsnik commented Jul 31, 2018

Closes #1423

This PR updates the configuration tab for @vue/cli-plugin-eslint in vue-ui.

Original proposition: vuejs/eslint-plugin-vue#477

  1. It adds a general tab with two settings, where users can both set lint on save and choose one of the pre-defined configs:
    image

  2. It add a rules tab with a list of all rules and categories:
    image

When user selects certain category in general tab - lets' say strongly-recommended we set error as default value for all rules in base, essential and strongly-recommended categories.

At the very bottom we also have a list of Uncategorized rules, that are always off by default.

Due to the fact that it's really hard, and currently impossible to generate controls that would allow full configuration regarding actual rules' schemas we allow setting only error, warning and off. If the user wants he can customize rules further using .eslintrc, then if the rule has custom settings, we display its value in dropdown as custom - but this option appears only if the rule has been reconfigured.

image

Whenever user changes the configuration in general tab, to not introduce confusion we're not resetting any custom settings, that user might've set himself before.

cc @chrisvfritz

@michalsnik michalsnik force-pushed the add-eslint-configuration-tab branch from 78048db to 80d2c59 Compare July 31, 2018 13:10
@@ -12,7 +12,7 @@
</div>
<div v-if="description || link || showDescription" class="description">
<slot name="description">
<span v-html="description"/>
Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Description of some rules contain <tagname> and it broked the UI 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Could we strip them out?

Copy link
Member Author

Choose a reason for hiding this comment

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

escaped

@michalsnik
Copy link
Member Author

michalsnik commented Jul 31, 2018

Seems like because of network issues the build failed. Can you please @Akryum rerun the build from CircleCI?

@Akryum Akryum merged commit 7953d83 into dev Aug 1, 2018
@Akryum Akryum deleted the add-eslint-configuration-tab branch August 1, 2018 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants