@21st.digital/eslint-config

Airbnb Eslint rules with a little 21st digital magic 🧙‍♂️

Usage no npm install needed!

<script type="module">
  import 21stDigitalEslintConfig from 'https://cdn.skypack.dev/@21st.digital/eslint-config';
</script>

README

21st Eslint + Prettier 🎉

Airbnb Eslint rules with a little 21st digital magic 🧙‍♂️

Install

Project

  1. npx install-peerdeps --dev @21st.digital/eslint-config

  2. in .eslintrc or in package.json in property eslintConfig

{
  'extends': ['@21st.digital']
}

Note: remove react-app when using create-react-app

Global

linting in all js files

  1. npx install-peerdeps --global eslint-config-21st
  2. in ~/.eslintrc:
{
  'extends': ['@21st.digital']
}

VS Code

  1. install ESLint extension
  2. Setup VSCode settings in CMD+SHIFT+P -> Preferences: Open Settings (JSON):
"[javascriptreact]": {
  "editor.formatOnSave": false
},
"[javascript]": {
  "editor.formatOnSave": false
},
"[typescript]": {
  "editor.formatOnSave": false
},
"editor.codeActionsOnSave": {
  "source.fixAll": true
},
/*
  prettier extension is obselete,
  since eslint is using the prettier plugin
  use this settings if you still use it for other
*/
"prettier.disableLanguages": ["javascript", "javascriptreact"],

Contribute

Rules are split into different exports found in the rules folder.