eslint-define-config icon indicating copy to clipboard operation
eslint-define-config copied to clipboard

feat: support customize Rules types via generic

Open antfu opened this issue 2 years ago • 2 comments

https://github.com/antfu/eslint-define-config#2-allow-overriding-rules

antfu avatar Oct 08 '23 14:10 antfu

I like the Strict extends boolean = false of this PR, but I would like not to have this dedicated to Rules as well es FlatConfig

Right now defineConfig is mostly meant to be used in .js files which do not have great/easy generic TS support I would suggest to make it possible to call the method like so:

module.exports = defineConfig(config, { strict: true })
// or
module.exports = defineConfig(config, { strict: ['rules', 'settings'] })

Then the generic is inferred from that

We can also introduce a breaking change and make strict: true the default, so folks need to use strict: false if they want to add arbitrary config values

Shinigami92 avatar Oct 11 '23 06:10 Shinigami92

the work for the augmented global properties support is done you can now work on this again I would like to have this in v2.0.0 release before moving out of beta if you cant work on this in the next 30 days, please let me know

Shinigami92 avatar Oct 25 '23 19:10 Shinigami92