Skip to content

Commit

Permalink
chore: favor eslint-webpack-plugin
Browse files Browse the repository at this point in the history
BREAKING CHANGE: config/rules-linter.js is now gone.
  • Loading branch information
forrest committed Jan 10, 2022
1 parent de08163 commit c3a4205
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
4 changes: 3 additions & 1 deletion Utilities/ExampleRunner/template-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ module.exports = function buildConfig(
exampleBasePath
) {
return `
var rules = [].concat(require('../config/rules-vtk.js'), require('../config/rules-examples.js'), require('../config/rules-linter.js'));
var rules = [].concat(require('../config/rules-vtk.js'), require('../config/rules-examples.js'));
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ESLintPlugin = require('eslint-webpack-plugin');
var webpack = require('webpack');
var path = require('path');
module.exports = {
mode: 'development',
devtool: 'inline-source-map',
plugins: [
new ESLintPlugin(),
new HtmlWebpackPlugin({
template: '${root.replace(
/\\/g,
Expand Down
13 changes: 0 additions & 13 deletions Utilities/config/rules-linter.js

This file was deleted.

5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');

const webpack = require('webpack');
const testsRules = require('./Utilities/config/rules-tests');
const linterRules = require('./Utilities/config/rules-linter');
const ESLintPlugin = require('eslint-webpack-plugin');

const sourcePath = path.join(__dirname, './Sources');

Expand Down Expand Up @@ -37,7 +37,7 @@ module.exports = function init(config) {
webpack: {
mode: 'development',
module: {
rules: [].concat(testsRules, linterRules),
rules: [].concat(testsRules),
},
resolve: {
modules: [path.resolve(__dirname, 'node_modules'), sourcePath],
Expand All @@ -52,6 +52,7 @@ module.exports = function init(config) {
},
},
plugins: [
new ESLintPlugin(),
new webpack.DefinePlugin({
__BASE_PATH__: "'/base'",
}),
Expand Down

0 comments on commit c3a4205

Please sign in to comment.