Permalink
Browse files

Replace JSHint with ESLint

  • Loading branch information...
jodal committed Oct 7, 2018
1 parent c5787c6 commit 6cec1fc5f46095b53693a76871eb673926bba73f
Showing with 639 additions and 194 deletions.
  1. +12 −0 .eslintrc.js
  2. +1 −23 Gruntfile.js
  3. +8 −0 __tests__/.eslintrc.js
  4. +17 −10 jest.config.js
  5. +4 −2 package.json
  6. +597 −159 yarn.lock
@@ -0,0 +1,12 @@
module.exports = {
env: {
"shared-node-browser": true
},
extends: "airbnb-base",
globals: {
document: true
},
rules: {
"no-underscore-dangle": "off"
}
};
@@ -30,26 +30,6 @@ module.exports = function (grunt) {
}
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
indent: 4,
latedef: true,
newcap: true,
noarg: true,
sub: true,
quotmark: "double",
undef: true,
unused: true,
eqnull: true,
browser: true,
devel: true,
globals: {}
},
files: "<%= meta.files.own %>"
},
uglify: {
options: {
banner: "<%= meta.banner %>"
@@ -66,12 +46,10 @@ module.exports = function (grunt) {
}
});
grunt.registerTask("test", ["jshint"]);
grunt.registerTask("build", ["test", "browserify:dist", "uglify"]);
grunt.registerTask("build", ["browserify:dist", "uglify"]);
grunt.registerTask("default", ["build"]);
grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
};
@@ -0,0 +1,8 @@
module.exports = {
env: {
jest: true,
},
rules: {
"no-new": "off",
},
};
@@ -1,12 +1,19 @@
module.exports = {
projects: [
{
displayName: "Browser tests",
testEnvironment: "jsdom",
},
{
displayName: "Node tests",
testEnvironment: "node",
},
],
projects: [
{
displayName: "Browser tests",
testEnvironment: "jsdom",
testMatch: ["<rootDir>/__tests__/**/*.test.js"],
},
{
displayName: "Node tests",
testEnvironment: "node",
testMatch: ["<rootDir>/__tests__/**/*.test.js"],
},
{
displayName: "ESLint",
runner: "jest-runner-eslint",
testMatch: ["<rootDir>/src/**/*.js", "<rootDir>/__tests__/**/*.js"],
},
],
};
@@ -45,13 +45,15 @@
},
"devDependencies": {
"browserify": "~3.46.1",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0",
"grunt": "~0.4.5",
"grunt-browserify": "~1.3.2",
"grunt-cli": "~0.1.13",
"grunt-contrib-jshint": "~0.11.0",
"grunt-contrib-uglify": "~0.7.0",
"grunt-contrib-watch": "~0.6.1",
"jest": "^23.6.0"
"jest": "^23.6.0",
"jest-runner-eslint": "^0.6.0"
},
"engines": {
"node": "*"
Oops, something went wrong.

0 comments on commit 6cec1fc

Please sign in to comment.