I am having a hard time plugging a Typescript linter in my Webpack project.

Apparently [`eslint-loader`](https://github.com/webpack-contrib/eslint-loader) is deprecated, they give [`eslint-webpack-plugin`](https://github.com/webpack-contrib/eslint-webpack-plugin) as an alternative. Additionally, I am using [`typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint) instead of [`tslint`](https://github.com/palantir/tslint) (*deprecated*) The problem is the rules I set inside my `.eslintrc.js` don't seem to get accounted for. I have added a simple rule in `.eslintrc` that should throw an error when using a semicolon.

```js
export default class A {
  static yes = 'this is static'; // ";" <- should be invalidated by eslint
}

```

My dependencies are:

```js
"@typescript-eslint/eslint-plugin": "^4.5.0",
"@typescript-eslint/parser": "^4.5.0",
"eslint": "^7.11.0",
"eslint-webpack-plugin": "^2.1.0",
"ts-loader": "^8.0.6",
"typescript": "^4.0.3",
"webpack": "^4.41.3",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0"

```

If I understand correctly it should work like so:

```
                                                        # # # # # # # # # # # # # # 
@typescript-eslint/parser --> eslint-webpack-plugin --> #                         # 
      (uses eslint?)        (replaces eslint-loader)    #       webpack v4        #
                                                        #  w/ webpack-dev-server  #
       typescript         -->       ts-loader       --> #                         #
                                                        # # # # # # # # # # # # # #

```

Side note: *I'm using `webpack-dev-server` instead of [`webpack-cli`](https://webpack.js.org/api/cli/)'s serve command which [doesn't seem to work quite yet with `webpack` v5](https://github.com/webpack/webpack-dev-server/issues/2759)*.

The command I run to launch the server: `webpack-dev-server --hot --inline`

[![enter image description here](https://i.stack.imgur.com/gPYnx.png)](https://i.stack.imgur.com/gPYnx.png)

---

* project structure:

```MD
./
├─── src
│    └─── index.ts
└─── dist
     ├─── bundle.js
     └─── index.html <- imports bundle.js

```

* **webpack.config.js**:

```js
const path = require('path')
const ESLintPlugin = require('eslint-webpack-plugin')

module.exports = {
  mode: 'development',
  entry: './src/index.ts',
  devtool: 'inline-source-map',
  devServer: {
    contentBase: path.resolve(__dirname, 'dist')
    // publicPath: "/assets", // path of the served resources (js, img, fonts...)
  },
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: 'ts-loader',
        exclude: /node_modules/,
      },
    ],
  },
  plugins: [
    new ESLintPlugin({
      files: 'src/**/*.ts',
    })
  ],
  resolve: {
    extensions: [ '.tsx', '.ts', '.js' ],
  },
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist'),
  },
}

```

* **.eslintrc.js**:

```js
module.exports = {
  root: true,
  env: {
    node: true,
  },
  parser: '@typescript-eslint/parser',
  extends: [
    'plugin:@typescript-eslint/recommended'
  ],
  parserOptions: {
    ecmaVersion: 2020,
    sourceType: 'module',
  },
  rules: {
    'semi': ['error', 'never'],
  },
  ignorePatterns: [ "dist/*" ],
}

```

* **tsconfig.json**:

```json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "strict": true,
    "importHelpers": true,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "baseUrl": ".",
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "dom",
      "dom.iterable",
    ]
  },
  "include": [
    "src/**/*.ts",
    "tests/**/*.ts",
  ],
  "exclude": [
    "node_modules"
  ]
}

```