For version4, I use "reportFiles" to ignore some unuseful “.ts” or ".tsx" files, this plugin works normaly.
reportFiles: ['./src/**/*.{ts,tsx}', '!src/ts/**/*.{ts,tsx}']
For version5, I use "eslint" -> "files" to ignore same files.
For example:
files: ['./src/**/*.{ts,tsx}', '!src/ts/**/*.{ts,tsx}']
But this plugin throws an error:
Error: No files matching 'D:/GitHub/code-twitter/!src/ts/**/*.{ts,tsx}' were found.
It seems like a path, not glob patterns.
Is this a normal behavior?
Sorry for my bad english.
The "files" option should ignore files properly.
*
*
The files parameter works inclusive - not exclusive. If some of the patterns don't resolve to existing files, eslint will throw an error (it behaves the same as eslint command).
If you want to mimic the behavior of reportFiles, you can use issue option:
issue: {
exclude: [
{
origin: 'eslint',
file: 'src/ts/**/*.{ts,tsx}'
}
]
}
It works now, thanks.
Most helpful comment
The files parameter works inclusive - not exclusive. If some of the patterns don't resolve to existing files, eslint will throw an error (it behaves the same as
eslintcommand).If you want to mimic the behavior of
reportFiles, you can useissueoption: