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.
- `--debug-benchmark` uses `benchmark` module to produce statistically significant time measurements.
- `--debug-repeat` uses a naive loop and measures just the average run time, but useful for profiling to highlight hot functions.
* Don't default parser to babylon
* Different default values according to version
* Fix error logging
* Add tests specifically for parser inference
* Add another test case
* Add API test
* Implement prettier.getFileInfo() method and --file-info CLI option
* Add empty line between functions in index.js
* Support --plugin-search-dirs / pluginSearchDirs() in --file-info / getFileInfo()
* Address review comments by @ikatyang
* Fix plugin API in globally installed Prettier and introduce optional --plugin-search-dir
* Use find-parent-dir instead of find-up and test autoloading (with mocked fn)
* Add two test cases where --plugin-search-dir is not .
* Do not mutate pluginSearchDirs argument in load-plugins.js
* Do not test automatic plugin resolution as mocking of "find-parent-dir" does not work due to rollup
* Document --plugin-search-dir / pluginSearchDirs and improve spacing
* Address @ikatyang's review comments
* Fix require path for third-party
* Undo alphabetic sorting of third-party scripts
* refactor(cli): defer default value applying
* Allow plugins to override default options
* Move "defaultOptions" to top level of plugin
* Simplify implementation
* Attach plugin name
* Add pluginOptions to cli help
* Update snapshots
* Code review (immutable style)
* Add test for help output
* Use snapshot test, fix Object.assign
* Refactor to immutable style
* Add test case for automatic plugin resolution
* Add tests for applying and overriding default opts
* Remove "since" option
* Only set defaults for CLI args when no pluginDefaults are present
* Revert workaround, rebase to #4045
* Add basic documentation for `options` and `defaultOptions`
* refactor(cli-constant): use supportOptions
* refactor(options): use supportOptions
* refactor(cli-util): use supportOptions
* fix: do not infer parser in multiparser
* chore: remove unnecessary package
* chore: trigger another travis build
* test: add kebab-case test to ensure no regression
* test: update snapshots
* Allow Plugins to preprocess text
* Actually pull up text
* Always expect the preprocessor to set the text
* Add tests for preprocessing
* Remove unused variable
* feat(glimmer): initial HTML/Handlebars/Glimmer support
* feat(glimmer): support un-escaped mustache expressions
* fix(glimmer): add 'as |foo|' syntax
* fix(glimmer): support {{foo bar}} syntax
* feat(glimmer): implement all AST types
* feat(glimmer): implement if/else if/else
* test(glimmer): ignore leading/trailing whitespace from AST_COMPARE
* fix(glimmer): do not use trailing slash for void self-closing elements
* chore(build): disable html tests until we can sort out the glimmer dependency
* feat(html): complete rebase on parse5 addition
* Prettier Support For Glimmer VM/Handlebars
Polished Support for Sub Expressions
Added test cases for glimmer primitives
Added support for concat statements
Attempted to make element nodes work
Attempted block statements
Element Nodes are OK
Added support for block elements that are not else-if related
Added support for Else/If
Cleaning up
Rebase
Switch node 4 syntax
Update build
* Removed dead code/partials
* Added new lines to end of test files.
* Rebase after plugin change
* Added ignores to code coverage
* Split up comment printing
* Refactor plugin handling
* Allow multiparser to use options normalization
* Rename to canAttachComment
* Add inline comment
* Format code
* Use prettier.__debug to get AST