Skip to content

⚙️ An opinionated ESLint configuration for TypeScript and Preact projects

License

Notifications You must be signed in to change notification settings

yuanqing/eslint-config-yuanqing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-yuanqing npm Version

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/eslint-plugin@8.0.1 \ 
    eslint-plugin-import@2.29.1 \ 
    eslint-plugin-prettier@5.2.1 \ 
    eslint-plugin-react@7.35.0 \ 
    eslint-plugin-react-hooks@4.6.2 \ 
    eslint-plugin-simple-import-sort@12.1.1 \ 
    eslint-plugin-sort-keys-fix@1.1.2

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"
}

License

MIT

About

⚙️ An opinionated ESLint configuration for TypeScript and Preact projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published