Skip to content

hex-digital/config-eslint

Repository files navigation

@hexdigital/eslint-config

npm

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

Usage

Install

pnpm add -D eslint @hexdigital/eslint-config
# or
yarn add -D eslint @hexdigital/eslint-config

Config .eslintrc

{
  "extends": "@hexdigital"
}

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

Add script for package.json

For example:

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

Config VS Code auto fix

Create .vscode/settings.json

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

Releasing

pnpm run release

Check Also

License

MIT License © 2022-PRESENT Hex Digital

Attribution

Big thank you to Antfu for his eslint config that this pulls heavily from.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •