Skip to content

Commit

Permalink
Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1 (#8413)
Browse files Browse the repository at this point in the history
* Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1

Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 2.34.0 to 3.0.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.0.1/packages/typescript-estree)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix bigint print

* Add error tests on `dynamic-import`

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
  • Loading branch information
dependabot-preview[bot] and fisker committed May 27, 2020
1 parent 81d7e06 commit c7ad075
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 8 deletions.
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 \`&gt;\`? (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

0 comments on commit c7ad075

Please sign in to comment.