-
-
Notifications
You must be signed in to change notification settings - Fork 927
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
configOverrides.extends breaks Node APIs #2280
Comments
@veej Thanks for using the issue template. I think you can have either a
If you can let us know exactly what outcome you're trying to achieve we can best advise you what options you should use? If you want to stylelint to search for a {
code: 'a { }',
configOverrides: {
rules: {
"block-no-empty": true
}
},
syntax: 'scss',
formatter: 'string'
} If you don't want stylelint to search for a {
code: 'a { }',
config: {
rules: {
"block-no-empty": true
}
},
syntax: 'scss',
formatter: 'string'
} Also, just add {
code: 'a { }',
config: {
extends: "stylelint-config-standard",
rules: {
"block-no-empty": true
}
},
syntax: 'scss',
formatter: 'string'
}
I suspect that's because {
code: 'a { }',
config: {
rules: {}
},
syntax: 'scss',
formatter: 'verbose'
} |
Umm, having said all that, you might have uncovered a bug. {
code: 'a { }',
configOverrides: {
"extends": ["stylelint-config-standard"],
"rules": {
"block-no-empty": true,
}
},
syntax: 'scss',
formatter: 'verbose'
} Displays nothing. @veej Is this what you're trying to achieve i.e. override a @davidtheclark Should you be able to extend from |
Hey @jeddy3, thank you for your reply. What I'm trying to achieve is a sort of library aimed at sharing our basic configs and scripts (like linting) between all our projects. This library will be included in all our projects and should provide, among other things, a script to lint our source files using a basic config, extensible through |
I do not think we've written any code to allow I don't think you need it, really, because when you are writing a Node module you should be able to write whatever code you need to put together the config object that you want. That idea makes me think we should deprecate that option: why have a That said, if the only problem we have with |
@davidtheclark the issue also arise in |
Trying to pass
configOverrides: { extends: 'stylelint-config-standard' }
to Node API doesn't seem to work (and it seems to break the linting process)..a {}
7.5.0
Running the following script on Node:
No
Stylelint should give something like the following:
<input css 1>
1:3 ✖ Unexpected empty block block-no-empty
literally nothing is printed in console (not even errors)
The text was updated successfully, but these errors were encountered: