File tree 4 files changed +18
-5
lines changed
4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 44
44
"glob" : " ^7.0.5" ,
45
45
"gulp-babel" : " ^6.1.2" ,
46
46
"gulp-beautify" : " ^2.0.0" ,
47
+ "gulp-eslint" : " ^3.0.1" ,
47
48
"gulp-filter" : " ^4.0.0" ,
48
49
"gulp-tap" : " ^0.1.3" ,
49
50
"insight" : " ~0.8.3" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import babelStream from 'gulp-babel';
13
13
import beaufityStream from 'gulp-beautify' ;
14
14
import tap from 'gulp-tap' ;
15
15
import filter from 'gulp-filter' ;
16
+ import eslint from 'gulp-eslint' ;
16
17
import semver from 'semver' ;
17
18
18
19
export class Generator extends Base {
@@ -485,6 +486,8 @@ export class Generator extends Base {
485
486
babelPlugins . push ( 'babel-plugin-transform-flow-strip-types' ) ;
486
487
}
487
488
489
+ const genDir = path . join ( __dirname , '../../' ) ;
490
+
488
491
let jsFilter = filter ( [ 'client/**/*.js' ] , { restore : true } ) ;
489
492
this . registerTransformStream ( [
490
493
jsFilter ,
@@ -523,6 +526,15 @@ export class Generator extends Base {
523
526
"wrap_attributes_indent_size" : 4 ,
524
527
"end_with_newline" : true
525
528
} ) ,
529
+ eslint ( {
530
+ fix : true ,
531
+ configFile : path . join ( genDir , 'templates/app/.eslintrc' ) ,
532
+ env : {
533
+ es6 : true ,
534
+ browser : true ,
535
+ commonjs : true
536
+ }
537
+ } ) ,
526
538
jsFilter . restore
527
539
] ) ;
528
540
Original file line number Diff line number Diff line change 175
175
"new-parens": 2, //disallow the omission of parentheses when invoking a constructor with no arguments
176
176
"newline-after-var": 0, //require or disallow an empty newline after variable declarations
177
177
"newline-before-return": 0, //require newline before return statement
178
- "newline-per-chained-call": 0, //enforce newline after each call when chaining the calls
178
+ "newline-per-chained-call": [
179
+ "error",
180
+ {"ignoreChainWithDepth": 2}
181
+ ], //enforce newline after each call when chaining the calls
179
182
"no-array-constructor": 2, //disallow use of the Array constructor
180
183
"no-bitwise": 0, //disallow use of bitwise operators
181
184
"no-continue": 0, //disallow use of the continue statement
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import uiRouter from 'angular-ui-router';<% } %>
14
14
import uiBootstrap from 'angular-ui-bootstrap' ; < % } % >
15
15
// import ngMessages from 'angular-messages';
16
16
< % _ if ( filters . auth ) { _ % >
17
- //import ngValidationMatch from 'angular-validation-match';<% } %>
17
+ // import ngValidationMatch from 'angular-validation-match';<% } %>
18
18
19
19
20
20
import { routeConfig } from '. / app . config ';
@@ -35,7 +35,6 @@ import socket from '../components/socket/socket.service';<% } %>
35
35
import './app.< %= styleExt % > ';
36
36
37
37
angular.module('< %= scriptAppName % > ', [
38
- // ngAnimate,
39
38
ngCookies,
40
39
ngResource,
41
40
ngSanitize,
@@ -47,9 +46,7 @@ angular.module('<%= scriptAppName %>', [
47
46
uiRouter,< % } _ % >
48
47
< % _ if ( filters . uibootstrap ) { % >
49
48
uiBootstrap,< % } % >
50
- // ngMessages,
51
49
< % _ if ( filters . auth ) { % >
52
- // ngValidationMatch,
53
50
_Auth,
54
51
account,
55
52
admin,< % } _ % >
You can’t perform that action at this time.
0 commit comments