From 28afa143aa9b81a5bec32782f4b43ed481880968 Mon Sep 17 00:00:00 2001 From: Daniel Valadas Date: Tue, 3 Aug 2021 20:53:58 -0400 Subject: [PATCH] Added lint task to all node projects This adds a `lint` task into all projects with autofix enabled. This will make it easier to auto-fix eslint warnings if we change the configs or while updating eslint dependency in batch using lerna or yarn workspaces. Unfortunatally (well fortunatelly) there was no autofixable warnings to resolve after this change which was my main goal with this PR, anyway, it's still good to have I believe for the future. --- .../Modules/ResourceManager/ResourceManager.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Bundle.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json | 2 +- Dnn.AdminExperience/ClientSide/Pages.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Prompt.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Roles.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Security.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Seo.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Servers.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/SiteGroups.Web/package.json | 3 ++- .../ClientSide/SiteImportExport.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Sites.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/TaskScheduler.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Themes.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Users.Web/package.json | 3 ++- Dnn.AdminExperience/ClientSide/Vocabularies.Web/package.json | 3 ++- 18 files changed, 35 insertions(+), 18 deletions(-) diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json index e0ffac12b7b..822d465fa9c 100644 --- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json +++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/package.json @@ -8,7 +8,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "author": "", "license": "MIT", diff --git a/Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json b/Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json index 66a55c1e8c6..15933248699 100644 --- a/Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Bundle.Web/package.json b/Dnn.AdminExperience/ClientSide/Bundle.Web/package.json index 36d430398b3..00ae848bf39 100644 --- a/Dnn.AdminExperience/ClientSide/Bundle.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Bundle.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p --progress", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", "webpack": "webpack-dev-server -d --port 8070 --hot --inline --content-base dist/ --history-api-fallback", - "analyze": "set NODE_ENV=production&&webpack --config webpack.config.js --profile --json > stats.json&&webpack-bundle-analyzer stats.json" + "analyze": "set NODE_ENV=production&&webpack --config webpack.config.js --profile --json > stats.json&&webpack-bundle-analyzer stats.json", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json b/Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json index c4b6ef911cf..79be46858e7 100644 --- a/Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json +++ b/Dnn.AdminExperience/ClientSide/Dnn.React.Common/package.json @@ -17,7 +17,7 @@ "Persona Bar" ], "scripts": { - "eslint": "eslint ./src/**/*.jsx --fix", + "lint": "eslint --fix", "test": "echo \"No tests script specified to run.\"", "build": "set NODE_ENV=production && webpack -p --config dist.webpack.config.js", "debug": "set NODE_ENV=debug && webpack -p --config dist.webpack.config.js", diff --git a/Dnn.AdminExperience/ClientSide/Pages.Web/package.json b/Dnn.AdminExperience/ClientSide/Pages.Web/package.json index d06173c1d82..5e1af818c1a 100644 --- a/Dnn.AdminExperience/ClientSide/Pages.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Pages.Web/package.json @@ -10,7 +10,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server --host localhost -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "jest": { "setupTestFrameworkScriptFile": "./src/jest.config.js" diff --git a/Dnn.AdminExperience/ClientSide/Prompt.Web/package.json b/Dnn.AdminExperience/ClientSide/Prompt.Web/package.json index 662b13a1498..af318acfab2 100644 --- a/Dnn.AdminExperience/ClientSide/Prompt.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Prompt.Web/package.json @@ -9,7 +9,8 @@ "webpack": "webpack-dev-server -d --port 8100 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", "analyze": "set NODE_ENV=analyze&&webpack-dev-server -d --port 8100 --hot --inline --content-base dist/ --history-api-fallback", - "test": "jest" + "test": "jest", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Roles.Web/package.json b/Dnn.AdminExperience/ClientSide/Roles.Web/package.json index 79d5a3ff7c2..e1b829e83f6 100644 --- a/Dnn.AdminExperience/ClientSide/Roles.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Roles.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Security.Web/package.json b/Dnn.AdminExperience/ClientSide/Security.Web/package.json index 8dd5fc6e60a..9b31b8927e5 100644 --- a/Dnn.AdminExperience/ClientSide/Security.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Security.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --host localhost --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.2.0", diff --git a/Dnn.AdminExperience/ClientSide/Seo.Web/package.json b/Dnn.AdminExperience/ClientSide/Seo.Web/package.json index ef1f160830a..11700da4adc 100644 --- a/Dnn.AdminExperience/ClientSide/Seo.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Seo.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Servers.Web/package.json b/Dnn.AdminExperience/ClientSide/Servers.Web/package.json index 6bcb9879f00..bd2eb49ec16 100644 --- a/Dnn.AdminExperience/ClientSide/Servers.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Servers.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/SiteGroups.Web/package.json b/Dnn.AdminExperience/ClientSide/SiteGroups.Web/package.json index 4e22862249b..38390b46796 100644 --- a/Dnn.AdminExperience/ClientSide/SiteGroups.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/SiteGroups.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/SiteImportExport.Web/package.json b/Dnn.AdminExperience/ClientSide/SiteImportExport.Web/package.json index 68cddfa4e86..2edbcc44e50 100644 --- a/Dnn.AdminExperience/ClientSide/SiteImportExport.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/SiteImportExport.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json b/Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json index 6c18b951451..923ac82923a 100644 --- a/Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json @@ -9,7 +9,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8085 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Sites.Web/package.json b/Dnn.AdminExperience/ClientSide/Sites.Web/package.json index cd91f0da3fb..cc81eeff201 100644 --- a/Dnn.AdminExperience/ClientSide/Sites.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Sites.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/TaskScheduler.Web/package.json b/Dnn.AdminExperience/ClientSide/TaskScheduler.Web/package.json index 1360f8cf7cd..9c971cf41d7 100644 --- a/Dnn.AdminExperience/ClientSide/TaskScheduler.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/TaskScheduler.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Themes.Web/package.json b/Dnn.AdminExperience/ClientSide/Themes.Web/package.json index 40a7b02e460..1ab73eb5823 100644 --- a/Dnn.AdminExperience/ClientSide/Themes.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Themes.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.2.0", diff --git a/Dnn.AdminExperience/ClientSide/Users.Web/package.json b/Dnn.AdminExperience/ClientSide/Users.Web/package.json index eadcc2e2220..79bbc9770ac 100644 --- a/Dnn.AdminExperience/ClientSide/Users.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Users.Web/package.json @@ -9,7 +9,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6", diff --git a/Dnn.AdminExperience/ClientSide/Vocabularies.Web/package.json b/Dnn.AdminExperience/ClientSide/Vocabularies.Web/package.json index 413d8a762f1..aa7d1b2aeef 100644 --- a/Dnn.AdminExperience/ClientSide/Vocabularies.Web/package.json +++ b/Dnn.AdminExperience/ClientSide/Vocabularies.Web/package.json @@ -7,7 +7,8 @@ "debug": "set NODE_ENV=debug&&webpack -p", "webpack": "webpack-dev-server -d --port 8080 --hot --inline --content-base dist/ --history-api-fallback", "watch": "set NODE_ENV=debug & webpack --mode=development --progress --colors --watch", - "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer" + "analyze": "set NODE_ENV=production&&webpack -p --json | webpack-bundle-size-analyzer", + "lint": "eslint --fix" }, "devDependencies": { "@babel/core": "^7.1.6",