Skip to content

Commit c0e7a23

Browse files
Christopher QuadfliegChristopher Quadflieg
Christopher Quadflieg
authored and
Christopher Quadflieg
committed
chore: remove linter option tslint
1 parent 393e79b commit c0e7a23

File tree

4 files changed

+3
-67
lines changed

4 files changed

+3
-67
lines changed

packages/@vue/cli-plugin-typescript/prompts.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ const prompts = module.exports = [
1515
type: `confirm`,
1616
message: 'Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)?'
1717
},
18-
{
19-
name: `lint`,
20-
type: `confirm`,
21-
message: `Use TSLint?`
22-
},
2318
{
2419
name: `lintOn`,
2520
type: `checkbox`,

packages/@vue/cli/lib/promptModules/__tests__/typescript.spec.js

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,6 @@ const assertPromptModule = require('@vue/cli-test-utils/assertPromptModule')
66
const moduleToTest = require('../typescript')
77
const linterModule = require('../linter')
88

9-
test('with TSLint', async () => {
10-
const expectedPrompts = [
11-
{
12-
message: 'features',
13-
choices: ['TypeScript', 'Linter'],
14-
check: [0, 1]
15-
},
16-
{
17-
message: 'Use class-style component',
18-
confirm: true
19-
},
20-
{
21-
message: 'Use Babel',
22-
confirm: true
23-
},
24-
{
25-
message: 'Pick a linter / formatter',
26-
choices: ['ESLint with error prevention only', 'Airbnb', 'Standard', 'Prettier', 'TSLint (deprecated)'],
27-
choose: [4]
28-
},
29-
{
30-
message: 'Pick additional lint features',
31-
choices: ['on save', 'on commit'],
32-
check: [0, 1]
33-
}
34-
]
35-
36-
const expectedOptions = {
37-
plugins: {
38-
'@vue/cli-plugin-typescript': {
39-
classComponent: true,
40-
tsLint: true,
41-
lintOn: ['save', 'commit'],
42-
useTsWithBabel: true
43-
}
44-
}
45-
}
46-
47-
await assertPromptModule(
48-
[moduleToTest, linterModule],
49-
expectedPrompts,
50-
expectedOptions,
51-
{ pluginsOnly: true }
52-
)
53-
})
54-
559
test('with ESLint', async () => {
5610
const expectedPrompts = [
5711
{
@@ -69,7 +23,7 @@ test('with ESLint', async () => {
6923
},
7024
{
7125
message: 'Pick a linter / formatter',
72-
choices: ['ESLint with error prevention only', 'Airbnb', 'Standard', 'Prettier', 'TSLint (deprecated)'],
26+
choices: ['ESLint with error prevention only', 'Airbnb', 'Standard', 'Prettier'],
7327
choose: [1]
7428
},
7529
{

packages/@vue/cli/lib/promptModules/linter.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,7 @@ module.exports = cli => {
3737
name: 'ESLint + Prettier',
3838
value: 'prettier',
3939
short: 'Prettier'
40-
},
41-
...(
42-
answers.features.includes('ts')
43-
? [{
44-
name: `TSLint (deprecated)`,
45-
value: 'tslint',
46-
short: 'TSLint'
47-
}]
48-
: []
49-
)
40+
}
5041
]
5142
})
5243

@@ -69,7 +60,7 @@ module.exports = cli => {
6960
})
7061

7162
cli.onPromptComplete((answers, options) => {
72-
if (answers.features.includes('linter') && answers.eslintConfig !== 'tslint') {
63+
if (answers.features.includes('linter')) {
7364
options.plugins['@vue/cli-plugin-eslint'] = {
7465
config: answers.eslintConfig,
7566
lintOn: answers.lintOn

packages/@vue/cli/lib/promptModules/typescript.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ module.exports = cli => {
3232
const tsOptions = {
3333
classComponent: answers.tsClassComponent
3434
}
35-
if (answers.eslintConfig === 'tslint') {
36-
tsOptions.tsLint = true
37-
tsOptions.lintOn = answers.lintOn
38-
}
3935
if (answers.useTsWithBabel) {
4036
tsOptions.useTsWithBabel = true
4137
}

0 commit comments

Comments
 (0)