Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit cebe349

Browse files
authored
Merge pull request #542 from ficristo/eslint
Switched from JSHint to ESLint
2 parents 09ad447 + 3a2ce2f commit cebe349

18 files changed

Lines changed: 1244 additions & 1286 deletions

.brackets.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"jslint.options": {
3+
"vars": true,
4+
"plusplus": true,
5+
"node": true,
6+
"browser": false,
7+
"devel": true,
8+
"nomen": true,
9+
"indent": 4,
10+
"maxerr": 50,
11+
"regexp": true,
12+
"es5": true
13+
},
14+
"defaultExtension": "js",
15+
"language": {
16+
"javascript": {
17+
"linting.prefer": ["ESLint", "JSLint"],
18+
"linting.usePreferredOnly": true
19+
}
20+
},
21+
"spaceUnits": 4,
22+
"useTabChar": false
23+
}

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Third party modules
2+
**/thirdparty/**

.eslintrc.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"rules": {
6+
"no-bitwise": 2,
7+
"curly": 2,
8+
"eqeqeq": 2,
9+
"guard-for-in": 2,
10+
"wrap-iife": [2, "outside"],
11+
"no-use-before-define": 2,
12+
"new-cap": 2,
13+
"no-caller": 2,
14+
"no-empty": 2,
15+
"no-new": 2,
16+
"no-invalid-regexp": 2,
17+
"no-control-regex": 2,
18+
"no-regex-spaces": 2,
19+
"no-undef": 2,
20+
"strict": 2,
21+
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
22+
"semi": 2,
23+
24+
"no-iterator": 2,
25+
"no-loop-func": 2,
26+
"no-multi-str": 2,
27+
"no-fallthrough": 2,
28+
"no-proto": 2,
29+
"no-script-url": 2,
30+
"no-shadow": 0,
31+
"no-shadow-restricted-names": 2,
32+
"no-new-func": 2,
33+
"no-new-wrappers": 2,
34+
"no-new-require": 2,
35+
"new-parens": 2,
36+
"no-new-object": 2,
37+
"no-invalid-this": 2,
38+
"indent": [2, 4],
39+
40+
"valid-jsdoc": 0,
41+
"valid-typeof": 2,
42+
43+
"no-trailing-spaces": [2, { "skipBlankLines": true }],
44+
"eol-last": 2
45+
}
46+
}

.jshintrc

Lines changed: 0 additions & 75 deletions
This file was deleted.

Gruntfile.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
* DEALINGS IN THE SOFTWARE.
2121
*
2222
*/
23-
/*jslint regexp:true*/
24-
/*global module, require, process*/
25-
module.exports = function (grunt) {
26-
"use strict";
2723

24+
"use strict";
25+
26+
module.exports = function (grunt) {
2827
var common = require("./tasks/common")(grunt),
29-
resolve = common.resolve,
3028
platform = common.platform(),
3129
staging;
3230

@@ -205,10 +203,14 @@ module.exports = function (grunt) {
205203
"dest" : "deps/cef"
206204
}
207205
},
208-
"jshint": {
209-
"all" : ["Gruntfile.js", "tasks/**/*.js"],
206+
"eslint": {
207+
"all" : [
208+
"Gruntfile.js",
209+
"tasks/**/*.js",
210+
"appshell/node-core/*.js"
211+
],
210212
"options": {
211-
"jshintrc" : ".jshintrc"
213+
"quiet" : true
212214
}
213215
},
214216
"build": {
@@ -238,7 +240,7 @@ module.exports = function (grunt) {
238240
});
239241

240242
grunt.loadTasks("tasks");
241-
grunt.loadNpmTasks("grunt-contrib-jshint");
243+
grunt.loadNpmTasks("grunt-eslint");
242244
grunt.loadNpmTasks("grunt-contrib-copy");
243245
grunt.loadNpmTasks("grunt-contrib-clean");
244246
grunt.loadNpmTasks("grunt-curl");

appshell/appshell_extensions.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
// Note: All file native file i/o functions are synchronous, but are exposed
2828
// here as asynchronous calls.
2929

30-
/*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
31-
/*global define, native */
32-
3330
var appshell;
3431
if (!appshell) {
3532
appshell = {};

0 commit comments

Comments
 (0)