@clickbar/eslint-config

eslint config used at clickbar.


License
MIT
Install
npm install @clickbar/eslint-config@9.0.2

Documentation

eslint-config-clickbar

Opinionated eslint set of rules with support for Vue and Typescript. Used in conjunction with prettier.

Usage

Install dependencies.

pnpm add -D eslint @clickbar/eslint-config
pnpm add -D --save-exact prettier

Add the scripts to your package.json scripts:

"scripts": {
  "fix": "pnpm lint --fix && pnpm format",
  "format": "pnpm prettier --write",
  "lint": "eslint .",
  "prettier": "prettier . --cache",
  "test": "pnpm lint && pnpm prettier --check"
},

Edit .eslintrc.json:

{
  "extends": ["@clickbar"]
}

If not present, also create a .prettierignore:

# Laravel
public
vendor
storage

*.d.ts

composer.json
composer.lock
pnpm-lock.yaml

VS Code config for auto fixing

Make sure you also install the Prettier extension and add the following to your settings.json:

"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
},

License

MIT