Closed skhaz closed 2 months ago
Given the snippet you attached - looks like you need to checkout our docs again.
Like this FAQ https://typescript-eslint.io/troubleshooting/faqs/general#how-do-i-turn-on-a-typescript-eslint-rule
Also checkout eslint's docs on comfig files https://eslint.org/docs/latest/use/configure/configuration-files
Finally. We do not use issues for Q&A. https://typescript-eslint.io/contributing/issues#questions-and-support-requests
Your docs are incomplete for CJS, look this
module.exports = {
// ... the rest of your config ...
rules: {
// turns a rule on with no configuration (i.e. uses the default configuration)
'@typescript-eslint/array-type': 'error',
// turns on a rule with configuration
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
},
};
It does not sounds like will work with tseslint.
I have just migrated to biome.
Your docs are incomplete for CJS
You didn't read the tab headings did you? The second tab isn't a "cjs" example - it's a legacy config example - the old config form.
If you wanted a flat config example in CJS then you of course just use module.exports =
instead of export default
.
If you had read the getting started guide and setup your config then the form of the config would have been clearer.
Do not me get wrong, but your documentation is not that great.
I already migrated to biome and I recommend everyone else to do the same... Much better in many aspects.
Thank you again for your support.
Also, I must say... ESM vs CJS is madness.
I have just migrated to biome.
Good, let them deal with you. 😜
Snark aside, here's how we see this interaction as having started:
...what do you think our reaction to all that is going to be? Why would we want to work on docs with someone who acts as if they either haven't read them or haven't been willing to follow them?
As per the contributing guidelines that Brad sent yesterday, GitHub issues aren't an appropriate place for questions or support requests. We'd be happy to help in the appropriate channels (e.g. our Discord) if you find yourself using ESLint again and want help. But, just as a general piece of advice, have a little empathy for open source maintainers.
All that being said, we do have a lot of empathy for where you're coming from. Your situation is totally understandable and moving to Biome makes a lot of sense. There are a lot of parts of ESLint that are inherently more complicated than Biome's approach:
ignores
block without files
is a different config entry than one with files
tseslint.config
from typescript-eslint...it's a lot to take in! If you don't have the bandwidth to take in all those things, it's totally reasonable that writing an ESLint config would bring you pain. We get it.
So if anybody has time to work on constructive suggestions for how ESLint core and/or typescript-eslint can improve docs, please do post them on the projects' respective Discords or GitHub issue trackers (after reading the contributing guides, of course). And maybe even send some PRs. We're doing the best we can, but given how many topics there are in the ecosystem + all the other things we're working on, it's hard to get this right.
Before You File a Documentation Request Please Confirm You Have Done The Following...
Suggested Changes
I went through the documentation and couldn't find how to customize the rules. I tried several alternatives but couldn't get it to work.
So here's my question: is this possible to do?
Thank you.
Affected URL(s)
https://typescript-eslint.io/getting-started