Niedzielski has uploaded a new change for review. ( )

Change subject: Chore: lint and watch all files

Chore: lint and watch all files

- Change linting to also check JSON files. If we ever add a JSON file
  besides package.json, it's great that it will be required to be valid
  JSON by default. Additionally, files such as webpack.config.js will
  now be prettified and enforced.

- When files change, even package.json, the tests should be retried.
  This patch now observes from the root (less node_modules and .git).

Change-Id: Iece0896521f19093b186ae8ee4467a4c0a859418
A .eslintignore
M package.json
M webpack.config.js
3 files changed, 6 insertions(+), 4 deletions(-)

  git pull ssh:// refs/changes/52/371052/1

diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..178135c
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1 @@
diff --git a/package.json b/package.json
index 9faa5b5..630b8dc 100644
--- a/package.json
+++ b/package.json
@@ -8,12 +8,12 @@
     "dev:server": "NODE_ENV=development nodemon -w dist/client -w src/server/ 
     "prod:build": "NODE_ENV=production webpack -p",
     "format": "npm run lint -s -- --fix",
-    "format:all": "npm run format -s -- '{src,test}/**/*.js'",
-    "lint": "eslint --cache --max-warnings 0",
-    "lint:all": "npm run lint -s -- '{src,test}/**/*.js'",
+    "format:all": "npm run format -s -- .",
+    "lint": "eslint --cache --max-warnings 0 --ext js,json",
+    "lint:all": "npm run lint -s -- .",
     "pretest": "npm run lint:all -s",
     "test": "mocha '{src,test}/**/*.test.js'",
-    "test:watch": "nodemon -w src -w test -x 'npm test'",
+    "test:watch": "nodemon -x 'npm test'",
     "precommit": "npm run test -s"
   "repository": {
diff --git a/webpack.config.js b/webpack.config.js
index df59ce5..80e9b38 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,3 +1,4 @@
+/* eslint-env node */
 const path = require("path");
 const webpack = require("webpack");
 const CleanWebpackPlugin = require("clean-webpack-plugin");

To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iece0896521f19093b186ae8ee4467a4c0a859418
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <>
Gerrit-Reviewer: Sniedzielski <>

MediaWiki-commits mailing list

Reply via email to