3.2.5 • Published 2 days ago

@kriszu/eslint-config v3.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days 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.2.5

2 days ago

3.2.4

2 days ago

3.2.3

15 days ago

3.2.2

1 month ago

3.2.1

1 month ago

3.1.14

3 months ago

3.1.13

3 months ago

3.1.16

3 months ago

3.1.15

3 months ago

3.1.12

3 months ago

3.1.11

3 months ago

3.1.9

4 months ago

3.1.8

4 months ago

3.1.7

4 months ago

3.1.6

4 months ago

3.1.5

4 months ago

3.1.4

5 months ago

3.1.3

5 months ago

3.1.1

5 months ago

3.1.0

5 months ago

2.0.3

10 months ago

2.0.2

10 months ago

2.0.5

10 months ago

2.0.4

10 months ago

2.0.11

8 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.9

8 months ago

2.0.10

8 months ago

2.0.8

9 months ago

2.0.2-beta.1

10 months ago

2.0.1-beta.2

10 months ago

2.0.2-beta.2

10 months ago

2.0.1-beta.0

10 months ago

3.0.4

6 months ago

3.0.3

6 months ago

3.0.2

6 months ago

3.0.1

6 months ago

3.0.7

6 months ago

3.0.6

6 months ago

3.0.5

6 months ago

3.0.0

7 months ago

1.0.2

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.12

12 months ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago