1.2.3 • Published 2 years ago
@secondcloset/eslint-config-react v1.2.3
Secondcloset eslint-config-react
Installation
Run the following command:
npm i --save-dev @secondcloset/eslint-config-react @secondcloset/prettier-config
How to use
- In your react project, create an
.eslintrc.js
file and add these changes:
module.exports = {
extends: ["@secondcloset/react"],
parserOptions: {
project: "./tsconfig.json",
}
};
- Add these packages in your repo's package.json
devDependencies
attribute:
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react": "^1.1.7",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-react-hooks": "^4.2.0",
"prettier": "^2.4.1"
- Add these scripts in your repo's package.json
scripts
attribute:
"lint": "eslint src --ext .js,.ts,.tsx",
"lint:fix": "eslint src --ext .js,.ts,.tsx --fix",
- Install the newly added packages:
npm install
- Add the prettier config to your package.json file:
"prettier": "@secondcloset/prettier-config"
- Test the configuration:
npm run lint
1.2.0
2 years ago
1.1.1
2 years ago
1.2.3
2 years ago
1.2.1
2 years ago
1.1.1-beta.0
2 years ago
1.1.1-beta.1
2 years ago
1.1.0-alpha.1
2 years ago
1.1.0
2 years ago
1.1.0-alpha.2
2 years ago
1.1.0-alpha.0
2 years ago
1.1.0-alpha.3
2 years ago
1.1.0-alpha.4
2 years ago
1.0.0
3 years ago
1.0.0-alpha.0
3 years ago