Skip to content
Chromatix custom config for ESLint. Based heavily on the WordPress Coding Standards but with some of our own too.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.eslintrc.js
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

eslint-config-chromatix

Shareable config for ESLint 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/eslint-config-chromatix

Install locally to one project:

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

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

Usage

Add this to your .eslintrc.js file:

module.exports = {
  'extends': [
    '@chromatix/chromatix'
  ]
};

Then:

  • Using globally?
    Run eslint "**/*.js".

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

Additional Tips

  • Outputting code coverage reports with Jest? Add --ignore-pattern coverage/ to your eslint command.
  • Want ESLint to list the filenames it is linting, even if everything passes? Add cross-env as a dev dependency and then add cross-env DEBUG=eslint:cli-engine before your eslint command.

See also

License

MIT.

You can’t perform that action at this time.