npm.io
0.4.1 • Published 3 years ago

@sennery/eslint-config

Licence
MIT
Version
0.4.1
Deps
3
Size
17 kB
Vulns
0
Weekly
0

@sennery/eslint-config

My personal eslint config. Key features:

  • TypeScript + Vue 3
  • Single quotes
  • No semicolons
  • 2 spaces indent
  • Dangling commas
  • Sorted imports

Usage

Intall

Add @sennery/eslint-config to your project as development dependency:

pnpm add -D @sennery/eslint-config
Config .eslintrc

Add @sennery to your eslint config for full TypeScript and Vue support:

{
  "extends": "@sennery"
}

... or use separate configs:

Eslint scripts

Add following eslint commands to your package.json:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}
Config auto fix
  • VS Code

    Install VS Code ESLint extension and create .vscode/settings.json

    {
      "prettier.enable": false,
      "editor.formatOnSave": false,
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
      }
    }
  • WebStorm

    Open the settings (Ctrl+Alt+S) and go to Languages & Frameworks > JavaScript > Code Quality Tools > ESLint. Enable the following setting:

  • Run eslint --fix on save

Keywords