Skip to content

Upgrade dependencies #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
sudo: false

language: node_js
node_js:
- "6.5"
- "8"
- "10"
matrix:
include:
- node_js: "6.5"
env: ESLINT=5
- node_js: "8"
env: ESLINT=5
- node_js: "8"
env: ESLINT=6
- node_js: "10"
env: ESLINT=5
- node_js: "10"
env: ESLINT=6
- node_js: "11"

before_install:
- if [ "$ESLINT" = "6" ]; then npm i -D eslint@6.0.0; fi
- if [ "$ESLINT" = "6" ]; then npm i -S espree@6.0.0 eslint-scope@5.0.0; fi
- if [ "$ESLINT" = "5" ]; then npm i -D eslint@5.16.0 @mysticatea/eslint-plugin@9.0.1; fi
- if [ "$ESLINT" = "5" ]; then npm i -S espree@5.0.0 eslint-scope@4.0.0; fi

before_script:
- npm run setup
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
"index.*"
],
"peerDependencies": {
"eslint": "^5.0.0"
"eslint": "^5.0.0 || ^6.0.0"
},
"dependencies": {
"debug": "^4.1.1",
"eslint-scope": "^4.0.0",
"eslint-scope": "^4.0.0 || ^5.0.0",
"eslint-visitor-keys": "^1.0.0",
"espree": "^5.0.0",
"espree": "^5.0.0 || ^6.0.0",
"esquery": "^1.0.1",
"lodash": "^4.17.11"
"lodash": "^4.17.15"
},
"devDependencies": {
"@mysticatea/eslint-plugin": "^9.0.1",
"@mysticatea/eslint-plugin": "^11.0.0",
"@types/debug": "0.0.30",
"@types/estree": "0.0.38",
"@types/lodash": "^4.14.120",
Expand All @@ -33,7 +33,7 @@
"codecov": "^3.1.0",
"cross-spawn": "^6.0.5",
"dts-bundle": "^0.7.3",
"eslint": "^5.13.0",
"eslint": "^6.1.0",
"fs-extra": "^7.0.1",
"mocha": "^6.1.4",
"npm-run-all": "^4.1.5",
Expand All @@ -54,7 +54,7 @@
"clean": "rimraf .nyc_output .temp coverage index.*",
"codecov": "codecov",
"coverage": "opener ./coverage/lcov-report/index.html",
"lint": "eslint src test --ext .js,.ts",
"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)\"",
"setup": "git submodule update --init && cd test/fixtures/eslint && npm install",
"pretest": "run-s build lint",
"test": "nyc mocha \"test/*.js\" --reporter dot --timeout 10000",
Expand Down
1 change: 1 addition & 0 deletions src/html/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export class Parser {
/**
* The current flag of expression enabled.
*/
// eslint-disable-next-line @mysticatea/ts/ban-ts-ignore
// @ts-ignore
private get expressionEnabled(): boolean {
return this.tokenizer.expressionEnabled
Expand Down
1 change: 1 addition & 0 deletions src/parser-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export function define(rootAST: ESLintProgram): ParserServices {
generator,
)
} finally {
// eslint-disable-next-line @mysticatea/ts/ban-ts-ignore
// @ts-ignore
scriptVisitor["Program:exit"] = programExitHandler
emitters.delete(rootAST)
Expand Down
7 changes: 5 additions & 2 deletions src/script/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,12 @@ export function parseScript(
): ESLintExtendedProgram {
const parser: ESLintCustomParser =
typeof parserOptions.parser === "string"
? require(parserOptions.parser)
: require("espree")
? // eslint-disable-next-line @mysticatea/ts/no-require-imports
require(parserOptions.parser)
: // eslint-disable-next-line @mysticatea/ts/no-require-imports
require("espree")
const result: any =
// eslint-disable-next-line @mysticatea/ts/unbound-method
typeof parser.parseForESLint === "function"
? parser.parseForESLint(code, parserOptions)
: parser.parse(code, parserOptions)
Expand Down
4 changes: 2 additions & 2 deletions src/script/scope-analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function transformReference(reference: escopeTypes.Reference): Reference {
mode: reference.isReadOnly()
? "r"
: reference.isWriteOnly()
? "w"
: /* otherwise */ "rw",
? "w"
: /* otherwise */ "rw",
variable: null,
}
Object.defineProperty(ret, "variable", { enumerable: false })
Expand Down