Add support JS objects for extends
config option
#6952
Labels
status: wip
is being worked on by someone
type: enhancement
a new feature that isn't related to rules
What is the problem you're trying to solve?
First, assume that there is a pure ESM package for a sharable config named
foo-config
:foo-config/package.json
:foo-config/index.js
:Next, consider a case using
foo-config
via npm:package.json
:.stylelintrc.mjs
:Running
stylelint
like this raises the errors above:This means that Stylelint cannot use a pure ESM sharable config with the
extends
option.Related: #5291
What solution would you like to see?
I expect Stylelint to work even when using JS objects with
extends
instead of strings (e.g., package name or path). For example:I find it works by applying the following patch:
This patch simply uses JS objects if they are passed.
What do you think about this idea? Is there some pitfall?
For your information, I refer to the current spec of
extends
:stylelint/docs/user-guide/configure.md
Lines 215 to 219 in 16754b1
The text was updated successfully, but these errors were encountered: