0.2.0 • Published 2 years ago

@condorhero/eslint-config-typescript v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@condorhero/eslint-config-typescript

Note: The code comes from @antfu/eslint-config

  • Double quotes, must semi
  • Auto fix for formatting (aimed to be used standalone without Prettier)
  • JavaScript, TypeScript 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

Usage

Install

pnpm add -D eslint @condorhero/eslint-config-typescript

# or with npm
npm install -D eslint @condorhero/eslint-config-typescript

Config

For example .eslintrc file:

{
	"extends": "@condorhero/eslint-config-typescript"
}

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

Add script for package.json

For example:

{
	"scripts": {
		"lint": "eslint ."
	}
}

Config VS Code auto fix

Create .vscode/settings.json

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

License

MIT