Skip to content

Commit 9774940

Browse files
committed
updated README
1 parent 0508770 commit 9774940

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prettier Eslint Webpack Plugin
22

3-
Webpack 2.* plugin for [prettier-eslint](https://github.com/kentcdodds/prettier-eslint) which ESLint's settings is set to [JavaScript Standard Style](http://standardjs.com/)
3+
Webpack 2.* plugin for [prettier-eslint](https://github.com/kentcdodds/prettier-eslint)
44

55
## Install
66
```
@@ -12,10 +12,18 @@ yarn add prettier-eslint-webpack-plugin
1212

1313
| *key* | *type* | *description* | *default* |
1414
|------------|-----------------|----------------------------------------------|-----------------|
15-
| encoding | string | Encoding to use when reading / writing files | 'utf-8' |
16-
| extensions | array | Only process these file extensions | ['.js', '.jsx'] |
15+
| encoding | ?String | Encoding to use when reading / writing files | 'utf-8' |
16+
| extensions | ?Array | Only process these file extensions | ['.js', '.jsx'] |
1717

18-
Furthermore the entire [prettier-eslint](https://github.com/kentcdodds/prettier-eslint#options) API is exposed in the exact same way.
18+
Furthermore the entire [prettier-eslint](https://github.com/kentcdodds/prettier-eslint#options) API is exposed:
19+
20+
| *key* | type | *description* | *default* |
21+
|-----------------|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
22+
| filePath | ?String | The path of the file being formatted can be used in leu of eslintConfig (eslint will be used to find the relevant config for the file). | undefined |
23+
| eslintConfig | ?Object | The config to use for formatting with ESLint. If this is provided, then filePath is not necessary. | [JavaScript Standard Style](http://standardjs.com/) |
24+
| prettierOptions | ?Object | The options to pass for formatting with prettier. If not provided, prettier-eslint will attempt to create the options based on the eslintConfig (whether that's provided or derived via filePath). You can also provide some of the options and have the remaining options derived via your eslint config. This is useful for options like parser. | undefined |
25+
| logLevel | ?Enum: ['trace', 'debug', 'info', 'warn', 'error', 'silent'] | prettier-eslint does quite a bit of logging if you want it to. Pass this to set the amount of logs you want to see. | process.env.LOG_LEVEL || 'warn' |
26+
| eslintPath | ?String | By default, prettier-eslint will try to find the relevant eslint (and prettier) module based on the filePath. If it cannot find one, then it will use the version that prettier-eslint has installed locally. If you'd like to specify a path to the eslint module you would like to have prettier-eslint use, then you can provide the full path to it with the eslintPath option. | undefined |
1927

2028
### Example
2129

@@ -34,7 +42,7 @@ module.exports = {
3442
plugins: {
3543
...
3644
new PrettierEslintPlugin({
37-
encoding: 'utf-16',
45+
encoding: ['utf-16'],
3846
extensions: '.jsf00',
3947
eslintConfig: eslintConfig,
4048
logLevel: 'trace',
@@ -51,14 +59,12 @@ module.exports = {
5159
## Pull requests
5260
Welcome
5361

54-
## Roadmap:
55-
* Add Flow type support
56-
5762
### Inspiration
5863
* [prettier-eslint](https://github.com/kentcdodds/prettier-eslint)
5964
* [prettier-webpack-plugin](https://github.com/hawkins/prettier-webpack-plugin)
6065
* [eslint-config-standard](https://github.com/feross/eslint-config-standard)
6166

6267
### Licence
6368

64-
MIT. Copyright (c) Daniël Terwiel
69+
MIT.
70+
Copyright (c) Daniël Terwiel

0 commit comments

Comments
 (0)