In my stylelintrc.js
module.exports = {
"extends": [
"stylelint-config-standard",
"stylelint-config-css-modules",
],
"plugins": [
"stylelint-performance-animation",
],
...
In codeclimat.yaml i turn on stylelint engine and take this error on codeclimete
•• Timing: .engineConfig: 0.049s
Error: Could not find "stylelint-config-css-modules". Do you need a configBasedir
?
See our documentation at https://docs.codeclimate.com/docs/stylelint for more information.
Can somebody explain me how enable plugins ands extends if it posible?
This is an answer for anyone coming here from google:
Weirdly enough stylelint needs to be given the absolue path of the node_modules folder. Below is a working solution:
const { resolve } = require('path')
const basePath = resolve(__dirname, 'node_modules')
const groupSelectors = `${basePath}/stylelint-group-selectors`
const cssTreeValidator = `${basePath}/stylelint-csstree-validator`
module.exports = {
plugins: [groupSelectors, cssTreeValidator],
extends: [
'stylelint-config-recommended-scss',
'stylelint-config-recess-order',
'stylelint-prettier/recommended',
'stylelint-scss',
'stylelint-a11y/recommended',
],
rules: {
'no-empty-source': null,
//check and add avaialble rules here: https://github.com/kristerkari/stylelint-scss
'scss/selector-no-redundant-nesting-selector': true,
'plugin/stylelint-group-selectors': true,
'csstree/validator': true,
},
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With