Skip to content

Commit

Permalink
fix: support editorconfig (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
azz authored Feb 11, 2018
1 parent 741d8fc commit de790a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ For example `pretty-quick --since HEAD` will format only staged files.

## Configuration and Ignore Files

`pretty-quick` will respect your [`.prettierrc`](https://prettier.io/docs/en/configuration) and [`.prettierignore`](https://prettier.io/docs/en/ignore#ignoring-files) files, so there's no additional setup required. Configuration files will be found by searching up the file system. `.prettierignore` files are only found from the working directory that the command was executed from.
`pretty-quick` will respect your [`.prettierrc`](https://prettier.io/docs/en/configuration), [`.prettierignore`](https://prettier.io/docs/en/ignore#ignoring-files), and [`.editorconfig`](http://editorconfig.org/) files, so there's no additional setup required. Configuration files will be found by searching up the file system. `.prettierignore` files are only found from the working directory that the command was executed from.
2 changes: 1 addition & 1 deletion src/formatFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { join } from 'path';
export default (directory, files, { config, onWriteFile } = {}) => {
for (const relative of files) {
const file = join(directory, relative);
const options = resolveConfig.sync(file, { config });
const options = resolveConfig.sync(file, { config, editorconfig: true });
const input = readFileSync(file, 'utf8');
const output = format(
input,
Expand Down

0 comments on commit de790a7

Please sign in to comment.