@readme/eslint-config

ReadMe coding standards

Usage no npm install needed!

<script type="module">
  import readmeEslintConfig from 'https://cdn.skypack.dev/@readme/eslint-config';
</script>

README

@readme/eslint-config

Core coding standards for ReadMe projects.

Installation

You'll need to install ESLint and Prettier into your project. Use this shortcut to install them alongside the config (if using npm 5+):

npx install-peerdeps --dev @readme/eslint-config

If you already have eslint and prettier installed in your project, just run this command to install the config:

npm install --save @readme/eslint-config

Usage

Create a .eslintrc file with the following contents:

{
  "extends": [
    "@readme/eslint-config"
  ]
}

Configs

Note: @readme/eslint-config/* subconfigs must be loaded alongside @readme/eslint-config, or at least take advantage of a root .eslintrc config that has root set to true.

  • @readme/eslint-config
  • @readme/eslint-config/docs
    • Will enforce JSDoc blocks throughout a codebase.
  • @readme/eslint-config/react
  • @readme/eslint-config/testing
    • This config assumes you're using Jest, but if you're using Mocha and Chai you should use @readme/eslint-config/testing-mocha instead.
  • @readme/eslint-config/typescript
    • When using this you should tandem extend your config with @readme/eslint-config also.

Prettier

Included in this is our shared Prettier config. You can use it in your application by adding the following to your package.json:

"prettier": "@readme/eslint-config/prettier"

Contributing

To assist in cleaner commit logs and a better changelog, all commit messages must be formatted against the https://commitlint.js.org/ standards.

See @commitlint/config-conventional for some more information.