@@ -10,34 +10,29 @@ Install ESLint and `@origin-1/eslint-plugin`:
1010npm i --save-dev eslint @origin-1/eslint-plugin
1111```
1212
13- ### Note
14-
15- If you installed ESLint globally (using the ` -g ` flag) then you must also install plugins globally:
16-
17- ``` console
18- npm i -g @origin-1/eslint-plugin
19- ```
20-
2113## Usage
2214
23- Add ` "@origin-1" ` to the ` "plugins" ` section of your ` .eslintrc ` configuration file.
24- Then configure the rules defined by this plugin under the ` "rules" ` section.
15+ Add ` "@origin-1" ` to the ` plugins ` section of a configuration object in your ESLint configuration
16+ file.
17+ Then configure the rules defined by this plugin under the ` rules ` section.
18+
19+ ``` js
20+ import origin1 from " @origin-1/eslint-plugin" ;
2521
26- ``` json
22+ export default
2723{
28- "plugins" : [
29- " @origin-1"
30- ],
31- "rules" : {
32- "@origin-1/bracket-layout" : " error" ,
33- "@origin-1/indent" : " error" ,
34- "@origin-1/nice-space-before-function-paren" : " error" ,
35- "@origin-1/no-extra-new" : " error" ,
36- "@origin-1/no-spaces-in-call-expression" : " error" ,
37- "@origin-1/no-spaces-in-tagged-template" : " error" ,
38- "@origin-1/property-colon-spacing" : " error"
24+ plugins: { " @origin-1" : origin1 },
25+ rules:
26+ {
27+ " @origin-1/bracket-layout" : " error" ,
28+ " @origin-1/indent" : " error" ,
29+ " @origin-1/nice-space-before-function-paren" : " error" ,
30+ " @origin-1/no-extra-new" : " error" ,
31+ " @origin-1/no-spaces-in-call-expression" : " error" ,
32+ " @origin-1/no-spaces-in-tagged-template" : " error" ,
33+ " @origin-1/property-colon-spacing" : " error"
3934 }
40- }
35+ };
4136```
4237
4338## Rules
0 commit comments