From b6f4b6ab79dcc2e0829e05f182af77af961ff1df Mon Sep 17 00:00:00 2001 From: Chris Fritz Date: Wed, 1 Aug 2018 15:28:32 +0200 Subject: [PATCH] fix(cli-plugin-eslint): remove base rules from ui --- .../@vue/cli-plugin-eslint/__tests__/ui.spec.js | 15 ++++++++++++--- .../@vue/cli-plugin-eslint/ui/configDescriptor.js | 1 - packages/@vue/cli-ui/locales/en.json | 1 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/@vue/cli-plugin-eslint/__tests__/ui.spec.js b/packages/@vue/cli-plugin-eslint/__tests__/ui.spec.js index 222f968f8d..573458db46 100644 --- a/packages/@vue/cli-plugin-eslint/__tests__/ui.spec.js +++ b/packages/@vue/cli-plugin-eslint/__tests__/ui.spec.js @@ -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) }) @@ -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"') diff --git a/packages/@vue/cli-plugin-eslint/ui/configDescriptor.js b/packages/@vue/cli-plugin-eslint/ui/configDescriptor.js index 28e75c4832..aa582b0b1c 100644 --- a/packages/@vue/cli-plugin-eslint/ui/configDescriptor.js +++ b/packages/@vue/cli-plugin-eslint/ui/configDescriptor.js @@ -1,7 +1,6 @@ const CONFIG = 'org.vue.eslintrc' const CATEGORIES = [ - 'base', 'essential', 'strongly-recommended', 'recommended', diff --git a/packages/@vue/cli-ui/locales/en.json b/packages/@vue/cli-ui/locales/en.json index b2ffe10bbe..65a8f9b6b2 100644 --- a/packages/@vue/cli-ui/locales/en.json +++ b/packages/@vue/cli-ui/locales/en.json @@ -584,7 +584,6 @@ "essential": "Essential", "strongly-recommended": "Strongly recommended", "recommended": "Recommended", - "use-with-caution": "Use with caution", "uncategorized": "Uncategorized" }, "setting": {