Georgii Dolzhykov
6a87ce138a
Improve detection of AMD define ( #10528 )
2021-03-15 00:08:37 +02:00
dependabot[bot]
9f3c95b659
Build(deps-dev): Bump @babel/preset-env from 7.13.9 to 7.13.10 ( #10527 )
2021-03-14 16:03:25 +00:00
dependabot[bot]
3e8fc15fac
Build(deps-dev): Bump eslint from 7.21.0 to 7.22.0 ( #10530 )
2021-03-14 15:42:09 +00:00
dependabot[bot]
4097e704ac
Build(deps-dev): Bump rollup from 2.40.0 to 2.41.2 ( #10529 )
...
Bumps [rollup](https://github.com/rollup/rollup ) from 2.40.0 to 2.41.2.
- [Release notes](https://github.com/rollup/rollup/releases )
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rollup/rollup/compare/v2.40.0...v2.41.2 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-14 23:07:38 +08:00
dependabot[bot]
a5916854aa
Build(deps-dev): Bump @babel/core from 7.13.8 to 7.13.10 ( #10522 )
...
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core ) from 7.13.8 to 7.13.10.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.13.10/packages/babel-core )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-14 22:35:21 +08:00
fisker Cheung
21c81e007d
Test json superset ( #10493 )
2021-03-14 15:04:35 +02:00
dependabot[bot]
eadd777cc2
Build(deps-dev): Bump webpack from 5.24.3 to 5.25.0 ( #10521 )
2021-03-14 12:40:17 +00:00
dependabot[bot]
59868f4322
Build(deps-dev): Bump webpack from 5.24.3 to 5.25.0 in /website ( #10526 )
2021-03-14 12:40:12 +00:00
dependabot[bot]
2447cc32a9
Build(deps): Bump clipboard from 2.0.7 to 2.0.8 in /website ( #10525 )
2021-03-14 12:08:37 +00:00
dependabot[bot]
3fc328ad97
Build(deps-dev): Bump docusaurus from 1.14.6 to 1.14.7 in /website ( #10524 )
2021-03-14 10:20:30 +00:00
dependabot[bot]
1501ea4979
Build(deps): Bump codecov/codecov-action from v1.2.1 to v1.2.2 ( #10519 )
2021-03-14 10:20:16 +00:00
Georgii Dolzhykov
2740ea6ee8
Avoid last-argument hugging for number-only arrays ( #10517 )
2021-03-14 12:15:53 +02:00
Georgii Dolzhykov
169faf39ac
Update yaml to 1.10.2 ( #10516 )
2021-03-14 12:14:08 +02:00
fisker Cheung
3995c2a1a1
Whitelist recovered babel parse errors ( #10495 )
2021-03-13 22:07:22 +02:00
fisker Cheung
1ce6b8dc3d
Fix syntax error on JSON range formatting ( #10497 )
2021-03-12 00:24:45 +02:00
fisker Cheung
ff32d6b823
Playground: Order options ( #10501 )
...
* Playground: Order options
* Remove `rangeStart/End` from `ENABLED_OPTIONS`
2021-03-10 22:20:47 +02:00
fisker Cheung
d3a0699148
Rename n to node ( #10504 )
2021-03-10 22:14:08 +02:00
Georgii Dolzhykov
4ece300581
Fix Flow range formatting ( #10505 )
...
* Fix Flow range formatting
* Add changelog
2021-03-10 15:12:27 +02:00
Georgii Dolzhykov
33ab1fccc8
Clarify docs about pragma ( #10500 )
2021-03-10 03:40:15 +02:00
Georgii Dolzhykov
6be741d74e
Fix PR number in changelog
2021-03-10 03:02:43 +02:00
Georgii Dolzhykov
109492a497
Clarify prettier.format docs ( #10499 )
2021-03-10 02:54:50 +02:00
fisker Cheung
02f803ac8d
JSON: Only allow +/- number in UnaryExpression ( #10434 )
2021-03-09 10:58:31 +08:00
046ffb11f9
Support better formatting for curried arrow functions ( #9992 )
...
* Support formatting for curried arrow functions
* Fix test file name
* Fix threshold
* Add changelog
* Fix operator for comparing
* Fix return pos
* Fix eslint
* level 2
* Refactor for level2
* Update tests
* Remove concat
* If it fits on one line, print on one line
* Indent second level arg
* Break before last return value
* Use isCallLikeExpression
* Improve printing
* Add tests
* Remove unnecesary condition
* Fix lint problems
* Update src/language-js/utils.js
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com >
* Update changelog
* Add ImportExpression
* Add ImportExpression to isCallLikeExpression
* Resolve conflicts
* Address reviews
* Fix ESLint problem
* Fix changelog
* Add tests
* More tests
* Print simple arrow chains on one line
* Don't forcibly break chain when a segment has a return type but no params
* Prevent excessive wrapping in assignments
* Simplify
* Format object bodies like blocks
* Update changelog
* Fix last arg expansion
* Simplify
* Fix arrow chains in assignment chains
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com >
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-08 23:18:53 +02:00
fisker Cheung
94775e88ef
Build: Fix rollup warning ( #10487 )
2021-03-08 17:08:47 +02:00
dependabot[bot]
e0916e4979
Build(deps): Bump typescript from 4.2.2 to 4.2.3 ( #10482 )
2021-03-08 00:42:36 +00:00
dependabot[bot]
28179b8a50
Build(deps-dev): Bump webpack from 5.24.2 to 5.24.3 ( #10484 )
2021-03-07 22:29:50 +00:00
dependabot[bot]
65beebf14c
Build(deps-dev): Bump eslint-plugin-jest from 24.1.5 to 24.1.8 ( #10483 )
2021-03-07 22:28:58 +00:00
dependabot[bot]
2558a0c4ab
Build(deps-dev): Bump rollup-plugin-polyfill-node from 0.5.0 to 0.6.1 ( #10471 )
2021-03-07 21:13:07 +00:00
dependabot[bot]
bb1be0d409
Build(deps): Bump @angular/compiler from 11.2.3 to 11.2.4 ( #10476 )
2021-03-07 21:11:50 +00:00
dependabot[bot]
b6f53f93dc
Build(deps-dev): Bump @babel/preset-env from 7.13.8 to 7.13.9 ( #10474 )
2021-03-07 21:11:15 +00:00
dependabot[bot]
689a8e55f0
Build(deps): Bump clipboard from 2.0.6 to 2.0.7 in /website ( #10475 )
2021-03-07 21:10:21 +00:00
dependabot[bot]
c0bcfb40da
Build(deps-dev): Bump webpack from 5.24.2 to 5.24.3 in /website ( #10472 )
2021-03-07 21:06:37 +00:00
dependabot[bot]
6561457fc1
Build(deps): Bump meriyah from 4.1.4 to 4.1.5 ( #10477 )
2021-03-07 21:05:54 +00:00
fisker Cheung
c7f9b9d1e8
Fix a wrong condition ( #10478 )
...
* Add rule
* Fix
2021-03-07 12:19:38 +02:00
Sosuke Suzuki
c9144daf47
Support TS 4.2 abstract construct types via ts-estree ( #10466 )
2021-03-06 19:16:51 +02:00
Georgii Dolzhykov
ceb7ee62f8
typechecking: remove @typescript-eslint/types from devDependencies ( #10470 )
...
@typescript-eslint/typescript-estree reexports these types.
2021-03-06 17:10:50 +02:00
fisker Cheung
2f6580bebc
Simplify babel parser ( #10437 )
2021-03-05 19:27:08 +08:00
Sosuke Suzuki and fisker Cheung
f1b5720fc7
Remove unstable AST testing ( #10462 )
...
* Add unstable AST testing for json-stringify parser
* Deduplicate yarn.lock
* Ignore `tokens`
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-03-05 12:17:42 +02:00
Sosuke Suzuki
eb5139b7a9
Remove unnecessary condition ( #10032 )
2021-03-05 09:24:46 +02:00
fisker Cheung and Georgii Dolzhykov
8a1ee9ad1b
Support JSON6 ( #10456 )
...
* Add test
* Support JSON6
* Test
* Print `null` instead of holes
* More tests
* Update changelog
* Style
* Minor refactor
* Fix AST clean
* Fix `Identifier` clean
* Fix AST compare
* Style
* Reword changelog
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-03-04 19:37:42 +02:00
Georgii Dolzhykov
37aa31e929
Remove hacks for single-element unions/intersections ( #10457 )
...
* Remove hacks for degenerate unions/intersection
* Add changelog
2021-03-04 01:21:03 +02:00
Georgii Dolzhykov and Sosuke Suzuki
5f8fee4d07
Prevent wrapping object properties with short keys ( #10335 )
...
* Prevent wrapping object properties with short keys
* Update src/language-js/print/assignment.js
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
* Use getStringWidth instead of .length
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2021-03-03 01:43:46 +02:00
fisker Cheung
2f384ab24a
JSON: More JSON5 data tests ( #10453 )
2021-03-02 13:43:48 +08:00
fisker Cheung
2edfec5eda
JSON: Better error message ( #10452 )
2021-03-02 13:42:49 +08:00
Georgii Dolzhykov
23b4822e66
Disable Jest's default transformer (Babel) ( #10454 )
...
* Disable Jest's default transform (Babel)
https://jestjs.io/docs/en/next/code-transformation#defaults
Otherwise, I sometimes get this error because Babel tries to resolve Browserslist:
----
● plugin search should not crash when prettier isn't inside a directory › encountered a declaration exception
ENOENT: no such file or directory, stat '/mnt/d/dev/prettier/tests_integration/mnt/d/dev/prettier/tests_integration/runPrettier.js'
52 | jest.spyOn(fs, "statSync").mockImplementation((filename) => {
53 | if (path.basename(filename) === "virtualDirectory") {
> 54 | return origStatSync(path.join(__dirname, __filename));
| ^
55 | }
56 | return origStatSync(filename);
57 | });
at Object.<anonymous> (tests_integration/runPrettier.js:54:14)
at isFile (node_modules/browserslist/node.js:38:42)
at eachParent (node_modules/browserslist/node.js:46:13)
at Object.getStat (node_modules/browserslist/node.js:197:15)
at browserslist (node_modules/browserslist/index.js:433:19)
at resolveTargets (node_modules/@babel/helper-compilation-targets/lib/index.js:174:46)
----
2021-03-01 13:55:20 +02:00
fisker Cheung
ed9e9ab649
Improve json error code frame ( #10433 )
2021-03-01 10:04:09 +08:00
fisker Cheung
7aff95cac1
Refactor semicolon check ( #10355 )
2021-03-01 10:03:28 +08:00
fisker Cheung
9324380c53
JSON: Disallow sparse array ( #10443 )
2021-03-01 09:53:32 +08:00
dependabot[bot]
1227207909
Build(deps): Bump string-width from 4.2.1 to 4.2.2 ( #10448 )
...
Bumps [string-width](https://github.com/sindresorhus/string-width ) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/sindresorhus/string-width/releases )
- [Commits](https://github.com/sindresorhus/string-width/compare/v4.2.1...v4.2.2 )
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-01 09:51:25 +08:00
fisker Cheung
ed64ce0f0e
JSON: Allow Infinity and NaN ( #10451 )
2021-03-01 09:14:20 +08:00