Skip to content

Commit

Permalink
build(deps): replace jshint and jscs with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelo-portugal authored and mportuga committed Oct 6, 2022
1 parent ff38146 commit 54fd91d
Show file tree
Hide file tree
Showing 11 changed files with 2,225 additions and 2,424 deletions.
141 changes: 141 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"env": {
"browser": true,
"jasmine": true
},
"globals": {
"angular": false,
"browser": false,
"_": false,
"$": false,
"jQuery": false,
"process": false,
"require": false,
"jasmine": false,
"after": false,
"afterEach": false,
"before": false,
"beforeEach": false,
"afterAll": false,
"console": false,
"dump": false,
"describe": false,
"fdescribe": false,
"expect": false,
"inject": false,
"it": false,
"fit": false,
"module": false,
"debugger": false,
"DocumentTouch": false,
"runs": false,
"waits": false,
"waitsFor": false,
"xit": false,
"xdescribe": false,
"spyOn": false
},
"rules": {
"comma-dangle": [
2,
"never"
],
"curly": [
2,
"all"
],
"dot-notation": 0,
"eol-last": 2,
"eqeqeq": 0,
"key-spacing": [
1,
{
"afterColon": true
}
],
"keyword-spacing": [
2,
{}
],
"linebreak-style": [
2,
"unix"
],
"new-cap": [
2,
{
"newIsCap": false
}
],
"no-caller": 2,
"no-cond-assign": [
2,
"except-parens"
],
"no-debugger": 2,
"no-eq-null": 1,
"no-implicit-coercion": [
2,
{
"boolean": false,
"string": true,
"number": false
}
],
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"no-undef": 2,
"no-unused-expressions": [
2,
{
"allowShortCircuit": true
}
],
"no-unused-vars": 0,
"no-use-before-define": 0,
"no-with": 2,
"semi": [
1,
"always"
],
"space-before-blocks": [
2,
"always"
],
"space-before-function-paren": [
2,
{
"anonymous": "ignore",
"named": "never"
}
],
"spaced-comment": [
2,
"always"
],
"space-infix-ops": 1,
"space-unary-ops": [
1,
{
"nonwords": true,
"overrides": {
"typeof": false,
"++": false,
"--": false,
"+": false,
"-": false,
"~": false,
"!": false
}
}
],
"wrap-iife": [
2,
"any"
],
"yoda": [
2,
"never"
]
}
}
37 changes: 0 additions & 37 deletions .jscs.json

This file was deleted.

4 changes: 2 additions & 2 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Thanks for considering contributions to the ui-grid project. This doc will give you a jump start on the development standards we use.

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

<br>
Expand Down Expand Up @@ -396,7 +396,7 @@ Deployment to http://ui-grid.info/ is done automatically when pushed to ui-grid
function (uiGridCellNavService, $log){
instead of
function(uiGridCellNavService,$log){
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!)
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!)
5. Module names should follow Angular's camelcase format, e.g. "resizeColumns", not "resize-columns".
# CSS
Expand Down
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = function(grunt) {
ngtemplates: 'grunt-angular-templates',
changelog: 'grunt-conventional-changelog',
shell: 'grunt-shell-spawn',
jscs: 'grunt-jscs',
protractor: 'grunt-protractor-runner',
'stable-version': './lib/grunt/plugins.js',
'current-version': './lib/grunt/plugins.js',
Expand Down
2 changes: 1 addition & 1 deletion grunt/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function (grunt, options) {
// register before and after test tasks so we don't have to change cli
// options on the CI server
'before-test': [
'clean', 'newer:jshint', 'newer:jscs', 'ngtemplates', 'less', 'copy:font_dist','copy:packages_dist'
'clean', 'shell:lint', 'ngtemplates', 'less', 'copy:font_dist','copy:packages_dist'
], // Have to run less so CSS files are present
'after-test': ['build'],
'default': ['before-test', 'test:single', 'after-test'],
Expand Down
8 changes: 0 additions & 8 deletions grunt/jscs.js

This file was deleted.

72 changes: 0 additions & 72 deletions grunt/jshint.js

This file was deleted.

3 changes: 3 additions & 0 deletions grunt/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ module.exports = function() {
async: true
}
},
lint: {
command: 'npm run lint'
},
'protractor-install': {
command: 'node ' + webdriverManagerPath + ' update'
},
Expand Down
6 changes: 3 additions & 3 deletions grunt/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module.exports = function( grunt, options ){
// list of files to watch, and tasks to run if those files change

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

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

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

protractor: {
Expand Down
Loading

0 comments on commit 54fd91d

Please sign in to comment.