@kevinmarrec/eslint-config

0.0.3 • Public • Published

@kevinmarrec/eslint-config

npm version npm downloads Github Actions

Based on @antfu/eslint-config by Anthony Fu :

  • Single quotes, no semi
  • Auto fix for formatting (aimed to be used standalone without Prettier)
  • Designed to work with TypeScript, Vue out-of-box
  • Lint also for json, yaml, markdown
  • Sorted imports, dangling commas for cleaner commit diff
  • Reasonable defaults, best practices, only one-line of config

Additionnally, this configuration overrides some rules to match my personal preferences :

  • @typescript-eslint/no-unused-vars : Warning (warn) instead of Error (error)
  • @typescript-eslint/space-before-function-paren : Set to always for spaces before function parenthesis

Usage

Install

pnpm add -D eslint @kevinmarrec/eslint-config

Config .eslintrc

{
  "extends": "@kevinmarrec"
}

Add script for package.json

For example:

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

Config VS Code auto fix

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

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

Copyright

This configuration is based on @antfu/eslint-config by Anthony Fu

License

Made with ❤️

Published under the MIT License

Readme

Keywords

Package Sidebar

Install

npm i @kevinmarrec/eslint-config

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

4.18 kB

Total Files

4

Last publish

Collaborators

  • kevinmarrec