File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 3535 "prepublish" : " gulp build"
3636 },
3737 "dependencies" : {
38+ "babel-eslint" : " ^6.1.2" ,
3839 "babel-plugin-syntax-class-properties" : " ^6.5.0" ,
3940 "babel-plugin-syntax-flow" : " ^6.5.0" ,
4041 "babel-plugin-transform-flow-strip-types" : " ^6.7.0" ,
4445 "glob" : " ^7.0.5" ,
4546 "gulp-babel" : " ^6.1.2" ,
4647 "gulp-beautify" : " ^2.0.0" ,
48+ "gulp-eslint" : " ^3.0.1" ,
4749 "gulp-filter" : " ^4.0.0" ,
4850 "gulp-tap" : " ^0.1.3" ,
4951 "insight" : " ~0.8.3" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import babelStream from 'gulp-babel';
1313import beaufityStream from 'gulp-beautify' ;
1414import tap from 'gulp-tap' ;
1515import filter from 'gulp-filter' ;
16+ import eslint from 'gulp-eslint' ;
1617import semver from 'semver' ;
1718
1819export class Generator extends Base {
@@ -485,6 +486,8 @@ export class Generator extends Base {
485486 babelPlugins . push ( 'babel-plugin-transform-flow-strip-types' ) ;
486487 }
487488
489+ const genDir = path . join ( __dirname , '../../' ) ;
490+
488491 let jsFilter = filter ( [ 'client/**/*.js' ] , { restore : true } ) ;
489492 this . registerTransformStream ( [
490493 jsFilter ,
@@ -523,6 +526,15 @@ export class Generator extends Base {
523526 "wrap_attributes_indent_size" : 4 ,
524527 "end_with_newline" : true
525528 } ) ,
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+ } ) ,
526538 jsFilter . restore
527539 ] ) ;
528540
Original file line number Diff line number Diff line change 175175 "new-parens": 2, //disallow the omission of parentheses when invoking a constructor with no arguments
176176 "newline-after-var": 0, //require or disallow an empty newline after variable declarations
177177 "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
179182 "no-array-constructor": 2, //disallow use of the Array constructor
180183 "no-bitwise": 0, //disallow use of bitwise operators
181184 "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';<% } %>
1414import uiBootstrap from 'angular-ui-bootstrap' ; < % } % >
1515// import ngMessages from 'angular-messages';
1616< % _ if ( filters . auth ) { _ % >
17- //import ngValidationMatch from 'angular-validation-match';<% } %>
17+ // import ngValidationMatch from 'angular-validation-match';<% } %>
1818
1919
2020import { routeConfig } from '. / app . config ';
@@ -35,7 +35,6 @@ import socket from '../components/socket/socket.service';<% } %>
3535import './app.< %= styleExt % > ';
3636
3737angular.module('< %= scriptAppName % > ', [
38- // ngAnimate,
3938 ngCookies,
4039 ngResource,
4140 ngSanitize,
@@ -47,9 +46,7 @@ angular.module('<%= scriptAppName %>', [
4746 uiRouter,< % } _ % >
4847 < % _ if ( filters . uibootstrap ) { % >
4948 uiBootstrap,< % } % >
50- // ngMessages,
5149 < % _ if ( filters . auth ) { % >
52- // ngValidationMatch,
5350 _Auth,
5451 account,
5552 admin,< % } _ % >
You can’t perform that action at this time.
0 commit comments