Commit Graph
214 Commits
Author SHA1 Message Date
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
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
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
Georgii Dolzhykov ea70396a05 Fix lost adjacent JSX when using Babel (#6881)
Bump @babel/parser to 7.7.3. Otherwise Prettier formats "<a/><b/>" to "<a/ >;".
2019-11-08 22:31:31 +01:00
fisker Cheung 91c5235a3f Show invalid config filename in error message (#6865) 2019-11-08 15:51:51 +03:00
Aymeric Bouzy 16f2c97796 Add mongo as a VS Code supported language (#6848)
* Add mongo as a VS Code supported language

* updated Changelog

* fix spellcheck error

* fix tests
2019-11-06 16:57:49 +02:00
Zaven MuradyanandSimon Lydell 3d52ab7016 Gracefully handle nonexistent paths passed to --stdin-filepath. (#6687)
Co-authored-by: Simon Lydell <simon.lydell@gmail.com>
2019-11-02 15:56:26 +01:00
Anders KaseorgandSimon Lydell 0acc3120ef cli: Handle errors when reading stdin (#6708)
Co-authored-by: Simon Lydell <simon.lydell@gmail.com>
2019-11-02 13:53:13 +01:00
Dang Mai f6bd59dfd3 Allow plugin to specify option with type string (#6219) 2019-11-02 09:52:49 +01:00
fisker Cheung 159566798d Move multiple-patterns tests to patterns (#6777) 2019-11-01 18:02:34 +01:00
Kai Cataldo df45e12c5c API: add resolveConfig option to getFileInfo() (#6666)
* Add useConfig option to getFileInfo()

* useConfig -> resolveConfig
2019-10-23 13:56:59 +02:00
fisker Cheung 4750b1c25a Fix an expired todo test (#6665)
* Fix a expired todo test

* only check TypeError

* Throw a specific TypeError

* fix async expect

* use return
2019-10-16 15:09:39 +02:00
Evilebot Tnawi 6d4d6a7599 revert: --only-changed argument (#6594) 2019-10-03 11:21:05 -03:00
fisker Cheung 5ce16eaa02 Update linguist-languages to v7 (#6367)
* Update linguist-languages to v7

* Trigger build

* Update

* replace `includes` with `indexOf`

* fix `exclude`

* add `nodejs` back
2019-09-14 00:57:16 +03:00
Jack Bates af3084a63f Plugins can have falsy default options (#6348) 2019-09-12 18:52:48 +03:00
Jack Bates 38450587fe Delete .config.json.swp (#6363) 2019-08-08 15:02:47 +03:00
kamilic 7d0175ca90 feat: implement --vue-indent-script-and-style mentioned at pr-#… (#6157)
* feat: implement --vue-indent-script-and-style mentioned at pr-#6077

* docs: --vue-indent-script-and-style

* update new test case

* feat: playground for --vue-indent-script-and-style

* chores: Revert package.json version

* Remove noisy snapshots
2019-08-01 11:06:12 +02:00
Gabriel Harel 6fae09b67e Add --only-changed flag to CLI (#5910) 2019-07-22 11:17:24 -03:00
James Reggio 353b2ca064 Config should not be evaluated for ignored files (#6233)
Prior to this change, the CLI would resolve the config for a file before
checking it against the ignored list. If the config was invalid, the CLI
would report a failure.

This change relocates the config-resolution phase until after the file
is confirmed to not be ignored.
2019-06-18 17:20:47 -03:00
Lucas Duailibe 448328270d Support overrides for dotfiles (#6194) 2019-06-07 09:45:56 -03:00
Lucas Duailibe 2a298a3815 Fix plugin resolution tests 2019-05-24 14:23:07 -03:00
Lucas Duailibe 3e00fbad78 Add empty .prettierrc to project root (#6125) 2019-05-15 12:25:22 -03:00
Adrian Zgorzałek 7c9823fcba Teach prettier/graphql about formatting fragment variables. (#6016)
Fragment variables are an experimental extension to GraphQL schema.
Formatting should follow the same rules as formatting an OperationDefinition node,
hence code is the same.
2019-04-04 09:44:52 -03:00
Lucas Azzola f32b289032 Support shared Prettier configuration (#5963)
* Support external configuration

* Document changes

* Update existing snapshots

* Update existing snapshots (2)

* Fix typo in docs

* Add example config repo
2019-03-13 09:34:51 +11:00
Hugo Alliaume b38319740a feat: autoload plugins that are located in `@*/prettier-plugin-* (#5945)
* add tests

* implement the feature

* update docs

* update changelog

* typo
2019-03-10 20:34:04 +11:00
Lucas Azzola f526c47b1e Add an option to modify when Prettier quotes object properties (#5934)
* Implement quote-props=preserve

* Implement quote-props=consistent

* Add tests

* Enable quoteProps in playground

* Add documentation

* Cache objectHasStringProp calculations

* Fixup changelog
2019-03-06 20:33:08 +11:00
Julien Marchand ed1db90c68 Honor stdin-filepath when outputting error messages. (#5878) 2019-02-20 08:39:25 -05:00
Maël Nison 9793154833 Tweak the plugin directory search (#5819)
* Update load-plugins.js

* Update load-plugins.js

* Adds a test

* Fixes lint
2019-02-05 07:47:55 -05:00
Lucas Azzola 2982dcd897 Fixup getSupportInfo for babylon parser prior to 1.16.0 (#5826)
This undoes an accidental breaking change where `prettier.getSupportInfo('1.0.0')` would report supporting the `babel` parser instead of `babylon`.

Fixes #5822
2019-02-03 21:57:59 +11:00
Nathan Totten a093bb3f7b Adds LWC Parser to support unquoted interop attributes (#5800)
This pull requests adds a new parser option `lwc`. This is the same as the HTML parser, but it adds support for unquoted HTML attributes per the needs of LWC. See: #5627
2019-02-01 13:58:50 +08:00
Alexander Kachkaev 36aeb4ce4f Fix CI detection to avoid unwanted TTY behavior (#5804) 2019-01-30 14:08:03 +08:00
Ika a9fd8e2cf4 fix(api): do not report the same deprecation warning more than once (#5774)
A quick fix for suppressing duplicate deprecation warnings.
2019-01-20 15:38:19 +08:00
Wenlu Wang 1dea4ef6f2 fix: allow plugin instance (#5760) (#5763) 2019-01-18 12:40:18 -02:00
Ika 7c4cebeaa5 feat: add babel-flow (#5685) 2018-12-29 21:35:47 +08:00
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Alexander Kachkaev 711c6d78a8 Add --check option (#5629) 2018-12-19 22:03:30 +08:00
Ika 952bc0cc03 fix: get rid of CRLF (#5494) 2018-12-08 18:28:29 +08:00
Laurin Quast 9d1fb93e86 feat: add mjml extension to html language (#5505) 2018-12-07 21:01:40 +08:00
Ika 3fcf69a7d5 fix(api): normalize file path for getFileInfo (#5570) 2018-11-29 11:04:44 +08:00
Ika 99a3efaa7a fix: update editorconfig-to-prettier (#5550) 2018-11-26 13:08:52 +08:00
evelyn masso e12cd17be2 ensure --list-different + --write reports status code 0 (#5512)
* change exit code for list different and write

* update existing tests
2018-11-23 10:42:29 -05:00
Danny McCormick 18b03a31cc Fix tests for Windows and add Azure Pipelines for cross platform CI (#5410)
* Add azure pipelines

* Add gitattributes

* Updating tests to work on Windows or Unix

* Lint

* Cleaning up

* Fixing names

* Clean up naming

* try to consolidate images

* Clean up

* Add back txt to gitattributes
2018-11-14 07:55:50 -05:00
Ika 2bb95d8924 fix(markdown): handle CRLF correctly (#5414) 2018-11-11 00:24:37 +08:00
Ika b0b5460e8f feat(cli): allow overriding (#5390) 2018-11-10 00:59:59 +08:00