Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
replaced jscs with eslint
  • Loading branch information
Eric Miller committed Dec 18, 2020
commit b9755b7ca752331ed7a3b19ffe063c21bacaa36f
24 changes: 5 additions & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,11 @@ grunt.initConfig( {
}
}
},

jscs: {
ui: {
options: {
config: true
},
files: {
src: [ "demos/**/*.js", "build/**/*.js", "ui/**/*.js" ]
}
eslint:{
options: {
configFile: "eslint.json"
},
tests: {
options: {
config: true,
maximumLineLength: null
},
files: {
src: [ "tests/**/*.js" ]
}
}
target:["demos/**/*.js", "build/**/*.js", "ui/**/*.js"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't follow the jQuery code style with regards to spacing; doesn't ESLint verify it?

},
uglify: minify,
htmllint: {
Expand Down Expand Up @@ -508,7 +494,7 @@ grunt.registerTask( "update-authors", function() {

grunt.registerTask( "default", [ "lint", "requirejs", "test" ] );
grunt.registerTask( "jenkins", [ "default", "concat" ] );
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ] );
grunt.registerTask( "lint", [ "asciilint", "jshint", "eslint", "csslint", "htmllint" ] );
grunt.registerTask( "test", [ "qunit" ] );
grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ] );
grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ] );
Expand Down
24 changes: 24 additions & 0 deletions eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": "eslint:recommended",
Copy link
Copy Markdown
Member

@mgol mgol Feb 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI should use the jQuery config, similarly as jQuery itself does.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure we can get away from using the standardized eslint configuration file

"env": {
"amd": true,
"browser": true
},
"globals": {
"jQuery": true,
"process": true,
"module": true,
"Buffer": true,
"Globalize": true
},
"rules":{
"no-constant-condition": 1,
"no-control-regex" : 0,
"no-empty": 1,
"no-mixed-spaces-and-tabs": 1,
"no-redeclare": 0,
"no-shadow-restricted-names": 1,
"no-unexpected-multiline": 1,
"no-useless-escape": 1
}
}
Comment thread
PseudoNinja marked this conversation as resolved.
Outdated
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
"jquery": ">=1.8.0 <4.0.0"
},
"devDependencies": {
"bufferutil": "^4.0.2",
"commitplease": "3.2.0",
"core-js": "^3.8.1",
"glob": "7.1.6",
"grunt": "1.3.0",
"grunt-bowercopy": "1.2.5",
"grunt-cli": "1.3.2",
"grunt-compare-size": "0.4.2",
"grunt-contrib-concat": "1.0.1",
Expand All @@ -61,12 +62,14 @@
"grunt-contrib-qunit": "4.0.0",
"grunt-contrib-requirejs": "1.0.0",
"grunt-contrib-uglify": "5.0.0",
"grunt-eslint": "^23.0.0",
"grunt-git-authors": "3.2.0",
"grunt-html": "14.2.0",
"grunt-jscs": "2.1.0",
"load-grunt-tasks": "5.1.0",
"minimatch": "^3.0.2",
"rimraf": "3.0.2",
"testswarm": "1.1.2"
"testswarm": "1.1.2",
"utf-8-validate": "^5.0.3"
},
"keywords": []
}