1.0.1 • Published 8 years ago

stylelint-config-jimdo v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

stylelint-config-jimdo

NPM version Build Status

The standard shareable config for stylelint use inside Jimdo.

This config aims to enforce a common set of rules for writing CSS in all our Jimdo applications. It has rules that cover standard css, scss and also css modules. Like any other stylelint config you are free to extend this config for your application, but we hope that you don't need to, and instead we can try to improve this config and make it the "standard" for all our applications.

To see the rules that this config uses, please read the config itself.

Installation

yarn install --dev @jimdo/stylelint-config-jimdo

Usage

After you've installed stylelint-config-standard locally within your project, just set your stylelint config to:

{
  "extends": "@jimdo/stylelint-config-jimdo"
}

Fixing linting issues

Stylelint can auto-fix a lot of the issues it reports. To set this up you can have a stylelint:fix command in the scripts section of your package.json, for example like this:

"stylelint": "stylelint 'src/**/*.scss'",
"stylelint:fix": "stylelint 'src/**/*.scss' --fix"

After that you can run yarn stylelint:fix to have Stylelint fix all the issues it can fix.

Extending the config

If you really have to have your own rules, then simply add a "rules" key to your config, then add your overrides and additions there.

For example, to change the at-rule-no-unknown rule to use its ignoreAtRules option, change the indentation to tabs, turn off the number-leading-zero rule,and add the unit-whitelist rule:

{
  "extends": "@jimdo/stylelint-config-jimdo",
  "rules": {
    "at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": ["extends", "ignores"]
      }
    ],
    "indentation": "tab",
    "number-leading-zero": null,
    "unit-whitelist": ["em", "rem", "s"]
  }
}
1.0.1

8 years ago

1.0.0

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago