-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support .markdownlint.js
#304
Comments
The current behavior of ClI2 is deliberate. In my mind, the "js" extension should no longer be used because it is ambiguous. That said, I am curious if the behavior in other tools is deliberate or accidental - and whether they had to write code to support it. |
Not meaning to be rude, but check your current repo plz? Most of the popular repo is not written in full In a |
Some Refs: |
Maybe you can use this pkg directly: https://github.com/cosmiconfig/cosmiconfig |
The point is that you (or an editor) cannot tell from looking at JS extension what type of file it is. What's more, copying that file from one project to another may not work because the projects are configured differently. None of that is an issue with the CJS or MJS extension. While it is less obvious in this repository, I use CJS or MJS for new files except where existing files already have the JS extension. That means this tends to happen most in new test files and you can see that in other repositories I maintain. The new I will have a look at some of the links you sent, but I do not think this behavior raises to the level of introducing an entirely new configuration system. As you note above, everything works fine today - the issue is just that you do not want to deal with different extensions. |
Yes, everything could work fine under current package, but as all popular lint tools support |
eslint, prettier, stylelint and lint-staged support all cosmiconfig format (eslint up to v8, since v9 introduce flat config and it's a breaking change, a script config file is required) rollup, commintlint and vite are even more aggressive, they all preprocess the config file, so esm config file is even allowed with So I have to say that there is more likely to be a lacking feature here. |
Solution can be found in the ref I provided
I don't think this should be an issue, if a people just want to quickly re-use an existing file and the type is different between 2 projects, he just need a rename or a |
I already do not support JSON and YML extensions for the new options file format (preferring JSONC and YAML) for simplicity and I think this is similar. Except here there is the added complexity of JS meaning CJS and/or MJS depending on where the file lives. Where we differ is that I don't think this is a "feature" because it doesn't enable any unique behavior. I see why people think it is a "simplification", but it also introduces ambiguity and complexity that does not need to exist. I will leave this issue open for comments and to think about more. |
.markdownlint.js
should be supported and its file type (cjs/esm) should be based on currentpackage.json
.This is a problem because I need to extra declare
.markdownlint.mjs
/.markdownlint.cjs
in eslint and typescript config files in all my repo to have it included, while all other files arejs
.Anyway its weird to have a
.cjs
file in cjs package and a.mjs
file in esm package.Other tools like
commitlint
eslint
vite
, ... all support this.The text was updated successfully, but these errors were encountered: