Skip to content

Commit

Permalink
fix(cli-plugin-eslint): remove base rules from ui (#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvfritz authored and Akryum committed Aug 1, 2018
1 parent 7953d83 commit 1e10161
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
15 changes: 12 additions & 3 deletions packages/@vue/cli-plugin-eslint/__tests__/ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,26 @@ describe('getEslintPrompts', () => {
'dolor': {
meta: {
docs: {
category: 'base',
category: 'strongly-recommended',
description: 'Dolor description',
url: 'http://test.com/dolor'
}
}
},
'sit': {
meta: {
docs: {
category: 'base',
description: 'Sit description',
url: 'http://test.com/sit'
}
}
}
}

const prompts = getEslintPrompts(data, rules)

it('creates an array with three settings', () => {
it('creates an array with 3 settings, leaving out category "base"', () => {
expect(prompts).toHaveLength(3)
})

Expand All @@ -147,7 +156,7 @@ describe('getEslintPrompts', () => {
expect(prompts[2].choices).toHaveLength(4)
})

it('sets a default value to "ERROR" for rule that belong to the choosen config', () => {
it('sets a default value to "ERROR" for rule that belong to the chosen config', () => {
expect(prompts[0].default).toBe('"error"')
expect(prompts[1].default).toBe('"error"')
expect(prompts[2].default).toBe('"off"')
Expand Down
1 change: 0 additions & 1 deletion packages/@vue/cli-plugin-eslint/ui/configDescriptor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const CONFIG = 'org.vue.eslintrc'

const CATEGORIES = [
'base',
'essential',
'strongly-recommended',
'recommended',
Expand Down
1 change: 0 additions & 1 deletion packages/@vue/cli-ui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@
"essential": "Essential",
"strongly-recommended": "Strongly recommended",
"recommended": "Recommended",
"use-with-caution": "Use with caution",
"uncategorized": "Uncategorized"
},
"setting": {
Expand Down

0 comments on commit 1e10161

Please sign in to comment.