Skip to content

Commit

Permalink
Merge pull request #32 from amrsekilly/patch-1
Browse files Browse the repository at this point in the history
Fix a bug in the configuration example
  • Loading branch information
usmanyunusov authored May 11, 2022
2 parents d8c27ea + 146a29e commit 99e1aff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ JS config files may export export either a single function or an object:

```js
export default (api) => {
const jsFiles = api.files.filter((file) => path.extname(file) === '.js')
const jsFiles = api.filenames.filter((file) => path.extname(file) === '.js')

return [`eslint --fix ${jsFiles.join(' ')}`, `prettier --write ${jsFiles.join(' ')}`]
}
```

```js
export default {
'*.js': (api) => `eslint --fix ${api.files.join(' ')}`,
'*.js': (api) => `eslint --fix ${api.filenames.join(' ')}`,
}
```

Expand Down

0 comments on commit 99e1aff

Please sign in to comment.