Markdown file support
joris-fonck-loreal opened this issue · comments
Describe the bug
When I configure the filename rule to be able to add a rule on .md
files, the rule does not work.
Expected behavior
.md
files are linted.
Plugin configuration
'check-fike/filename-naming-convention': ['error', {
'**/*.{md}': '+([a-z])',
}],
Project structure
.
└── my-app/
└── READme.md
Desktop (please complete the following information):
- OS: Windows
Additional context
When I set the READme.md
extension to .js
, it works.
Seems like it's only works for js, jsx, ts and tsx extensions.
@joris-fonck-loreal ESLint is a tool designed for analyzing and checking JavaScript code for syntax and stylistic errors. If you want to lint markdown file, you need to install a another parser for ESLint https://www.npmjs.com/package/markdown-eslint-parser. You can do like this:
{
"plugins": ["check-file"],
"overrides": [
{
"files": ["**/*.md"],
"parser": "markdown-eslint-parser"
}
],
"rules": {
"check-file/filename-naming-convention": [
"error",
{
"**/*.{js,md}": "KEBAB_CASE"
}
]
}
}