File tree 3 files changed +24
-27
lines changed
3 files changed +24
-27
lines changed Original file line number Diff line number Diff line change 1
- /* jshint node: true */
2
- 'use strict' ;
3
-
4
- var Command = require ( 'ember-cli/lib/models/command' ) ;
5
- var LintTask = require ( '../tasks/lint' ) ;
1
+ import * as Command from 'ember-cli/lib/models/command' ;
2
+ import * as LintTask from '../tasks/lint' ;
6
3
7
4
module . exports = Command . extend ( {
8
5
name : 'lint' ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import * as Promise from 'ember-cli/lib/ext/promise' ;
2
+ import * as Task from 'ember-cli/lib/models/task' ;
3
+ import * as chalk from 'chalk' ;
4
+ import { exec } from 'child_process' ;
5
+
6
+ module . exports = Task . extend ( {
7
+ run : function ( ) {
8
+ var ui = this . ui ;
9
+
10
+ return new Promise ( function ( resolve ) {
11
+ exec ( 'npm run lint' , ( err , stdout ) => {
12
+ ui . writeLine ( stdout ) ;
13
+ if ( err ) {
14
+ ui . writeLine ( chalk . red ( 'Lint errors found in the listed files.' ) ) ;
15
+ } else {
16
+ ui . writeLine ( chalk . green ( 'All files pass linting.' ) ) ;
17
+ }
18
+ resolve ( ) ;
19
+ } ) ;
20
+ } ) ;
21
+ }
22
+ } ) ;
You can’t perform that action at this time.
0 commit comments