Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Latest commit

 

History

History

eslint-config-react

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@soyhuce/eslint-config-react

ESLint shareable config for React component code style.

Installation

pnpm add -D @soyhuce/eslint-config-react

# with standard config and ESLint
pnpm add -D eslint @soyhuce/eslint-config @soyhuce/eslint-config-react

Usage

In order to use this config, choose the one you want and add this configuration to your package.json:

{
 "eslintConfig": {
   "extends": [
     "@soyhuce/eslint-config",
+    "@soyhuce/eslint-config-react"
   ]
 }
}

Or add a .eslintrc.js file to your project root containing:

module.exports = {
  extends: [
    '@soyhuce/eslint-config',
+   '@soyhuce/eslint-config-react'
  ]
}

VSCode integration

We recommend turning on VSCode settings to automatically run eslint --fix on save.

"editor.codeActionsOnSave": {
+  "source.fixAll.eslint": true
}

This will automatically format your code once you save. You don't need VSCode prettier extension enabled or running on save as eslint will automatically run prettier for you.

License

MIT