Skip to content

Commit 54fd91d

Browse files
marcelo-portugalmportuga
authored andcommittedOct 6, 2022
build(deps): replace jshint and jscs with eslint
1 parent ff38146 commit 54fd91d

11 files changed

+2225
-2424
lines changed
 

‎.eslintrc.json

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"jasmine": true
5+
},
6+
"globals": {
7+
"angular": false,
8+
"browser": false,
9+
"_": false,
10+
"$": false,
11+
"jQuery": false,
12+
"process": false,
13+
"require": false,
14+
"jasmine": false,
15+
"after": false,
16+
"afterEach": false,
17+
"before": false,
18+
"beforeEach": false,
19+
"afterAll": false,
20+
"console": false,
21+
"dump": false,
22+
"describe": false,
23+
"fdescribe": false,
24+
"expect": false,
25+
"inject": false,
26+
"it": false,
27+
"fit": false,
28+
"module": false,
29+
"debugger": false,
30+
"DocumentTouch": false,
31+
"runs": false,
32+
"waits": false,
33+
"waitsFor": false,
34+
"xit": false,
35+
"xdescribe": false,
36+
"spyOn": false
37+
},
38+
"rules": {
39+
"comma-dangle": [
40+
2,
41+
"never"
42+
],
43+
"curly": [
44+
2,
45+
"all"
46+
],
47+
"dot-notation": 0,
48+
"eol-last": 2,
49+
"eqeqeq": 0,
50+
"key-spacing": [
51+
1,
52+
{
53+
"afterColon": true
54+
}
55+
],
56+
"keyword-spacing": [
57+
2,
58+
{}
59+
],
60+
"linebreak-style": [
61+
2,
62+
"unix"
63+
],
64+
"new-cap": [
65+
2,
66+
{
67+
"newIsCap": false
68+
}
69+
],
70+
"no-caller": 2,
71+
"no-cond-assign": [
72+
2,
73+
"except-parens"
74+
],
75+
"no-debugger": 2,
76+
"no-eq-null": 1,
77+
"no-implicit-coercion": [
78+
2,
79+
{
80+
"boolean": false,
81+
"string": true,
82+
"number": false
83+
}
84+
],
85+
"no-mixed-spaces-and-tabs": 2,
86+
"no-trailing-spaces": 2,
87+
"no-undef": 2,
88+
"no-unused-expressions": [
89+
2,
90+
{
91+
"allowShortCircuit": true
92+
}
93+
],
94+
"no-unused-vars": 0,
95+
"no-use-before-define": 0,
96+
"no-with": 2,
97+
"semi": [
98+
1,
99+
"always"
100+
],
101+
"space-before-blocks": [
102+
2,
103+
"always"
104+
],
105+
"space-before-function-paren": [
106+
2,
107+
{
108+
"anonymous": "ignore",
109+
"named": "never"
110+
}
111+
],
112+
"spaced-comment": [
113+
2,
114+
"always"
115+
],
116+
"space-infix-ops": 1,
117+
"space-unary-ops": [
118+
1,
119+
{
120+
"nonwords": true,
121+
"overrides": {
122+
"typeof": false,
123+
"++": false,
124+
"--": false,
125+
"+": false,
126+
"-": false,
127+
"~": false,
128+
"!": false
129+
}
130+
}
131+
],
132+
"wrap-iife": [
133+
2,
134+
"any"
135+
],
136+
"yoda": [
137+
2,
138+
"never"
139+
]
140+
}
141+
}

‎.jscs.json

-37
This file was deleted.

‎DEVELOPER.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Thanks for considering contributions to the ui-grid project. This doc will give you a jump start on the development standards we use.
66

77
# Running Dev Server
8-
Grunt task dev will run jshint, compile less, run fontella, run unit tests, run protractor tests, and start a local
8+
Grunt task dev will run eslint, compile less, run fontella, run unit tests, run protractor tests, and start a local
99
webserver on port 9003. A watch is started to rerun all the tasks if any source file changes.
1010

1111
<br>
@@ -396,7 +396,7 @@ Deployment to http://ui-grid.info/ is done automatically when pushed to ui-grid
396396
function (uiGridCellNavService, $log){
397397
instead of
398398
function(uiGridCellNavService,$log){
399-
4. jshint rules are enforced. run 'grunt dev --no-e2e' to see if your code passes (the --no-e2e switch turns off end-to-end testing, which can making development slow. You should still run e2e tests before you push commits!)
399+
4. eslint rules are enforced. run 'grunt dev --no-e2e' to see if your code passes (the --no-e2e switch turns off end-to-end testing, which can making development slow. You should still run e2e tests before you push commits!)
400400
5. Module names should follow Angular's camelcase format, e.g. "resizeColumns", not "resize-columns".
401401
402402
# CSS

‎Gruntfile.js

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = function(grunt) {
2323
ngtemplates: 'grunt-angular-templates',
2424
changelog: 'grunt-conventional-changelog',
2525
shell: 'grunt-shell-spawn',
26-
jscs: 'grunt-jscs',
2726
protractor: 'grunt-protractor-runner',
2827
'stable-version': './lib/grunt/plugins.js',
2928
'current-version': './lib/grunt/plugins.js',

‎grunt/aliases.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function (grunt, options) {
66
// register before and after test tasks so we don't have to change cli
77
// options on the CI server
88
'before-test': [
9-
'clean', 'newer:jshint', 'newer:jscs', 'ngtemplates', 'less', 'copy:font_dist','copy:packages_dist'
9+
'clean', 'shell:lint', 'ngtemplates', 'less', 'copy:font_dist','copy:packages_dist'
1010
], // Have to run less so CSS files are present
1111
'after-test': ['build'],
1212
'default': ['before-test', 'test:single', 'after-test'],

‎grunt/jscs.js

-8
This file was deleted.

‎grunt/jshint.js

-72
This file was deleted.

‎grunt/shell.js

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ module.exports = function() {
1515
async: true
1616
}
1717
},
18+
lint: {
19+
command: 'npm run lint'
20+
},
1821
'protractor-install': {
1922
command: 'node ' + webdriverManagerPath + ' update'
2023
},

‎grunt/watch.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module.exports = function( grunt, options ){
55
// list of files to watch, and tasks to run if those files change
66

77
gruntfile: {
8-
files: ['<%= jshint.gruntfile.src %>', 'grunt/*.js'],
9-
tasks: ['jshint:gruntfile', 'uidocs-generator']
8+
files: ['packages/*/src/**/*.js', 'packages/*/test/**/*.spec.js', 'test/**/*.spec.js', 'grunt/*.js'],
9+
tasks: ['shell:lint', 'uidocs-generator']
1010
},
1111

1212
ngtemplates: {
@@ -17,7 +17,7 @@ module.exports = function( grunt, options ){
1717

1818
rebuild: {
1919
files: util.testFiles.unit,
20-
tasks: ['jshint:src_test', 'jscs', 'karmangular:run', 'concat', 'uglify', 'uidocs-generator'],
20+
tasks: ['shell:lint', 'karmangular:run', 'concat', 'uglify', 'uidocs-generator'],
2121
},
2222

2323
protractor: {

0 commit comments

Comments
 (0)