Skip to content
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

Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1 #8413

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@babel/parser": "7.9.6",
"@glimmer/syntax": "0.53.0",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "2.34.0",
"@typescript-eslint/typescript-estree": "3.0.1",
"angular-estree-parser": "2.0.3",
"angular-html-parser": "1.7.0",
"camelcase": "6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/language-js/postprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function postprocess(ast, options) {
return { ...node.types[0], ...composeLoc(node) };
}
break;
// flow
// flow & typescript
case "ImportExpression":
return {
...node,
Expand Down
8 changes: 6 additions & 2 deletions src/language-js/printer-estree.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,14 +1613,18 @@ function printPathNoParens(path, options, print, args) {
case "NumericLiteral": // Babel 6 Literal split
return printNumber(n.extra.raw);
case "BigIntLiteral":
// babel: n.extra.raw, typescript: n.raw, flow: n.bigint
return (n.bigint || (n.extra ? n.extra.raw : n.raw)).toLowerCase();
// babel: n.extra.raw, flow: n.bigint
return (n.bigint || n.extra.raw).toLowerCase();
case "BooleanLiteral": // Babel 6 Literal split
case "StringLiteral": // Babel 6 Literal split
case "Literal": {
if (n.regex) {
return printRegex(n.regex);
}
// typescript
if (n.bigint) {
return n.raw.toLowerCase();
}
if (typeof n.value === "number") {
return printNumber(n.raw);
}
Expand Down
8 changes: 8 additions & 0 deletions tests/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`dynamic-import.js error test 1`] = `
"Unexpected token \`,\`, expected the token \`)\` (1:24)
> 1 | import('./prettier.mjs', {})
| ^
2 | "
`;
1 change: 1 addition & 0 deletions tests/misc/errors/flow/dynamic-import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import('./prettier.mjs', {})
1 change: 1 addition & 0 deletions tests/misc/errors/flow/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run_spec(__dirname, ["flow"]);
7 changes: 7 additions & 0 deletions tests/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`dynamic-import.ts error test 1`] = `
"Dynamic import must have one specifier as an argument. (1:8)
> 1 | import('./prettier.mjs', {})
| ^
2 | "
`;

exports[`invalid-jsx-1.ts error test 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (3:45)
1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters
Expand Down
1 change: 1 addition & 0 deletions tests/misc/errors/typescript/dynamic-import.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import('./prettier.mjs', {})
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1238,10 +1238,10 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/typescript-estree@2.34.0":
version "2.34.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5"
integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==
"@typescript-eslint/typescript-estree@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.0.1.tgz#8c0cfb7cda64bd6f54185a7b7d1923d25d36b2a8"
integrity sha512-FrbMdgVCeIGHKaP9OYTttFTlF8Ds7AkjMca2GzYCE7pVch10PAJc1mmAFt+DfQPgu/2TrLAprg2vI0PK/WTdcg==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
Expand Down