0.4.1 • Published 10 months ago

@sennery/eslint-config v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@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:

  • Config for TS

    You have to set ENV variable ESLINT_TSCONFIG with location of TS config for type based linting (tsconfig.eslint.json - is searched by default). If there is no TS config - type based linting will not work

    {
      "extends": "@sennery/eslint-config/typescript"
    }
  • Config for Vue

    {
      "extends": "@sennery/eslint-config/vue"
    }
  • Basic config for JS (already included in all previous configs)

    { 
      "extends": "@sennery/eslint-config/basic"
    }

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
0.4.1

10 months ago

0.4.0

11 months ago

0.3.4

11 months ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago