simonsmith / stylelint-selector-bem-pattern

Stylelint plugin that incorporates postcss-bem-linter
MIT License
244 stars 13 forks source link

Doesn't work without options #10

Closed simonsmith closed 8 years ago

simonsmith commented 8 years ago

The source seems to imply that it will default to SUIT:

options = options || { preset: 'suit' };

However the plugin doesn't seem to even run unless I have at least the following:

module.exports = {
  plugins: ['stylelint-selector-bem-pattern'],
  rules: {
    'selector-bem-pattern': {}
  }
};

At which point options is set to {} and the default preset is never picked up. Is it correct that stylelint works this way and never calls a plugin unless you have some settings?

Cheers

davidtheclark commented 8 years ago

The convention for stylelint is definitely to require an explicit expectation. So do think it makes sense to expect someone to include 'selector-bem-pattern': { present: 'suit' }. I didn't consider this actually when writing the plugin. Should probably

Sound good?

simonsmith commented 8 years ago

Yeah a doc update sounds a good addition. :+1:

davidtheclark commented 8 years ago

Docs are updated and code cleaned up in 0.2.2