eslint-config-yuanqing
v0.0.11
Published
An opinionated ESLint configuration for TypeScript and Preact projects
Downloads
332
Readme
eslint-config-yuanqing
An opinionated ESLint configuration for TypeScript and Preact projects
Features
- No semi-colons a la Standard
- Auto-formatting with Prettier
- Auto-sorting of
import
statements - Auto-sorting of object keys and JSX
prop
keys - Rules for hooks
Usage
Install:
$ npm install --save-dev eslint@8 prettier@3 typescript@5
$ npm install --save-dev --save-exact \
eslint-config-yuanqing \
@typescript-eslint/[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected]
Then, update package.json
as follows:
{
"scripts": {
"fix": "eslint --fix 'src/**/*.{ts,tsx}'",
"lint": "eslint 'src/**/*.{ts,tsx}'"
},
"eslintConfig": {
"extends": "yuanqing",
"root": true
},
"prettier": "eslint-config-yuanqing/prettier"
}