4.0.0 • Published 6 years ago

ember-cli-stylelint v4.0.0

Weekly downloads
6,944
License
MIT
Repository
github
Last release
6 years ago

dependencies ember-observer downloads build

Installation

ember-cli-stylelint

An Ember-CLI addon that allows easy integration with stylelint

Installation

ember install ember-cli-stylelint

Syntax

By default syntax is scss, if you want to use another one you need to configure the option in your ember-cli-build

var app = new EmberApp(defaults, {
  stylelint: {
    linterConfig:{
      syntax: 'less'
    },
  }
});

You can use one of the following values for syntax

  • scss
  • css
  • less
  • sugarss

Configuration

Linting configuration can be added in a

  • a stylelint property in package.json
  • a .stylelintrc file
  • a stylelint.config.js file exporting a JS object

as required by stylelint.

the parent key is styleLint

Options

linterConfig {Object}

Hash as specified by stylelint

doesn't accept files option

onError {function}

A hook that allows you to do whatever you want

consoleLogger {function}

This function is called every time a file has an error. It allows you to generate custom error output according to your preferences.

testFailingFiles {boolean}

If true it will generate a unit test if the file fails lint.

testPassingFiles {boolean}

If true it will generate a unit test if the file passes lint.

generateTests {boolean}

If true it will generate tests for both passing and failing tests, overrides the testPassingFiles and testFailingFiles

disableConsoleLogging {boolean}

If true it will disable logging of errors to console

includePaths {array of strings}

Paths representing trees to lint. The app tree itself will always be included. In an addon, that path is tests/dummy/app/styles/ (by default). Addon authors can set includePaths: [ 'app/styles' ] to also lint styles in app/styles/.

Running Tests

  • npm test

Development

All tests are currently contained in tests/runner.js. This uses Mocha/Chai, not Ember Testing. Tests can be run with:

npm test

Contributing

See the Contributing guide for details.

License

PRs are welcomed and should be issued to the master branch.

4.0.0

6 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.15.0

9 years ago

0.14.0

9 years ago

0.13.0

9 years ago

0.12.0

9 years ago

0.11.0

9 years ago

0.10.0

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.8.0

9 years ago

0.7.1

9 years ago

0.7.0

9 years ago

0.6.3

9 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.5

10 years ago