eslint-plugin-prettier

€5.33
0 ratings

eslint-plugin-prettier Build Status

Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.

Sample

error: Insert `,` (prettier/prettier) at pkg/commons-atom/ActiveEditorRegistry.js:22:25:

20 | import {

21 | observeActiveEditorsDebounced,

> 22 | editorChangesDebounced

| ^

23 | } from './debounced';;

24 |

25 | import {observableFromSubscribeFunction} from '../commons-node/event';

error: Delete `;` (prettier/prettier) at pkg/commons-atom/ActiveEditorRegistry.js:23:21:

21 | observeActiveEditorsDebounced,

22 | editorChangesDebounced

> 23 | } from './debounced';;

| ^

24 |

25 | import {observableFromSubscribeFunction} from '../commons-node/event';

26 | import {cacheWhileSubscribed} from '../commons-node/observable';

2 errors found.

./node_modules/.bin/eslint --format codeframe pkg/commons-atom/ActiveEditorRegistry.js (code from nuclide).

Installation

npm install --save-dev eslint-plugin-prettier

npm install --save-dev --save-exact prettier

eslint-plugin-prettier does not install Prettier or ESLint for you. You must install these yourself.

Then, in your .eslintrc.json:

{

"plugins": ["prettier"],

"rules": {

"prettier/prettier": "error"

}

}

I want this!
Size
39.4 KB
€5.33

eslint-plugin-prettier

0 ratings
I want this!