Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.58 KB

prettier.md

File metadata and controls

43 lines (32 loc) · 1.58 KB

Prettier Extension

Task Definitions: None
Template Definitions: 'prettier'
Batcher Definitions: None

Applies Prettier to the current project, rewriting the project files. Caching is handled by Prettier (--cache --cache-strategy metadata).

Prettier Template

Template Options

  • auto-install (Boolean, default: true): Whether to automatically install prettier if not present (using the npm extension). The global npm extension auto-install option will take precedence here if not otherwise set.
  • check (Boolean, default: false): Whether to run a Prettier check run.
  • config (String): Custom Prettier configuration.
  • files (String): Files to apply Prettier to. Defaults to all project files.
  • ignorePath (String): Path to .prettierignore (or otherwise named) file.
  • loglevel (String): "debug", "error", "log" (default), "silent" or "warn
  • no-error-on-unmatched-pattern (Boolean, default: false): Disable errors for unmatches patterns in the files string provided.
  • write (Boolean, default: true): Whether to write the updated source files.

Example

chompfile.toml

version = 0.1

extensions = ['[email protected]:prettier']

[[task]]
name = 'prettier'
template = 'prettier'
deps = ['src/**/*', 'docs/**/*.md']
[task.template-options]
ignore-path = '.prettierignore'
files = 'src/**/*.@(js|json|yml) docs/**/*.md'
loglevel = 'warn'
config = '.prettierrc'

Ejection

When ejecting the template, only the Prettier compilation CLI command will be ejected, without auto installation.