Add YAML file extensions to pre-commit hooks config (#5182)

- Prettier support YAML but pre-commit hook was not checking those
  files so added file extensions to hooks config.
- Used double-quoted flow scalar style to make the list of file
  extensions easier to read. Backslash for regex needed escaping and
  backslash each line to prevent YAML including spaces.
- Added alternative markdown file extensions.
master
Calum Lind 2018-11-01 16:21:51 +00:00 committed by Ika
parent cce4a2683a
commit b8ebcd910c
1 changed files with 15 additions and 6 deletions

View File

@ -1,6 +1,15 @@
- id: prettier
name: prettier
entry: prettier --write
language: node
# From https://github.com/prettier/prettier/blob/7a7eb170/docs/index.md
files: \.(css|less|scss|ts|tsx|graphql|gql|json|js|jsx|md)$
- id: prettier
name: prettier
entry: prettier --write
language: node
files: "\\.(\
css|less|scss\
|graphql|gql\
|js|jsx\
|json\
|md|markdown|mdown|mkdn\
|mdx\
|ts|tsx\
|vue\
|yaml|yml\
)$"