Commit Graph
255 Commits
Author SHA1 Message Date
Kevin Gibbons 22d149b9f6 Add --embedded-language-formatting={auto,off} option (#7875) 2020-04-11 20:22:44 +03:00
fisker CheungandGeorgii Dolzhykov f475a5bd43 Update spellcheck config and scripts (#8012)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-12 01:19:00 +08:00
Robson Roberto Souza Peixoto 5569e3306e Use yaml formatter to format ansible files (#7992)
The Ansible[1] extension define a new language for yaml files that describe
ansible playbooks and because of that is not possible use the prettier
extension with ansible files.

1 - https://marketplace.visualstudio.com/items?itemName=vscoss.vscode-ansible
2020-04-11 18:12:21 +03:00
fisker Cheung aeeb2ff7a8 Throw original error when loading external config (#7973) 2020-04-10 21:27:50 +08:00
fisker Cheung f0207e6850 Enable unicorn/better-regex (#7991)
* Enable `unicorn/better-regex`

* Spellcheck ignore regex
2020-04-10 21:20:40 +08:00
Georgii Dolzhykov aacaf4b2f2 Fix unexpected GitHub Actions failures (#7980) 2020-04-08 02:37:57 +03:00
Georgii Dolzhykov 996d1cbb4f Add please-upgrade-node (#7837) 2020-03-23 03:32:05 +02:00
dependabot-preview[bot]andGeorgii Dolzhykov 6257951386 Bump linguist-languages from 7.8.0 to 7.9.0 (#7809)
* Bump linguist-languages from 7.8.0 to 7.9.0

Bumps [linguist-languages](https://github.com/ikatyang/linguist-languages) from 7.8.0 to 7.9.0.
- [Release notes](https://github.com/ikatyang/linguist-languages/releases)
- [Commits](https://github.com/ikatyang/linguist-languages/commits)

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

* ignore yarn.lock

* update snapshots

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-22 22:57:12 +02:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +02:00
Georgii Dolzhykov 3f1c46373a Expand directories in CLI (2020) (#7660) 2020-03-17 01:34:32 +02:00
Georgii Dolzhykov 1f64401915 remove --stdin (#7668) 2020-02-27 02:19:52 +02:00
Chris Blossom 1f30e18806 fix overrides pattern matching to include dot files (#5813) 2020-02-25 03:25:33 +02:00
fisker Cheung 04012b9dc7 Remove --flow-parser/useFlowParser (#7511) 2020-02-24 19:30:12 +02:00
fisker Cheung 6515a7ebe9 Remove deprecated options (#7536) 2020-02-24 18:58:32 +02:00
fisker Cheung fc8218b5a6 Remove postcss parser (#7535) 2020-02-24 18:58:16 +02:00
fisker Cheung b3f0102a87 Remove babylon parser (#7533)
* Remove `babylon`

* Add changelog

* Fix website files
2020-02-24 18:19:03 +02:00
Georgii Dolzhykov cf3d9f0b80 api: remove the version parameter of getSupportInfo (#7620)
* api: remove the version parameter of getSupportInfo

* add changelog entry

* remove mapDeprecated

* Update pr-7620.md

* remove the first parameter completely

* Update api.md

* add default value for opts just to be on the safe side
2020-02-23 02:47:17 +02:00
fisker Cheung 647c041b57 Check pattern existence before glob (#7587) 2020-02-19 12:57:39 +02:00
fisker CheungandChristopher J. Brody 3cef19c73e Update globby to v11 (#6776)
* globby@10 update (with fast-glob implementation)

with some minor test snapshot updates in tests_integration since
fast-glob does not always keep the same file order as node-glob

* with no `nodir: true` option

use of no `nodir: true` option was introduced in 639c52388
but it does not seem to be needed with some newer
versions of globby

* with workaround for fast-glob on Windows

ref: https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows

Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>

* Revert "with no `nodir: true` option"

This reverts commit f7297cbceebc3d939bca0d90a904a1d3fea45345.

* revert updates to snapshots in tests_integration

* sort the file paths from globby

and update some snapshots in tests_integration

* Update build scripts

* replace `util.promisify` with `pify`

* style

* typo

* add pify to dict

* check index.js

* debug

* exclude `transform-async-to-generator`

* fix `bin-prettier.js`

* restore disabled script

* try depth:1

* remove depth add `./`

* sort dir

* disable expandDirectories

ref: https://github.com/sindresorhus/globby/blob/master/index.js#L95

* use absolute path

* remove sort()

* sort dir

* use `alphasorti` compare

* remove './'

* fix `findPluginsInNodeModules`

* fix `findPluginsInNodeModules`

* restore snap

* fix `findPluginsInNodeModules`

* return early

* code style

* sort

* update snap

* try mem

* mem `loadPlugins` function

* fix

* glob directories instead of package.json

* use deep

* remove mem

* improve speed

* support dot pattern

* expand directories test

* restore import order

* remove snap

* update test

* restore `findPluginsInNodeModules`

* Update `globby`

* `fast-glob` beta

* Restore logic

* Add tests for `globby` update

* Fix tests

* Remove option with default value

* Try new beta version of `fast-glob`

* Restore error info

* Add `path.sep` check
2020-02-18 17:36:22 +02:00
fisker Cheung bf6ceadb8b Add a test with same packageName and fileName (#7517) 2020-02-18 16:36:17 +02:00
Corinne Hoener 50e0ea91ee Respect prettierignore when executed in subdirectories (#7588)
* Respect prettierignore when executed in subdirectories

* Add ignore-in-subdirectories tests

* Add changelog entry
2020-02-18 00:40:26 +02:00
fisker Cheung 5cb59a07d1 Add tests for globby update (#7543) 2020-02-14 01:39:01 +02:00
fisker Cheung 81e8f28156 Fix warning on test (#7566) 2020-02-14 00:14:24 +02:00
fisker Cheunganddependabot-preview[bot] 28e70b6c9b Bump linguist-languages from 7.7.0 to 7.8.0 (#7481)
* Bump linguist-languages from 7.7.0 to 7.8.0

Bumps [linguist-languages](https://github.com/ikatyang/linguist-languages) from 7.7.0 to 7.8.0.
- [Release notes](https://github.com/ikatyang/linguist-languages/releases)
- [Commits](https://github.com/ikatyang/linguist-languages/compare/v7.7.0...v7.8.0)

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

* Bump linguist-languages from 7.7.0 to 7.8.0

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-01-30 19:36:49 +02:00
fisker Cheung 0c93198942 Remove deprecated parser & update sharedUtil (#6993)
* Remove some old stuff

* Add changelog

* Fix test

* util changes

* restore parser

* Fix `util` usage
2020-01-29 17:32:42 +03:00
JounQinandGeorgii Dolzhykov c1937cb1b8 feat: add new parser babel-ts to parse TypeScript syntaxes via Babel (#6400)
* feat: add new parser `babel-ts` to parse TypeScript syntaxes via Babel

* docs: document parser babel-ts

* chore: enable babel-ts in markdown and worker.js

* verify all TS tests against babel-ts except disabled by disableBabelTS

* support for TSDeclareMethod; fix abstract properties and methods

* fix embedded angular templates and styles

* fix TSImportType

* simplify babel options combinations

* fix method decorators

* fix ranges

* work around loc inconsistencies for SequenceExpression

* don't print trailing comma in type parameters (unsupported in TS < 3.3)

* preserve quotes for class properties

* align printing of single-parameter functions

* fix comments in degenerate single-element unions and intersections

* fix comments for methods

* fix comments for mapped types

* edit docs, change 'since' to 2.0.0

* add changelog

* fix code sample on playground

* update snapshots after rebase

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-29 14:11:16 +02:00
Alexander Kachkaev e00ce8c2c8 Change arrowParens to always by default for 2.0 (#7430) 2020-01-29 13:31:25 +02:00
Alexander Kachkaev 1b3a5d3572 Change endOfLine to lf by default for 2.0 (#7435)
* Towards changing default value for endOfLine

* Update tests and snapshots

* Add placeholder for changelog_unreleased

* Add CHANGELOG

* Undo adding snapshot tests for auto as it does not play well on Windows in CI

* Tweak changelog

* Update jest snapshot
2020-01-28 23:35:47 +02:00
Georgii Dolzhykov 6f1ed54206 fix tests on Windows: drive letter case returned by process.cwd() depends on environment (#7409) 2020-01-23 10:34:53 +02:00
fisker Cheung 00d46ee26e Fix prefer-object-spread in /tests* (#7337) 2020-01-19 01:23:16 +02:00
fisker Cheung 02800285a3 Add cli executable test (#7300) 2020-01-15 16:55:08 +02:00
Georgii Dolzhykov 7e3c0c73b3 Merge branch 'master' into next 2020-01-14 20:36:21 +02:00
fisker CheungandGeorgii Dolzhykov d456b158e0 Style: use object destructuring (#7325)
* Style: use object destructuring

* Update versions.js

* Update sync-flow-tests.js

* Update core.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-14 17:30:18 +02:00
fisker Cheung beeaa98cb9 Fix quote style, enable quote rule (#7304) 2020-01-14 13:58:20 +03:00
fisker Cheung 0ffd9a774b Add .editorconfig (#7252) 2020-01-14 13:54:26 +03:00
fisker Cheung 82cc3f3716 Add tests for sharedUtil.getMaxContinuousCount (#7262) 2020-01-13 15:37:59 +03:00
fisker Cheung 656a59a7bf Use shorthand bin (#7264) 2020-01-13 15:17:24 +03:00
fisker CheungandGeorgii Dolzhykov ea23fc5d92 Update cosmiconfig to v6 (#6850)
* Update `cosmiconfig` to v6

* fix changes required

* style

* replace parentModule logic

* fix build script

* fix import-fresh

* fix rebase consequences

* remove babel-plugin-transform-async-to-promises

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-10 03:21:44 +02:00
Lipis 3a96c6d542 Merge branch 'master' into next 2020-01-10 00:41:30 +02:00
Georgii Dolzhykov 9868017749 change version to 2.0.0-dev in package.json 2020-01-10 00:39:06 +02:00
Sosuke Suzuki 76020c3526 Update linguist-languages to support file extensions .cjs and .yaml.sed (#7210)
* Update linguist-language

* Add changelog
2020-01-09 17:15:17 +02:00
fisker Cheung 320c5cca64 Update jest to v24 (#6954)
* Update `jest` to v24

* run test on linux and windows

* fix regexp for macOS

* fix color problem

* restore asserts

* update yarn.lock

* fix status assert
2019-11-19 10:54:57 +02:00
fisker Cheung 791996df7b Set trailingComma default value to es5 (#6963)
* Set `trailingComma` default value to `es5`

* Update `options` documentation

* Update tests

* style

* fix js code style

* change options order

* update tests_integration snap

* disable es5 for __ng_interpolation

* fix angular tests

* fix scss test

* fix `css_trailing_comma` snap

* fix css_scss snapshot
2019-11-18 11:39:12 +01:00
fisker Cheung 57f0dd56dd Replace indexOf with includes (#6967)
* Replace `indexOf` with `includes`

* Add `unicorn/prefer-includes`
2019-11-17 11:06:14 +01:00
Lipis 93c63fde18 Merge branch 'master' into next 2019-11-15 15:50:01 +01:00
fisker Cheung 584fc5920b Update snapshot-diff to v0.6.1 (#6955)
* update `snapshot-diff` to 0.6.1

* update snapshot
2019-11-14 13:14:23 +03:00
Simon Lydell 44b819144b Support string-to-package config in JSON schema: (#6941)
Prettier supports having just a string in the config file to use a
shared config from a package. Example:

    "@company/prettier-config"

But the JSON schema generated by running `node
scripts/generate-schema.js` did not include that possibility.

See https://github.com/SchemaStore/schemastore/pull/855 for more
information.
2019-11-13 17:45:59 +01:00
Simon Lydell 6cba8ceb9e Fix since version for vueIndentScriptAndStyle (#6897)
See #6887.
2019-11-09 12:48:24 +01:00
Simon Lydell 98d27c7de2 Bump Prettier dependency to 1.19.0 2019-11-09 01:14:31 +01:00
Simon Lydell 057e15d50d prettier 1.19.0-beta.1 2019-11-09 01:03:57 +01:00