Skip to content

Commit de790a7

Browse files
authored
fix: support editorconfig (#20)
1 parent 741d8fc commit de790a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ For example `pretty-quick --since HEAD` will format only staged files.
9494

9595
## Configuration and Ignore Files
9696

97-
`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.
97+
`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.

src/formatFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { join } from 'path';
55
export default (directory, files, { config, onWriteFile } = {}) => {
66
for (const relative of files) {
77
const file = join(directory, relative);
8-
const options = resolveConfig.sync(file, { config });
8+
const options = resolveConfig.sync(file, { config, editorconfig: true });
99
const input = readFileSync(file, 'utf8');
1010
const output = format(
1111
input,

0 commit comments

Comments
 (0)