dimanche 3 mai 2015

ember-cli scss lint addon not performing task

I am trying to make a SCSS lint addon for ember-cli (I know one exists already ember-cli-scsslint but I want one more customisable). I was wondering whether anyone has had experience using broccoli-scss-lint because I am having trouble feeding in my styling tree and having scss-lint actually lint my files.

The code I have written so far is:

module.exports = {
  name: 'ember-cli-scss-lint',

  included: function(app) {
    this._super.included.apply(this, arguments);
    this.app = app;
    var _this = this;

    app.registry.add('css', {
      name: this.name,
      ext: 'scss',
      toTree: function(tree) {
        var options, defaultOptions, scsslintConfig;

        options = app.options.scsslintOptions || {};
        defaultOptions = {
          config: path.join(_this.project.root, '/.scss-lint.yml');,
          bundleExec: false
        };

        scsslintConfig = merge(defaultOptions, options);
        return scssLint(tree, scsslintConfig);
      }
    });
  }
};

where config is a YAML file containing the scss-lint configuration. With this setup no files get linted through the call to scssLint. Is there something incredibly blatant that I have done wrong?




Aucun commentaire:

Enregistrer un commentaire