Skip to content

Commit cadfbd2

Browse files
committed
docs: update README on configuration formats
1 parent db205ad commit cadfbd2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,37 @@ For example, when passing the `src/` directory and the `extensions` option is
141141

142142
You can disable these default ignores by setting the `noDefaultExensions` option to `true`.
143143

144+
### Configuration Formats
145+
146+
This documentation shows examples of adding configuration to `standard-engine` via the `package.json`. Alternatively, a configuration file can be used. The configuration can be provided as follows:
147+
148+
```js
149+
[
150+
'package.json',
151+
`.pocketlintrc`,
152+
`.pocketlintrc.json`,
153+
`.pocketlintrc.yaml`,
154+
`.pocketlintrc.yml`,
155+
`.pocketlintrc.js`,
156+
`.pocketlintrc.cjs`,
157+
`pocketlint.config.js`,
158+
`pocketlint.config.cjs`,
159+
]
160+
```
161+
162+
Configuration is searched for in the current directory. If configuration is not found, the parent directory is then searched, and so on until the user's home directory is reached. If configuration is still not found, the `XDG_CONFIG_HOME` is then searched for confguration. The configuration in the XDG config directory can be provided as follows:
163+
164+
```js
165+
[
166+
'pocketlint/config',
167+
'pocketlint/config.json',
168+
'pocketlint/config.yaml',
169+
'pocketlint/config.yml',
170+
'pocketlint/config.js',
171+
'pocketlint/config.cjs'
172+
]
173+
```
174+
144175
### Ignoring Files
145176

146177
The paths `node_modules/**`, `*.min.js`, `coverage/**`, hidden files/folders

0 commit comments

Comments
 (0)