Ignored files in .eslintrc.js are ignored successfully on the initial build. After that if they are changed and a watch build picks them up you get the error:
WARNING in path/file.ts
[unknown]: File ignored because of a matching ignore pattern. Use "--no-ignore" to override.
The files are successfully ignored still - it's just a distracting warning.
No warnings
// .eslintrc.js
module.exports = {
...
ignorePatterns: ['*/*.ignoreme.ts']
};
// webpack.config.js
modules.exports = {
plugins: [
new ForkTSCheckerWebpackPlugin({
eslint: {
files: '.',
},
}),
]
}
Run a watched webpack build. The initial build will run with no warnings. Now update and save test.ignoreme.ts.
You see the warning referred to above.
This could possibly be worked around by not including the eslint ignored files in the include patterns for fork-ts-checker-webpack-plugin (or at least ignoring the warnings from the file as per #450).
This seems to be the same issue as #316 which was previously fixed but seems to have been partially reverted in the recent restructuring. If I update the eslint reporter locally like so, I no longer see the error
const changedAndIncludedFiles = changedFiles.filter(
(changedFile) =>
includedFilesPatterns.some((includedFilesPattern) =>
minimatch(changedFile, includedFilesPattern)
) &&
(configuration.options.extensions || []).some((extension) =>
changedFile.endsWith(extension)
- )
+ ) &&
+ (!engine.isPathIgnored(changedFile )
);
Happy to drop in a PR if you think this looks reasonable.
Thanks for reporting this issue :) Would be great if you could create a PR :)
:tada: This issue has been resolved in version 5.0.13 :tada:
The release is available on:
Your semantic-release bot :package::rocket: