I have a Typescript project that I've installed eslint-webpack-plugin on and I've been running into issues of linting errors falling through the cracks.
A number of my files just have a single interface in them that they export with no actual data exported or side effects. And these seem to not be throwing any errors by the linter at all. The linter does run if I add an export to a constant string and that gets used by another file, but it doesn't run if that string isn't imported anywhere or it isn't used in the related file. I confirmed that the typescript compiler is running on the files since I am seeing compilation errors that I add to those files. The same thing happens with files that only export const enum structures which I think confirms that this is some sort of tree-shaking issue.
I have "sideEffects": true in my package.json and I'm not currently using the optimize options in webpack, so that shouldn't be the issue. My eslint plugin configuration is
new ESLintPlugin({
extensions: ['ts', 'tsx'],
context: 'src',
files: ['**/*.ts', '**/*.tsx'],
emitError: !env.local,
failOnWarning: !env.local
}),
I'm using webpack 5 and eslint 7.22.0.