From 78782f92b1fb0868218dc3463a3fc61dd5e70cfc Mon Sep 17 00:00:00 2001 From: Keith Smith Date: Sat, 17 Oct 2020 00:21:56 -0600 Subject: [PATCH] fix: update docs on supported config file extensions (#917) * allow .cjs files for ESModule based packages * trailing comma * adds all supported file extensions to README * a bit clearer on supported files --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bb71c1e51..ab550d0ac 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,11 @@ Options: Starting with v3.1 you can now use different ways of configuring it: - `lint-staged` object in your `package.json` -- `.lintstagedrc` file in JSON or YML format -- `lint-staged.config.js` file in JS format +- `.lintstagedrc` file in JSON or YML format, or you can be explicit with the file extension: + - `.lintstagedrc.json` + - `.lintstagedrc.yaml` + - `.lintstagedrc.yml` +- `lint-staged.config.js`, `.lintstagedrc.js`, or `.lintstagedrc.cjs` file in JS format - Pass a configuration file using the `--config` or `-c` flag See [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for more details on what formats are supported.