Skip to content

Commit ea156df

Browse files
ota-meshimysticatea
authored andcommitted
⚒ Upgrade dependencies (#51)
1 parent cce993a commit ea156df

File tree

6 files changed

+34
-14
lines changed

6 files changed

+34
-14
lines changed

.travis.yml

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
sudo: false
22

33
language: node_js
4-
node_js:
5-
- "6.5"
6-
- "8"
7-
- "10"
4+
matrix:
5+
include:
6+
- node_js: "6.5"
7+
env: ESLINT=5
8+
- node_js: "8"
9+
env: ESLINT=5
10+
- node_js: "8"
11+
env: ESLINT=6
12+
- node_js: "10"
13+
env: ESLINT=5
14+
- node_js: "10"
15+
env: ESLINT=6
16+
- node_js: "11"
17+
18+
before_install:
19+
- if [ "$ESLINT" = "6" ]; then npm i -D [email protected]; fi
20+
- if [ "$ESLINT" = "6" ]; then npm i -S [email protected] [email protected]; fi
21+
- if [ "$ESLINT" = "5" ]; then npm i -D [email protected] @mysticatea/[email protected]; fi
22+
- if [ "$ESLINT" = "5" ]; then npm i -S [email protected] [email protected]; fi
823

924
before_script:
1025
- npm run setup

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
},
1515
"dependencies": {
1616
"debug": "^4.1.1",
17-
"eslint-scope": "^4.0.0",
17+
"eslint-scope": "^4.0.0 || ^5.0.0",
1818
"eslint-visitor-keys": "^1.0.0",
19-
"espree": "^5.0.0",
19+
"espree": "^5.0.0 || ^6.0.0",
2020
"esquery": "^1.0.1",
21-
"lodash": "^4.17.11"
21+
"lodash": "^4.17.15"
2222
},
2323
"devDependencies": {
24-
"@mysticatea/eslint-plugin": "^9.0.1",
24+
"@mysticatea/eslint-plugin": "^11.0.0",
2525
"@types/debug": "0.0.30",
2626
"@types/estree": "0.0.38",
2727
"@types/lodash": "^4.14.120",
@@ -33,7 +33,7 @@
3333
"codecov": "^3.1.0",
3434
"cross-spawn": "^6.0.5",
3535
"dts-bundle": "^0.7.3",
36-
"eslint": "^5.13.0",
36+
"eslint": "^6.1.0",
3737
"fs-extra": "^7.0.1",
3838
"mocha": "^6.1.4",
3939
"npm-run-all": "^4.1.5",
@@ -54,7 +54,7 @@
5454
"clean": "rimraf .nyc_output .temp coverage index.*",
5555
"codecov": "codecov",
5656
"coverage": "opener ./coverage/lcov-report/index.html",
57-
"lint": "eslint src test --ext .js,.ts",
57+
"lint": "node -e \"if(process.env.ESLINT=='5')process.exit(1)\" && eslint src test --ext .js,.ts || node -e \"if(process.env.ESLINT!='5')process.exit(1)\"",
5858
"setup": "git submodule update --init && cd test/fixtures/eslint && npm install",
5959
"pretest": "run-s build lint",
6060
"test": "nyc mocha \"test/*.js\" --reporter dot --timeout 10000",

src/html/parser.ts

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export class Parser {
194194
/**
195195
* The current flag of expression enabled.
196196
*/
197+
// eslint-disable-next-line @mysticatea/ts/ban-ts-ignore
197198
// @ts-ignore
198199
private get expressionEnabled(): boolean {
199200
return this.tokenizer.expressionEnabled

src/parser-services.ts

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export function define(rootAST: ESLintProgram): ParserServices {
8383
generator,
8484
)
8585
} finally {
86+
// eslint-disable-next-line @mysticatea/ts/ban-ts-ignore
8687
// @ts-ignore
8788
scriptVisitor["Program:exit"] = programExitHandler
8889
emitters.delete(rootAST)

src/script/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,12 @@ export function parseScript(
566566
): ESLintExtendedProgram {
567567
const parser: ESLintCustomParser =
568568
typeof parserOptions.parser === "string"
569-
? require(parserOptions.parser)
570-
: require("espree")
569+
? // eslint-disable-next-line @mysticatea/ts/no-require-imports
570+
require(parserOptions.parser)
571+
: // eslint-disable-next-line @mysticatea/ts/no-require-imports
572+
require("espree")
571573
const result: any =
574+
// eslint-disable-next-line @mysticatea/ts/unbound-method
572575
typeof parser.parseForESLint === "function"
573576
? parser.parseForESLint(code, parserOptions)
574577
: parser.parse(code, parserOptions)

src/script/scope-analyzer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ function transformReference(reference: escopeTypes.Reference): Reference {
4848
mode: reference.isReadOnly()
4949
? "r"
5050
: reference.isWriteOnly()
51-
? "w"
52-
: /* otherwise */ "rw",
51+
? "w"
52+
: /* otherwise */ "rw",
5353
variable: null,
5454
}
5555
Object.defineProperty(ret, "variable", { enumerable: false })

0 commit comments

Comments
 (0)