Commit Graph
4320 Commits
Author SHA1 Message Date
554b15473d Document recommended setup and improve docs overall (#8510)
Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-06-28 09:47:29 +08:00
fisker Cheung 0c2b918078 ESLint: enable import/order (#8635) 2020-06-26 20:30:21 +08:00
dependabot[bot]andfisker 49127cc873 Build(deps): Bump @angular/compiler (#8641)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-06-26 19:18:12 +08:00
fisker Cheung 407aff482b Update lock-threads (#8629) 2020-06-25 21:48:27 +08:00
fisker Cheung e8be12a6eb Build: Auto set parsers as external (#8639)
* Auto set parsers as external

* Update bundler.js
2020-06-25 00:01:17 +03:00
fisker Cheung 9e8df9d922 Fix resolve EditorConfig for files in deep directory (#8591)
* Fix resolve editorConfig for files in deep directory

* Add  changelog,  remove `find-project-root`

* Simplify

* Use `existsSync` instead of `readdirSync`
2020-06-24 23:58:02 +03:00
Michał Staśkiewicz aa1088fbd7 Handlebars: Fix incorrect classic component syntax formatting (#8593)
* Test: Add test addressing #8584

* Fix: Resolves problem with incorrect component formatting (#8584)

* Docs: Add changelog note

* Test: Add test for yield formatting case

* Fix: Fix handlebars yield opening tag break

* Test: Add case for any helper with params

* Fix: Fix opening tag for every helper with params

* Chore: Revert whitespaces

* Chore: Revert whitespaces in tests
2020-06-24 23:55:59 +03:00
Cyrille David bff049fd96 handlebars: Support escaping a mustache with a backslash (#8634)
* Add a failing test

* Support escaping a mustache with `\`

It is documented in handlebarjs documentation here:
https://handlebarsjs.com/guide/expressions.html#escaping-handlebars-expressions

* Preprocess TextNode to adjust the need of backslashes

Given that template:
```hbs
a non-escaped mustache: \\\{{helper}}
```

Glimmer parser will produce two body nodes:
- a TextNode where `node.chars === "a non-escaped mustache: \\\\"`
- a MustacheStatement for `{{helper}}`

In order to correctly print the input, we need to adjust the TextNode to
`node.chars === "a non-escaped mustache: \\\\\\"`, namely we have to add
a backslash that is removed by Glimmer parser. This is this commit
purpose.

* Add changelog note
2020-06-24 23:55:02 +03:00
dependabot[bot] 05262d5e4e Build(deps-dev): Bump jest from 26.0.1 to 26.1.0 (#8638)
Bumps [jest](https://github.com/facebook/jest) from 26.0.1 to 26.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v26.0.1...v26.1.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-24 16:13:23 +03:00
Jonathan Morley 5ccb1b44ab fix: configure pre-commit hook to only output changed files (#7129)
Currently, the pre-commit hook will output all files that prettier analyzes.

The changed lines are highlighted in the terminal, but this highlighting is not always successful (e.g. we have seen the highlighting disappear when running inside Jenkins)

This sets prettier (when running within pre-commit) to only output changed files
2020-06-24 15:11:31 +03:00
fisker Cheung 63a37a2a1d Treat <option> and <optgroup> as block (#8620) 2020-06-24 18:33:13 +08:00
fisker Cheung 4dd750b727 Use html-void-elements for more completed list (#8627) 2020-06-23 14:58:49 +03:00
b27f84438d Update remark parse v8 (#8140)
* Update `remark-parse` to v7

* fix `link` title and  `inlineCode`

* fix `code` meta

* fix code meta

* fix ListItem print

* fix heading print result

* remove blank line before childList

* trim `inlineCode` ast

* use List.spread

* use ListItem.spread

* fix `example-550.md` snap

* update `example-522.md` snap

* update `example-508.md` snap

* update `example-509.md` snap

* update `example-222.md` snap

* Update listitem print

* lower case definition.label to match ast

* trim definition.label to match ast

* trim definition.label to match ast

* unescape Link.title

* filter link with no title

* fix link title

* fix link title

* restore preprocess

* fix ast massage

* Restore list

* Update to remark-parse 8.0.2

* Update snapshot tests after rebase

* Create legacy `loose` attribute from `spread`

Uses @duailibe's suggestion from here:
https://github.com/prettier/prettier/issues/6180#issuecomment-499498432

Also backtracks some other unnecessary changes.

* Update test case for shortcut reference-style links

The commonmark spec does not allow for whitespace between the left and right
parts of a full reference-style link.

https://spec.commonmark.org/dingus/?text=%5Bfoo%5D%20%5Bbar%5D%0A%0A%5Bbar%5D%3A%20%2Furl%20%22title%22%0A

Notice that the `[foo]` is parsed as plain text, while the `[bar]` is parsed
as a shortcut reference link.

When there is a space between the two, each part is parsed as a separate
shortcut style reference link node:

https://astexplorer.net/#/gist/d69f5a227e2cbde3f43f0a639bee165c/822b531c252c162faba78e38607db73ef72886d5

Previously they would have been parsed as a single full reference link.

Here I update the test-case to account for the shortcut style links.

* Add remark-footnotes plugin to replace legacy footnotes option

Remark removed the footnotes option in favor of a new remark-footnotes
plugin in https://github.com/remarkjs/remark/pull/483

Here I've simply switched to use the plugin instead of the removed
option and updated the snapshot tests.

* Add test case for #4369

* Do not add gap if has leading space

* Restore `inlineCode` ast compare

* Restore `isPrevNodeLooseListItem`

* Ignore some ast property

* Restore blank line, Fix `isPrevNodeLooseListItem` check

* Title compare

* Ignore `loose`

* Fix footnoteDefinition

* Fix tabWidth

* Style

* `footnoteDefinition` is stable now

* Fix `_` after link

* Revert workaround, url tests

* Fix idempotence issue with underscores and autolinks

* Fix idempotence issue with underscores and autolinks - attempt # 2

* Fix idempotence issue with underscores and autolinks - attempt # 3

* Fix idempotence issue with underscores and autolinks - part # 4

* More tests

* Code style

* Only test master passed tests

* Update list

* Update list

* Use code as test name

* Fix idempotence issue with underscores and autolinks - part # 5

* Fix idempotence issue with underscores and autolinks - part # 6

* Linting fix

* More autolink tests

* Fix tests

* Rename to `auto-link`

* More tests

* Disable new cases

* tests for issue 4122

* add changelog

Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-06-23 13:52:50 +03:00
dependabot[bot] 46f0491f6f Build(deps-dev): Bump @rollup/plugin-node-resolve from 8.0.1 to 8.1.0 (#8622) 2020-06-23 10:21:27 +00:00
dependabot[bot] 7a17747e29 Build(deps): Bump @typescript-eslint/typescript-estree (#8623) 2020-06-23 09:40:22 +00:00
dependabot[bot] 071b78d8c2 Build(deps-dev): Bump @rollup/plugin-babel from 5.0.3 to 5.0.4 (#8625) 2020-06-23 09:39:34 +00:00
dependabot[bot] 96c3bcfe36 Build(deps-dev): Bump eslint from 7.3.0 to 7.3.1 (#8624) 2020-06-23 06:07:54 +00:00
Georgii Dolzhykov b42abbc99f website: remove dependencies shared with root package.json (#8618) 2020-06-22 14:05:28 +03:00
Georgii Dolzhykov e2e72154d6 Add a disclaimer about non-standard syntax (#8613) 2020-06-22 13:25:33 +03:00
dependabot[bot] 00d123f876 Build(deps-dev): Bump @babel/preset-env in /website (#8617)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.10.2 to 7.10.3.
- [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.10.3/packages/babel-preset-env)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 12:49:11 +03:00
dependabot[bot] 00ec200f63 Build(deps-dev): Bump rollup from 2.17.1 to 2.18.0 (#8615) 2020-06-22 08:39:30 +00:00
dependabot[bot] eed0252dd9 Build(deps): Bump linguist-languages from 7.9.0 to 7.10.0 (#8616)
Bumps [linguist-languages](https://github.com/ikatyang/linguist-languages) from 7.9.0 to 7.10.0.
- [Release notes](https://github.com/ikatyang/linguist-languages/releases)
- [Commits](https://github.com/ikatyang/linguist-languages/compare/v7.9.0...v7.10.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 11:27:46 +03:00
dependabot[bot] bad79a2e74 Build(deps-dev): Bump @babel/preset-env from 7.10.2 to 7.10.3 (#8607) 2020-06-22 07:59:17 +00:00
dependabot[bot] a02f2214a7 Build(deps-dev): Bump @babel/core from 7.10.2 to 7.10.3 (#8605)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.2 to 7.10.3.
- [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.10.3/packages/babel-core)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 15:10:15 +08:00
dependabot[bot] 361ac3bc94 Build(deps): Bump @babel/code-frame from 7.10.1 to 7.10.3 (#8606)
Bumps [@babel/code-frame](https://github.com/babel/babel/tree/HEAD/packages/babel-code-frame) from 7.10.1 to 7.10.3.
- [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.10.3/packages/babel-code-frame)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 00:38:10 +03:00
dependabot[bot] d7340db7e0 Build(deps): Bump @babel/parser from 7.10.2 to 7.10.3 (#8608)
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.10.2 to 7.10.3.
- [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.10.3/packages/babel-parser)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 03:27:01 +09:00
Sosuke Suzuki 02137069a7 JavaScript: Break ternary expressions containing a multi-line block comment (#8592)
* Break ternary expression when there is multiline block comment

* Add changelog
2020-06-21 17:02:58 +09:00
dependabot[bot] 9bfa139b41 Build(deps-dev): Bump eslint from 7.2.0 to 7.3.0 (#8609) 2020-06-21 05:38:23 +00:00
fisker Cheung b9ea67f32a Fix: resolving to incorrect config in getFileInfo() (#8585) 2020-06-19 22:28:27 +08:00
dependabot[bot] 1257a7e17d Build(deps-dev): Bump webpack-cli from 3.3.11 to 3.3.12 in /website (#8596)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 3.3.11 to 3.3.12.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/v3.3.12/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/v3.3.11...v3.3.12)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-19 22:08:21 +08:00
dependabot[bot] c275686e58 Build(deps): Bump actions/checkout from v2.3.0 to v2.3.1 (#8599)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-19 22:08:10 +08:00
dependabot[bot] 9608364e2f Build(deps-dev): Bump rollup from 2.16.1 to 2.17.1 (#8598)
Bumps [rollup](https://github.com/rollup/rollup) from 2.16.1 to 2.17.1.
- [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.16.1...v2.17.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-19 16:15:46 +03:00
dependabot[bot] 276c4d8a67 Build(deps-dev): Bump terser-webpack-plugin from 3.0.5 to 3.0.6 (#8597)
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v3.0.5...v3.0.6)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-19 16:14:28 +03:00
fisker 37ee440092 Simplify #8600 2020-06-19 15:38:57 +08:00
fisker 1f12b2dc2b Fix #8600 2020-06-19 15:25:47 +08:00
fisker Cheung 3ac8e4a4dc Add bundle size check for dependabot (#8600) 2020-06-19 14:43:02 +08:00
fisker Cheung a4e5f2053d Fix cli --file-info bug (#8586)
* Fix cli `--file-info` bug

* Add changelog

* Update pr-8586.md
2020-06-18 18:18:19 +03:00
fisker Cheung 8a4d9a242b Switch json-stable-stringify to fast-json-stable-stringify (#8590) 2020-06-18 18:15:06 +03:00
Simon Lydell 9184743081 Quote and unquote number keys (#8508)
* Quote and unquote number keys

* Add changelog entry

* Add tests for escapes

* Fix idempotency

* Only run flow-repo/ tests with flow

271 jsfmt.spec.js in flow-repo use only the flow parser.
18 use flow and babel.
Now, all of them use only flow.

* Don’t unquote negative numbers

* Don’t quote/unquote numbers in TypeScript

* Quote BigInt

* Fix AST check

* Fix condition

* Fix BigInt to string

* Fix ESLint not recognizing BigInt

* Only quote/unquote “simple” numbers

* No need to clean BigIntLiteral anymore

* Add tests for 1. and .1

* Fix 1. and .1

* Remove unnecessary babel-ts from tests

* Only unquote numbers for babel

* Update changelog
2020-06-18 18:13:25 +03:00
fisker Cheung eb6ff31c26 Docs: Update resolveConfigFile usage example (#6873) 2020-06-18 20:09:10 +08:00
dependabot[bot] 9ff0009a79 Build(deps): Bump @glimmer/syntax from 0.53.0 to 0.54.0 (#8587)
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases)
- [Changelog](https://github.com/glimmerjs/glimmer-vm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/glimmerjs/glimmer-vm/compare/v0.53.0...v0.54.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-18 14:39:20 +03:00
Boyen Vaesen 4009ecf70d Fix: Prettier breaks code when inline number lists are used as arbitrary arguments [SCSS] (#8566) 2020-06-18 12:12:31 +03:00
fisker Cheung dc185c8f43 Remove codecov from package.json (#8583) 2020-06-17 16:11:50 +03:00
fisker Cheung 8999cc7811 Format Vue SFC root blocks (#8465) 2020-06-17 19:18:29 +08:00
fisker Cheung fbf0beb716 Fix inferredParser when calling getFileInfo() with resolveConfig: true (#8551) 2020-06-17 18:47:56 +08:00
dependabot[bot] 11d0f4203e Build(deps): Bump actions/setup-node from v1 to v2.0.0 (#8573)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v1 to v2.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...e434342e4e324065b1b19b24586c710a1a68d2d7)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-17 13:25:14 +03:00
dependabot[bot] b6500f4720 Build(deps): Bump actions/checkout from v2 to v2.3.0 (#8575)
Bumps [actions/checkout](https://github.com/actions/checkout) from v2 to v2.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...b4483adec309c0d01a5435c5e24eb40de5773ad9)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-17 13:22:54 +03:00
dependabot[bot] 898a827c78 Build(deps): Bump codecov/codecov-action from v1 to v1.0.7 (#8574)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1 to v1.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...f532c3a1452359a7f96c37efc741537b80555c74)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-17 13:22:41 +03:00
fisker Cheung e54d4fc01a Do not inferParser for ignored files (#8548) 2020-06-17 13:49:52 +08:00
fisker Cheung 89698e825b Migrate to native dependabot (#8543) 2020-06-17 10:50:33 +08:00