stylelint-config-lintheus

1.2.2 • Public • Published

Lintheus

npm version License

My former co-worker CSS code review rules as a stylelint configuration.

Usage

1. Install a compatible version of stylelint (we express it as a peerDependency so you can choose a version that works for you).

npm install --save-dev stylelint stylelint-config-lintheus

2. Configure your stylelint configuration file to extend this package:

{
  "extends": "stylelint-config-lintheus",
  "rules": {
    // Add overrides and additional rules here
  }
}

SCSS support

Lintheus doesn't support SCSS syntax yet.

Alternatively, you can use stylelint-config-recommended-scss or stylelint-config-xo-scss.

FAQ

Why the project name is Lintheus?

Is a joke with my former co-worker name, Matheus and linters.

How can i get this up and running fast?

Just create the .stylelintrc file with:

cat << EOF > .stylelintrc
{
  "extends": "stylelint-config-lintheus"
}
EOF

I need to break a rule... 😞

You should strive for not breaking any rule at all.

But if is a must, then, you should make an exception only on the offending line using stylelint-disable-next-line, eg:

/* stylelint-disable-next-line selector-max-specificity */
.accordion__input:checked + .accordion__label > .accordion__label-image {

If you managed to get two or more offences in the same line, then separate the exceptions with comma, eg:

/* stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors */
.accordion__input:checked + .accordion__label > .accordion__label-content > .accordion__label-status {

Roadmap

  • [ ] Document the decision behind every rule.
  • [ ] SCSS support.

Licence

BSD 2-Clause

Package Sidebar

Install

npm i stylelint-config-lintheus

Weekly Downloads

2

Version

1.2.2

License

BSD-2-Clause

Unpacked Size

12 kB

Total Files

5

Last publish

Collaborators

  • onlurking