mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Replace grunt-eslint with eslint
This commit is contained in:
parent
427d186c86
commit
61462cf57e
@ -1,5 +1,3 @@
|
|||||||
vendor/*
|
modules/default/alert/notificationFx.js
|
||||||
!/vendor/vendor.js
|
modules/default/alert/modernizr.custom.js
|
||||||
!/modules/default/**
|
modules/default/alert/classie.js
|
||||||
!/modules/node_helper
|
|
||||||
!/modules/node_helper/**
|
|
||||||
|
26
Gruntfile.js
26
Gruntfile.js
@ -1,28 +1,7 @@
|
|||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
require("time-grunt")(grunt);
|
require("time-grunt")(grunt);
|
||||||
var fix = (grunt.option("env") || "lint") === "lint";
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
eslint: {
|
pkg: grunt.file.readJSON("package.json"),
|
||||||
options: {
|
|
||||||
fix: fix,
|
|
||||||
configFile: ".eslintrc.json"
|
|
||||||
},
|
|
||||||
target: [
|
|
||||||
"js/*.js",
|
|
||||||
"modules/default/*.js",
|
|
||||||
"modules/default/*/*.js",
|
|
||||||
"serveronly/*.js",
|
|
||||||
"clientonly/*.js",
|
|
||||||
"*.js",
|
|
||||||
"tests/**/*.js",
|
|
||||||
"!modules/default/alert/notificationFx.js",
|
|
||||||
"!modules/default/alert/modernizr.custom.js",
|
|
||||||
"!modules/default/alert/classie.js",
|
|
||||||
"config/*",
|
|
||||||
"translations/translations.js",
|
|
||||||
"vendor/vendor.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
jsonlint: {
|
jsonlint: {
|
||||||
main: {
|
main: {
|
||||||
src: [
|
src: [
|
||||||
@ -39,7 +18,6 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
grunt.loadNpmTasks("grunt-eslint");
|
|
||||||
grunt.loadNpmTasks("grunt-jsonlint");
|
grunt.loadNpmTasks("grunt-jsonlint");
|
||||||
grunt.registerTask("default", ["eslint", "jsonlint"]);
|
grunt.registerTask("default", ["jsonlint"]);
|
||||||
};
|
};
|
||||||
|
@ -13,9 +13,11 @@
|
|||||||
"test:unit": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/unit --recursive",
|
"test:unit": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/unit --recursive",
|
||||||
"test:e2e": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/e2e --recursive",
|
"test:e2e": "NODE_ENV=test ./node_modules/mocha/bin/mocha tests/e2e --recursive",
|
||||||
"test:lint": "grunt --env=test",
|
"test:lint": "grunt --env=test",
|
||||||
|
"text:js": "eslint *.js js/**/*.js modules/default/**/*.js clientonly/*.js serveronly/*.js translations/*.js vendor/*.js tests/**/*.js config/* --config .eslintrc.json",
|
||||||
"test:style": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json",
|
"test:style": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json",
|
||||||
"config:check": "node tests/configs/check_config.js",
|
"config:check": "node tests/configs/check_config.js",
|
||||||
"lint": "grunt --env=lint",
|
"lint": "grunt --env=lint",
|
||||||
|
"lint:js": "eslint *.js js/**/*.js modules/default/**/*.js clientonly/*.js serveronly/*.js translations/*.js vendor/*.js tests/**/*.js config/* --config .eslintrc.json --fix",
|
||||||
"lint:markdown": "markdownlint *.md modules/README.md modules/default/**/*.md --config .markdownlintrc.json",
|
"lint:markdown": "markdownlint *.md modules/README.md modules/default/**/*.md --config .markdownlintrc.json",
|
||||||
"lint:style": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json --fix",
|
"lint:style": "stylelint css/main.css modules/default/**/*.css --config .stylelintrc.json --fix",
|
||||||
"lint:yaml": "yamllint .travis.yml"
|
"lint:yaml": "yamllint .travis.yml"
|
||||||
@ -44,8 +46,7 @@
|
|||||||
"chai-as-promised": "^7.1.1",
|
"chai-as-promised": "^7.1.1",
|
||||||
"current-week-number": "^1.0.7",
|
"current-week-number": "^1.0.7",
|
||||||
"danger": "^3.1.3",
|
"danger": "^3.1.3",
|
||||||
"grunt": "latest",
|
"eslint": "^6.8.0",
|
||||||
"grunt-eslint": "latest",
|
|
||||||
"grunt-jsonlint": "latest",
|
"grunt-jsonlint": "latest",
|
||||||
"http-auth": "^3.2.3",
|
"http-auth": "^3.2.3",
|
||||||
"jsdom": "^11.6.2",
|
"jsdom": "^11.6.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user