Skip to content

Chromatix custom config for stylelint. Based heavily on the WordPress Coding Standards but with some of our own too.

License

Notifications You must be signed in to change notification settings

ChromatixAU/stylelint-config-chromatix

Repository files navigation

stylelint-config-chromatix

Shareable config for stylelint for custom standards at Chromatix Digital Agency.

Based heavily on the WordPress Coding Standards but with some of our own too. Most notably, two spaces instead of tabs. Soz.

This config is still in development. If you have suggestions for improvement or if you disagree with anything this config makes you do, feel free to file an issue.

Publishing to npm/yarn

NOTE: This package is available on npm and once a Pull request has been merged to master the master branch needs to be published to npm/yarn to reflect any changes or updates.

Consult LastPass or Julian for where to find login details for https://www.npmjs.com

Details for how to publish the config to npm can be found here: https://yarnpkg.com/lang/en/docs/publishing-a-package/

Installation

Install globally to use on any project:

yarn global add @chromatix/stylelint-config-chromatix

Install locally to one project:

yarn add --dev @chromatix/stylelint-config-chromatix

You'll also need to have stylelint installed in the same manner.

Usage

Add this to your .stylelintrc.js file:

module.exports = {
  'extends': [
    require.resolve( '@chromatix/stylelint-config-chromatix' )
  ]
};

Then:

  • Using globally?
    Run stylelint "**/*.scss".

  • Using locally?
    Add "lint:sass": "stylelint \"**/*.scss\"" to your package.json's "scripts" section, then run yarn lint:sass

Additional Tips

  • Want stylelint to list the filenames it is linting, even if everything passes? Add --formatter verbose to your stylelint command.

See also

License

MIT.

About

Chromatix custom config for stylelint. Based heavily on the WordPress Coding Standards but with some of our own too.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published