|
/Users/marcelo.portugal/WebstormProjects/eslint-detailed-reporter/fixture/angular-rules/greet-user.component.js
0 problems
|
|
/Users/marcelo.portugal/WebstormProjects/eslint-detailed-reporter/fixture/angular-rules/greetUserDirective.js
5 problems (5 errors, 0 warnings)
|
Line |
Source |
Error |
Row 1, Column 1: "Based on the Component-First Pattern, you should avoid the use of controllers"
angular/no-controller
|
Error |
Row 1, Column 1: "There may be at most 1 AngularJS component per file, but found 2"
angular/component-limit
|
1 |
angular.module('myApp') |
2 |
.controller('GreetUserController', function GreetUserController($scope) { |
3 |
var users = [{name:'world'}, {name:'earth'}, {name:'planet'}, {name:'mars'}]; |
4 |
|
5 |
findFirstUser(); |
6 |
|
7 |
function findFirstUser() { |
Error |
Row 8, Column 13: "You should not set properties on $scope in controllers. Use controllerAs syntax and add data to "this""
angular/controller-as
|
Error |
Row 8, Column 35: "Prefer '_.map' over the native function."
lodash/prefer-lodash-method
|
8 |
$scope.user = _.first(users.map(function(user) { |
9 |
return user.name; |
10 |
})); |
11 |
} |
12 |
}) |
13 |
.directive('greetUser', function(){ |
Error |
Row 14, Column 9: "Directive should be implemented with the component method."
angular/prefer-component
|
14 |
return { |
15 |
restrict: 'E', |
16 |
replace: true, |
17 |
template: '<h1>Hello, {{user}}!</h1>', |
18 |
controller: 'GreetUserController' |
19 |
}; |
20 |
}); |
Severity |
Rule |
Error |
Row 1, Column 1: "Based on the Component-First Pattern, you should avoid the use of controllers"
angular/no-controller
|
Error |
Row 1, Column 1: "There may be at most 1 AngularJS component per file, but found 2"
angular/component-limit
|
Error |
Row 8, Column 13: "You should not set properties on $scope in controllers. Use controllerAs syntax and add data to "this""
angular/controller-as
|
Error |
Row 8, Column 35: "Prefer '_.map' over the native function."
lodash/prefer-lodash-method
|
Error |
Row 14, Column 9: "Directive should be implemented with the component method."
angular/prefer-component
|
|
|
/Users/marcelo.portugal/WebstormProjects/eslint-detailed-reporter/fixture/green_file.js
0 problems
|
|
/Users/marcelo.portugal/WebstormProjects/eslint-detailed-reporter/fixture/orange_file.js
11 problems (5 errors, 6 warnings)
|
Line |
Source |
1 |
'use strict'; |
2 |
|
Error |
Row 3, Column 10: "'addOne' is defined but never used."
no-unused-vars
|
3 |
function addOne(i) { |
Warning |
Row 4, Column 3: "Expected indentation of 4 spaces but found 2."
indent
|
Error |
Row 4, Column 7: "Use the isNaN function to compare with NaN."
use-isnan
|
4 |
if (i != NaN) { |
Warning |
Row 5, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Error |
Row 5, Column 12: "Unexpected space before unary operator '++'."
space-unary-ops
|
Warning |
Row 5, Column 16: "Missing semicolon."
semi
|
5 |
return i ++ |
Warning |
Row 6, Column 10: "Unnecessary 'else' after 'return'."
no-else-return
|
6 |
} else { |
Warning |
Row 7, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Error |
Row 7, Column 5: "Expected a return value."
consistent-return
|
Warning |
Row 7, Column 11: "Missing semicolon."
semi
|
7 |
return |
8 |
} |
Error |
Row 9, Column 2: "Unnecessary semicolon."
no-extra-semi
|
9 |
}; |
10 |
|
Severity |
Rule |
Error |
Row 3, Column 10: "'addOne' is defined but never used."
no-unused-vars
|
Warning |
Row 4, Column 3: "Expected indentation of 4 spaces but found 2."
indent
|
Error |
Row 4, Column 7: "Use the isNaN function to compare with NaN."
use-isnan
|
Warning |
Row 5, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Error |
Row 5, Column 12: "Unexpected space before unary operator '++'."
space-unary-ops
|
Warning |
Row 5, Column 16: "Missing semicolon."
semi
|
Warning |
Row 6, Column 10: "Unnecessary 'else' after 'return'."
no-else-return
|
Warning |
Row 7, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Error |
Row 7, Column 5: "Expected a return value."
consistent-return
|
Warning |
Row 7, Column 11: "Missing semicolon."
semi
|
Error |
Row 9, Column 2: "Unnecessary semicolon."
no-extra-semi
|
|
|
/Users/marcelo.portugal/WebstormProjects/eslint-detailed-reporter/fixture/red_file.js
5 problems (5 errors, 0 warnings)
|
Line |
Source |
1 |
'use strict'; |
2 |
|
Error |
Row 3, Column 10: "'addOne' is defined but never used."
no-unused-vars
|
3 |
function addOne(i) { |
Error |
Row 4, Column 9: "Use the isNaN function to compare with NaN."
use-isnan
|
4 |
if (i != NaN) { |
Error |
Row 5, Column 16: "Unexpected space before unary operator '++'."
space-unary-ops
|
5 |
return i ++; |
6 |
} |
Error |
Row 7, Column 5: "Expected a return value."
consistent-return
|
7 |
return; |
Error |
Row 8, Column 2: "Unnecessary semicolon."
no-extra-semi
|
8 |
}; |
9 |
|
Severity |
Rule |
Error |
Row 3, Column 10: "'addOne' is defined but never used."
no-unused-vars
|
Error |
Row 4, Column 9: "Use the isNaN function to compare with NaN."
use-isnan
|
Error |
Row 5, Column 16: "Unexpected space before unary operator '++'."
space-unary-ops
|
Error |
Row 7, Column 5: "Expected a return value."
consistent-return
|
Error |
Row 8, Column 2: "Unnecessary semicolon."
no-extra-semi
|
|
|
/Users/marcelo.portugal/WebstormProjects/eslint-detailed-reporter/fixture/yellow_file.js
6 problems (0 errors, 6 warnings)
|
Line |
Source |
1 |
'use strict'; |
2 |
|
3 |
function addOne(i) { |
Warning |
Row 4, Column 3: "Expected indentation of 4 spaces but found 2."
indent
|
4 |
if (!isNaN(i)) { |
Warning |
Row 5, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Warning |
Row 5, Column 15: "Missing semicolon."
semi
|
5 |
return i++ |
Warning |
Row 6, Column 10: "Unnecessary 'else' after 'return'."
no-else-return
|
6 |
} else { |
Warning |
Row 7, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Warning |
Row 7, Column 15: "Missing semicolon."
semi
|
7 |
return NaN |
8 |
} |
9 |
} |
10 |
|
11 |
exports.addOne = addOne; |
12 |
|
Severity |
Rule |
Warning |
Row 4, Column 3: "Expected indentation of 4 spaces but found 2."
indent
|
Warning |
Row 5, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Warning |
Row 5, Column 15: "Missing semicolon."
semi
|
Warning |
Row 6, Column 10: "Unnecessary 'else' after 'return'."
no-else-return
|
Warning |
Row 7, Column 5: "Expected indentation of 6 spaces but found 4."
indent
|
Warning |
Row 7, Column 15: "Missing semicolon."
semi
|
|