Enhancement: Add an option to CSpell ESLint plugin to be able to use `ignorePaths` found in CSpell config.
Kind of Issue
Runtime - command-line tools
Tool or Library
cspell/eslint-plugin
Version
- cspell
8.17.5 - @cspell/eslint-plugin
8.17.5
Supporting Library
No response
OS
Windows
OS Version
- Windows 11
- WSL 2.4.12.0
- Ubuntu 24.04.2
Description
Running cspell CLI works as expected, but eslint seems to ignore ignorePaths.
Running pnpm cspell . yields success:
CSpell: Files checked: 83, Issues found: 0 in 0 files.
Running pnpm eslint . yields an error:
/home/user/project/src/locales/de.ts
Mind that the custom dictionaryDefinitions works as expected via CLI and eslint, no issues there. Only ignorePaths doesn't seem to work at all via eslint plugin.
Steps to Reproduce
No response
Expected Behavior
ignorePaths works via eslint plugin.
Additional Information
No response
cspell.config.js
export default {
dictionaries: ['project'],
dictionaryDefinitions: [
{
addWords: true,
name: 'project',
path: 'dictionary.txt',
},
],
ignorePaths: [
'src/locales/',
],
language: 'en',
version: '0.2',
};
Example Repository
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
@thasmo,
It was a design decision to use ESLint's files and ignores as the sole selector on when to apply the CSpell lint rule.
This issue highlights that some documentation is needed.
@Jason3S, I see. But shouldn't it be possible to set a relevant ignores value based on the ignorePaths option via the plugin? If possible, that would be some neat DX.
@thasmo,
I can see it as an option.
hi guys, there are updates about this?