3.3.1 • Published 9 months ago

@kriszu/eslint-config v3.3.1

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

@kriszu/eslint-config npm

kriszu eslint configuration based on @antfu/eslint-config.

Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3.

Features

  • Support Vue 2 and 3 out-of-box.
  • Support JSON(5), YAML, Markdown...
  • Single quotes, no semi
  • Auto fix for formatting (aimed to be used standalone without Prettier)
  • Sorted imports, dangling commas

You don't need .eslintignore normally as it has been provided by the preset.

Install

pnpm i -D eslint @kriszu/eslint-config

Config .eslintrc

{
  "extends": "@kriszu/eslint-config"
}

Add script for package.json

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Config VSCode auto fix File .vscode/setting.json

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

Lint Staged

If you want to apply lint and auto-fix before every commit, you can add the following to your package.json:

{
  "simple-git-hooks": {
    "pre-commit": "pnpm lint-staged"
  },
  "lint-staged": {
    "*": "eslint --fix"
  }
}

and then

npm i -D lint-staged simple-git-hooks

Reference project

antfu/eslint-config

sxzz/eslint-config

License

MIT License © 2022-PRESENT WSZ

3.3.1

9 months ago

3.2.9

1 year ago

3.2.8

1 year ago

3.2.12

12 months ago

3.2.11

12 months ago

3.2.10

12 months ago

3.2.7

1 year ago

3.2.5

1 year ago

3.2.4

1 year ago

3.2.3

1 year ago

3.2.2

1 year ago

3.2.1

1 year ago

3.1.14

1 year ago

3.1.13

1 year ago

3.1.16

1 year ago

3.1.15

1 year ago

3.1.12

1 year ago

3.1.11

1 year ago

3.1.9

1 year ago

3.1.8

1 year ago

3.1.7

2 years ago

3.1.6

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

3.1.3

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.11

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.8

2 years ago

2.0.2-beta.1

2 years ago

2.0.1-beta.2

2 years ago

2.0.2-beta.2

2 years ago

2.0.1-beta.0

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.0

2 years ago

1.0.2

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.0

3 years ago