sails-generate-eslintrc
Advanced tools
Comparing version
@@ -16,3 +16,3 @@ #!/usr/bin/env node | ||
program | ||
.version('1.2.2') | ||
.version('1.2.3') | ||
.option('-m, --mode <string>', | ||
@@ -19,0 +19,0 @@ 'Set mode for .eslintrc-sails: append, override.' + |
@@ -70,3 +70,3 @@ var fs = require('fs'); | ||
eslintConfigFileName + | ||
' and set google as default coding style(yes/no): ', | ||
' and set ' + presetCodeStyle + ' as default coding style(yes/no): ', | ||
establishEslintrc); | ||
@@ -73,0 +73,0 @@ } |
{ | ||
"name": "sails-generate-eslintrc", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "generate eslint config file which contains sails's globals", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -68,9 +68,18 @@ # sails-generate-eslintrc | ||
+ Run: | ||
* You need run it under project root path in command line | ||
* When you run it first:You can run it under project root path in command line.It will add [sails] and object under ['api/controllers', 'api/models', 'api/services'] | ||
``` | ||
sails-generate-eslintrc #add default globals and folders | ||
sails-generate-eslintrc -g sails -f api/models -m override | ||
sails-generate-eslintrc | ||
``` | ||
* When you want to append some globals: | ||
``` | ||
sails-generate-eslintrc -g sails -f api/models -m append | ||
``` | ||
* When you want to override config file with globals given by paramters: | ||
``` | ||
sails-generate-eslintrc -g sails -f api/models -m append | ||
``` | ||
- install in project path | ||
@@ -88,1 +97,8 @@ + Install: | ||
``` | ||
## Tips | ||
- extend: google | ||
+ If you want to use google or others as coding style, you may have to install: | ||
``` | ||
npm install eslint-config-google | ||
``` |
13011
4.2%102
17.24%