Skip to content

Commit

Permalink
Merge pull request #1 from reggev/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
hosseinmd authored Jun 24, 2020
2 parents eda15c0 + 1dd9385 commit e07c172
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,21 @@ npm i prettier-plugin-jsdoc --save
yarn add prettier-plugin-jsdoc
```

3. Set "parser" value in Prettier options (.prettierrc etc) to "jsdoc-parser"
3. add a parser override to your prettier file for js files
```.prettierrc.js
module.exports = {
arrowParens: 'avoid', // or any other config you have
overrides: [
{
files: '*.js',
options: {
parser: 'jsdoc-parser',
},
},
],
};
```
**avoid setting the parser value on the root of your config file, it will disable prettier's default behavior and will not parse non-js files**

## Examples

Expand Down

0 comments on commit e07c172

Please sign in to comment.