Skip to content

Commit 0f24127

Browse files
committed
⬆️ update dependencies
1 parent 09b4d1e commit 0f24127

13 files changed

+37
-83
lines changed

.eslintrc.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
extends:
22
- plugin:@mysticatea/es2015
33
- plugin:@mysticatea/+node
4-
- plugin:@mysticatea/+modules
4+
55
overrides:
6-
- files: "*.ts"
7-
rules:
8-
"@mysticatea/ts/no-use-before-define": "off"
96
- files: "typings/**"
107
rules:
11-
node/no-missing-import:
8+
node/no-missing-import:
129
- error
13-
- allowModules:
10+
- allowModules:
1411
- estree

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
{"language": "html", "autoFix": true},
55
{"language": "vue", "autoFix": true},
66
{"language": "typescript", "autoFix": true}
7-
]
7+
],
8+
"typescript.tsdk": "node_modules/typescript/lib"
89
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $ npm install --save-dev eslint vue-eslint-parser
2121
- Requires Node.js 6.5.0 or later.
2222
- Requires ESLint 5.0.0 or later.
2323
- Requires `babel-eslint` 8.1.1 or later if you want it. (optional)
24-
- Requires `typescript-eslint-parser` 21.0.0 or later if you want it. (optional)
24+
- Requires `@typescript-eslint/parser` 1.0.0 or later if you want it. (optional)
2525

2626
## 📖 Usage
2727

@@ -82,7 +82,7 @@ For example:
8282
{
8383
"parser": "vue-eslint-parser",
8484
"parserOptions": {
85-
"parser": "typescript-eslint-parser"
85+
"parser": "@typescript-eslint/parser"
8686
}
8787
}
8888
```

package.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,38 @@
1313
"eslint": "^5.0.0"
1414
},
1515
"dependencies": {
16-
"debug": "^4.1.0",
16+
"debug": "^4.1.1",
1717
"eslint-scope": "^4.0.0",
1818
"eslint-visitor-keys": "^1.0.0",
19-
"espree": "^4.1.0",
19+
"espree": "^5.0.0",
2020
"esquery": "^1.0.1",
2121
"lodash": "^4.17.11"
2222
},
2323
"devDependencies": {
24-
"@mysticatea/eslint-plugin": "^7.0.0",
24+
"@mysticatea/eslint-plugin": "^9.0.1",
2525
"@types/debug": "0.0.30",
2626
"@types/estree": "0.0.38",
27-
"@types/lodash": "^4.14.118",
27+
"@types/lodash": "^4.14.120",
2828
"@types/mocha": "^5.2.4",
29-
"@types/node": "^10.12.9",
30-
"acorn": "^6.0.4",
31-
"acorn-jsx": "^5.0.0",
29+
"@types/node": "^10.12.21",
30+
"@typescript-eslint/parser": "^1.2.0",
3231
"babel-eslint": "^10.0.1",
3332
"chokidar": "^2.0.4",
3433
"codecov": "^3.1.0",
3534
"cross-spawn": "^6.0.5",
3635
"dts-bundle": "^0.7.3",
37-
"eslint": "^5.9.0",
36+
"eslint": "^5.13.0",
3837
"fs-extra": "^7.0.1",
3938
"mocha": "^5.2.0",
40-
"npm-run-all": "^4.1.3",
41-
"nyc": "^13.1.0",
39+
"npm-run-all": "^4.1.5",
40+
"nyc": "^13.2.0",
4241
"opener": "^1.5.1",
43-
"rimraf": "^2.6.2",
44-
"rollup": "^0.67.1",
45-
"rollup-plugin-node-resolve": "^3.4.0",
42+
"rimraf": "^2.6.3",
43+
"rollup": "^1.1.2",
44+
"rollup-plugin-node-resolve": "^4.0.0",
4645
"rollup-plugin-sourcemaps": "^0.4.2",
4746
"rollup-watch": "^4.3.1",
48-
"typescript": "~3.1.6",
49-
"typescript-eslint-parser": "^21.0.1",
47+
"typescript": "~3.3.1",
5048
"wait-on": "^3.2.0",
5149
"warun": "^1.0.0"
5250
},

src/external/node-event-generator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ function getPossibleTypes(parsedSelector: Selector): string[] | null {
3131
const typesForComponents = parsedSelector.selectors.map(getPossibleTypes)
3232

3333
if (typesForComponents.every(Boolean)) {
34-
return union.apply(null, typesForComponents)
34+
return union(...(typesForComponents as string[][]))
3535
}
3636
return null
3737
}
3838

3939
case "compound": {
40-
const typesForComponents = parsedSelector.selectors.map(getPossibleTypes).filter(typesForComponent => typesForComponent)
40+
const typesForComponents = parsedSelector.selectors.map(getPossibleTypes).filter(Boolean) as string[][]
4141

4242
// If all of the components could match any type, then the compound could also match any type.
4343
if (!typesForComponents.length) {
@@ -48,7 +48,7 @@ function getPossibleTypes(parsedSelector: Selector): string[] | null {
4848
* If at least one of the components could only match a particular type, the compound could only match
4949
* the intersection of those types.
5050
*/
51-
return intersection.apply(null, typesForComponents)
51+
return intersection(...typesForComponents)
5252
}
5353

5454
case "child":

src/html/intermediate-tokenizer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export class IntermediateTokenizer {
103103
public get state(): TokenizerState {
104104
return this.tokenizer.state
105105
}
106-
//eslint-disable-next-line require-jsdoc
107106
public set state(value: TokenizerState) {
108107
this.tokenizer.state = value
109108
}
@@ -114,7 +113,6 @@ export class IntermediateTokenizer {
114113
public get namespace(): Namespace {
115114
return this.tokenizer.namespace
116115
}
117-
//eslint-disable-next-line require-jsdoc
118116
public set namespace(value: Namespace) {
119117
this.tokenizer.namespace = value
120118
}
@@ -125,7 +123,6 @@ export class IntermediateTokenizer {
125123
public get expressionEnabled(): boolean {
126124
return this.tokenizer.expressionEnabled
127125
}
128-
//eslint-disable-next-line require-jsdoc
129126
public set expressionEnabled(value: boolean) {
130127
this.tokenizer.expressionEnabled = value
131128
}

src/html/parser.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ export class Parser {
187187
private get namespace(): Namespace {
188188
return this.tokenizer.namespace
189189
}
190-
//eslint-disable-next-line require-jsdoc
191190
private set namespace(value: Namespace) {
192191
this.tokenizer.namespace = value
193192
}
@@ -196,11 +195,9 @@ export class Parser {
196195
* The current flag of expression enabled.
197196
*/
198197
// @ts-ignore
199-
//eslint-disable-next-line require-jsdoc
200198
private get expressionEnabled(): boolean {
201199
return this.tokenizer.expressionEnabled
202200
}
203-
//eslint-disable-next-line require-jsdoc
204201
private set expressionEnabled(value: boolean) {
205202
this.tokenizer.expressionEnabled = value
206203
}
@@ -321,7 +318,7 @@ export class Parser {
321318
* @param token The StartTag token to detect.
322319
* @returns The namespace of the new element.
323320
*/
324-
//eslint-disable-next-line complexity, require-jsdoc
321+
//eslint-disable-next-line complexity
325322
private detectNamespace(token: StartTag): Namespace {
326323
const name = token.name
327324
let ns = this.namespace
@@ -431,7 +428,7 @@ export class Parser {
431428
* Handle the start tag token.
432429
* @param token The token to handle.
433430
*/
434-
//eslint-disable-next-line complexity, require-jsdoc
431+
//eslint-disable-next-line complexity
435432
protected StartTag(token: StartTag): void {
436433
debug("[html] StartTag %j", token)
437434

src/parser-services.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ export function define(rootAST: ESLintProgram): ParserServices {
6666
emitters.set(rootAST, (emitter = new EventEmitter()))
6767

6868
const programExitHandler = scriptVisitor["Program:exit"]
69-
scriptVisitor["Program:exit"] = function() {
69+
scriptVisitor["Program:exit"] = node => {
7070
try {
7171
if (typeof programExitHandler === "function") {
72-
programExitHandler.apply(this, arguments) //eslint-disable-line prefer-rest-params
72+
programExitHandler(node)
7373
}
7474

7575
// Traverse template body.

src/script/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ const validDivisionCharRE = /[\w).+\-_$\]]/u
254254
* This is a fork of https://github.com/vuejs/vue/blob/2686818beb5728e3b7aa22f47a3b3f0d39d90c8e/src/compiler/parser/filter-parser.js
255255
* @param exp the expression to process filters.
256256
*/
257-
//eslint-disable-next-line complexity, require-jsdoc
257+
//eslint-disable-next-line complexity
258258
function splitFilters(exp: string): string[] {
259259
const result: string[] = []
260260
let inSingle = false

src/template/index.ts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -137,38 +137,6 @@ function createDirectiveKey(node: VIdentifier): VDirectiveKey {
137137
return ret
138138
}
139139

140-
/**
141-
* Do splice.
142-
* @param items The array to operate.
143-
* @param start The start index.
144-
* @param deleteCount The count of items to delete.
145-
* @param newItems The array of items to insert.
146-
*/
147-
function splice<T>(
148-
items: T[],
149-
start: number,
150-
deleteCount: number,
151-
newItems: T[],
152-
): void {
153-
switch (newItems.length) {
154-
case 0:
155-
items.splice(start, deleteCount)
156-
break
157-
case 1:
158-
items.splice(start, deleteCount, newItems[0])
159-
break
160-
case 2:
161-
items.splice(start, deleteCount, newItems[0], newItems[1])
162-
break
163-
default:
164-
Array.prototype.splice.apply(
165-
items,
166-
([start, deleteCount] as any[]).concat(newItems),
167-
)
168-
break
169-
}
170-
}
171-
172140
interface HasRange {
173141
range: [number, number]
174142
}
@@ -217,7 +185,7 @@ function replaceTokens(
217185

218186
const index = sortedIndexBy(document.tokens, node, byRange0)
219187
const count = sortedLastIndexBy(document.tokens, node, byRange1) - index
220-
splice(document.tokens, index, count, newTokens)
188+
document.tokens.splice(index, count, ...newTokens)
221189
}
222190

223191
/**
@@ -234,7 +202,7 @@ function insertComments(
234202
}
235203

236204
const index = sortedIndexBy(document.comments, newComments[0], byRange0)
237-
splice(document.comments, index, 0, newComments)
205+
document.comments.splice(index, 0, ...newComments)
238206
}
239207

240208
/**

test/fixtures/eslint

Submodule eslint updated 236 files

test/index.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,13 @@ describe("Basic tests", () => {
232232
assert(messages.length === 0)
233233
})
234234

235-
it("should notify no error with 'typescript-eslint-parser'", () => {
235+
it("should notify no error with '@typescript-eslint/parser'", () => {
236236
const cli = new CLIEngine({
237237
cwd: FIXTURE_DIR,
238238
envs: ["es6", "node"],
239239
parser: PARSER_PATH,
240240
parserOptions: {
241-
//
242-
parser: "typescript-eslint-parser",
241+
parser: "@typescript-eslint/parser",
243242
},
244243
rules: { semi: ["error", "never"] },
245244
useEslintrc: false,
@@ -270,14 +269,13 @@ describe("Basic tests", () => {
270269
assert(messages.length === 0)
271270
})
272271

273-
it("should notify no error with 'typescript-eslint-parser'", () => {
272+
it("should notify no error with '@typescript-eslint/parser'", () => {
274273
const cli = new CLIEngine({
275274
cwd: FIXTURE_DIR,
276275
envs: ["es6", "node"],
277276
parser: PARSER_PATH,
278277
parserOptions: {
279-
//
280-
parser: "typescript-eslint-parser",
278+
parser: "@typescript-eslint/parser",
281279
},
282280
rules: { semi: ["error", "never"] },
283281
useEslintrc: false,
@@ -315,15 +313,14 @@ describe("Basic tests", () => {
315313
assert(actual === expected)
316314
})
317315

318-
it("should fix 'semi' errors with --fix option with 'typescript-eslint-parser'", () => {
316+
it("should fix 'semi' errors with --fix option with '@typescript-eslint/parser'", () => {
319317
const cli = new CLIEngine({
320318
cwd: FIXTURE_DIR,
321319
envs: ["es6", "node"],
322320
fix: true,
323321
parser: PARSER_PATH,
324322
parserOptions: {
325-
//
326-
parser: "typescript-eslint-parser",
323+
parser: "@typescript-eslint/parser",
327324
},
328325
rules: { semi: ["error", "always"] },
329326
useEslintrc: false,

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"baseUrl": ".",
1010
"checkJs": false,
1111
"declaration": true,
12-
"diagnostics": true,
1312
"forceConsistentCasingInFileNames": true,
1413
"inlineSources": true,
1514
"lib": [

0 commit comments

Comments
 (0)