Skip to content

Commit

Permalink
Migrate eslint-loader to eslint-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bdukes committed Dec 2, 2024
1 parent dce4f54 commit 8b9945d
Show file tree
Hide file tree
Showing 43 changed files with 164 additions and 261 deletions.
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/AdminLogs.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"css-loader": "^7.1.2",
"es6-object-assign": "1.1.0",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"i18n-webpack-plugin": "1.0.0",
"jwt-decode": "2.2.0",
Expand Down
15 changes: 3 additions & 12 deletions Dnn.AdminExperience/ClientSide/AdminLogs.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const packageJson = require("./package.json");
const path = require("path");
const settings = require("../../../settings.local.json");
Expand Down Expand Up @@ -28,17 +29,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
enforce: "pre",
exclude: /node_modules/,
use: [
{
loader: "eslint-loader",
options: { fix: true },
},
],
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
Expand Down Expand Up @@ -93,7 +83,8 @@ module.exports = (env, argv) => {
new webpack.SourceMapDevToolPlugin({
filename: "adminLogs-bundle.js.map",
append: "\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.AdminLogs/scripts/bundles/adminLogs-bundle.js.map"
})
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Bundle.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"es6-object-assign": "1.1.0",
"es6-promise": "4.2.8",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"json-loader": "^0.5.7",
"jwt-decode": "2.2.0",
Expand Down
13 changes: 2 additions & 11 deletions Dnn.AdminExperience/ClientSide/Bundle.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-undef */
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const path = require("path");
const packageJson = require("./package.json");
const settings = require("../../../settings.local.json");
Expand Down Expand Up @@ -29,17 +30,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
enforce: "pre",
exclude: /node_modules/,
use:[
{
loader: "eslint-loader",
options: { fix: true },
}
]
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
Expand Down Expand Up @@ -104,6 +94,7 @@ module.exports = (env, argv) => {
filename: "export-bundle.js.map",
append: "\n//# sourceMappingURL=export-bundle.js.map"
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const path = require("path");
const packageJson = require("./package.json");
const nodeExternals = require("webpack-node-externals");
Expand All @@ -17,17 +18,6 @@ module.exports = {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
enforce: "pre",
exclude: /node_modules/,
use: [
{
loader: "eslint-loader",
options: { fix: true },
}
],
},
{ test: /\.(js|jsx)$/, exclude: /node_modules/, use: ["babel-loader"] },
{ test: /\.less$/, use:
[
Expand Down Expand Up @@ -71,6 +61,7 @@ module.exports = {
"process.env": {
"NODE_ENV": JSON.stringify("production")
}
})
}),
new ESLintPlugin({fix: true}),
]
};
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
"eslint": "^7.32.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-loader": "^4.0.2",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^22.21.0",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"less": "4.1.3",
"less-loader": "12.2.0",
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Extensions.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"create-react-class": "^15.7.0",
"css-loader": "^7.1.2",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"less": "4.1.3",
"less-loader": "12.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const packageJson = require("./package.json");
const path = require("path");
const webpackExternals = require("@dnnsoftware/dnn-react-common/WebpackExternals");
Expand Down Expand Up @@ -37,12 +38,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
enforce: "pre",
use: ["eslint-loader"],
},
{
test: /\.less$/,
use: [
Expand Down Expand Up @@ -142,6 +137,7 @@ module.exports = (env, argv) => {
filename: "extensions-bundle.js.map",
append: "\r\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.Extensions/scripts/bundles/extensions-bundle.js.map",
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Licensing.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"css-loader": "^7.1.2",
"es6-object-assign": "1.1.0",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"jwt-decode": "2.2.0",
"less": "4.1.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const packageJson = require("./package.json");
const path = require("path");
const settings = require("../../../settings.local.json");
Expand Down Expand Up @@ -38,12 +39,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
enforce: "pre",
use: ["eslint-loader"],
},
{
test: /\.less$/,
use: [
Expand Down Expand Up @@ -104,6 +99,7 @@ module.exports = (env, argv) => {
filename: "licensing.bundle.js.map",
append: "\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.Licensing/scripts/bundles/licensing.bundle.js.map",
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Pages.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"enzyme-adapter-react-16": "^1.15.7",
"eslint": "^7.32.0",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"jest": "^28.1.3",
"less": "4.1.3",
Expand Down
8 changes: 2 additions & 6 deletions Dnn.AdminExperience/ClientSide/Pages.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const packageJson = require("./package.json");
const path = require("path");
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const webpackExternals = require("@dnnsoftware/dnn-react-common/WebpackExternals");
const settings = require("../../../settings.local.json");

Expand All @@ -26,12 +27,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: { loader: "eslint-loader", options: { fix: true } },
enforce: "pre",
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
Expand Down Expand Up @@ -114,6 +109,7 @@ module.exports = (env, argv) => {
filename: "pages.bundle.js.map",
append: "\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.Pages/scripts/bundles/pages.bundle.js.map",
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Prompt.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"enzyme-adapter-react-16": "^1.15.7",
"es6-object-assign": "1.1.0",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-jest": "^22.21.0",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"extract-text-webpack-plugin": "^3.0.2",
"fbjs": "*",
"fetch-mock": "^7.7.3",
Expand Down
8 changes: 2 additions & 6 deletions Dnn.AdminExperience/ClientSide/Prompt.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const packageJson = require("./package.json");
const path = require("path");
const settings = require("../../../settings.local.json");
Expand Down Expand Up @@ -36,12 +37,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
enforce: "pre",
use: ["eslint-loader"],
},
{
test: /\.less$/,
use: [
Expand Down Expand Up @@ -101,6 +96,7 @@ module.exports = (env, argv) => {
filename: "prompt-bundle.js.map",
append: "\r\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.Prompt/scripts/bundles/prompt-bundle.js.map",
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Roles.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"css-loader": "^7.1.2",
"es6-object-assign": "^1.1.0",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"jwt-decode": "2.2.0",
"less": "4.1.3",
Expand Down
13 changes: 2 additions & 11 deletions Dnn.AdminExperience/ClientSide/Roles.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const packageJson = require("./package.json");
const path = require("path");
const settings = require("../../../settings.local.json");
Expand Down Expand Up @@ -28,17 +29,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
enforce: "pre",
exclude: /node_modules/,
use: [
{
loader: "eslint-loader",
options: { fix: true },
}
],
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
Expand Down Expand Up @@ -103,6 +93,7 @@ module.exports = (env, argv) => {
filename: "roles-bundle.js.map",
append: "\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.Roles/scripts/bundles/roles-bundle.js.map",
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Security.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"create-react-class": "^15.7.0",
"css-loader": "^7.1.2",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"jwt-decode": "2.2.0",
"less": "4.1.3",
Expand Down
15 changes: 3 additions & 12 deletions Dnn.AdminExperience/ClientSide/Security.Web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require("webpack");
const ESLintPlugin = require('eslint-webpack-plugin');
const packageJson = require("./package.json");
const path = require("path");
const settings = require("../../../settings.local.json");
Expand Down Expand Up @@ -38,17 +39,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
enforce: "pre",
use: [
{
loader: "eslint-loader",
options: {fix: true},
},
],
},
{
test: /\.less$/,
use: [
Expand Down Expand Up @@ -105,7 +95,8 @@ module.exports = (env, argv) => {
new webpack.SourceMapDevToolPlugin({
filename: "security-settings-bundle.js.map",
append: "\n//# sourceMappingURL=/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.Security/scripts/bundles/security-settings-bundle.js.map",
})
}),
new ESLintPlugin({fix: true}),
],
devtool: false,
};
Expand Down
2 changes: 1 addition & 1 deletion Dnn.AdminExperience/ClientSide/Seo.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"css-loader": "^7.1.2",
"es6-object-assign": "1.1.0",
"eslint": "7.32.0",
"eslint-loader": "4.0.2",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-spellcheck": "0.0.11",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "3.0.1",
"jwt-decode": "2.2.0",
"less": "4.1.3",
Expand Down
Loading

0 comments on commit 8b9945d

Please sign in to comment.