Skip to content

Commit

Permalink
Fix config loading priority
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Apr 15, 2022
1 parent 0ba6e5b commit 56039dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ If there are multiple configuration files in the same directory, Nano Staged wil
6. `nano-staged.mjs`
7. `.nano-staged.json`
8. `nano-staged.json`
9. `package.json`
9. `.nanostagedrc`
10. `package.json`

### Config Function API:

Expand Down
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const places = [
`nano-staged.mjs`,
`.nano-staged.json`,
`nano-staged.json`,
'package.json',
`.nanostagedrc`,
'package.json',
]

async function readConfig(path) {
Expand Down

0 comments on commit 56039dd

Please sign in to comment.