Skip to content

Commit c005318

Browse files
JSHint → ESLint (#279)
1 parent 82b2b39 commit c005318

11 files changed

Lines changed: 42 additions & 11 deletions

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
docs
2+
js-test/check-ts-compilation.*
3+
js-test/test-bundle.js
4+
net
5+
node_modules

.eslintrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"globals": {
3+
"define": false,
4+
"module": false,
5+
"require": false
6+
},
7+
"rules": {
8+
"eqeqeq": [ "error", "allow-null" ],
9+
"no-undef": "error",
10+
"no-unused-expressions": "error",
11+
"no-unused-vars": "error",
12+
"strict": [ "error", "safe" ]
13+
}
14+
}

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ build_script:
2121

2222
test_script:
2323
- npm run eclint
24-
- npm run jshint
24+
- npm run eslint
2525

2626
- npm i --no-save "devextreme@~16.2.0"
2727
- npm run karma

build/.eslintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"parserOptions": {
6+
"ecmaVersion": 6
7+
}
8+
}

build/make-nojquery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// jshint esversion:6, node:true
1+
"use strict";
22

33
const fs = require("fs");
44
const path = require("path");

build/replace-meta.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// jshint node:true, esversion:6
2-
31
"use strict";
42

53
const fs = require("fs");
@@ -20,7 +18,7 @@ const REPO_NAME = process.argv[4];
2018
let META_VERSION_NUMERIC = "99.0.0";
2119
let META_VERSION_FULL;
2220

23-
if(REPO_NAME == MAIN_REPO_NAME && /^v?(([.\d]+)[\w-]*)$/.test(TAG)) {
21+
if(REPO_NAME === MAIN_REPO_NAME && /^v?(([.\d]+)[\w-]*)$/.test(TAG)) {
2422
META_VERSION_FULL = RegExp.$1;
2523
META_VERSION_NUMERIC = RegExp.$2;
2624
} else if(BUILD_NUMBER) {

js-test/ie-stubs.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint-env browser */
2+
/* eslint strict: off */
3+
14
if(!Object.setPrototypeOf)
25
Object.setPrototypeOf = function() { };
36

js-test/karma.conf.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* eslint-env node */
2+
3+
"use strict";
4+
15
module.exports = function(config) {
26
var options = {
37
basePath: "",

js-test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// jshint strict: true, browser: true, undef: true, unused: true, eqeqeq: true
2-
/* global ASPNET_DATA_SCRIPT, DevExpress, define, module, Promise, require */
1+
/* eslint-env browser */
2+
/* global ASPNET_DATA_SCRIPT:false, DevExpress:false, Promise:false */
33

44
(function(factory) {
55
"use strict";

js/dx.aspnet.data.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// https://github.com/DevExpress/DevExtreme.AspNet.Data
22
// Copyright (c) Developer Express Inc.
33

4-
// jshint strict: true, undef: true, unused: true, eqeqeq: true
5-
/* global DevExpress, jQuery, define, module, require */
4+
/* global DevExpress:false, jQuery:false */
65

76
(function(factory) {
87
"use strict";

0 commit comments

Comments
 (0)