@formsort/eslint-config
Shared ESLint configuration for use across all projects
Usage
- Install this project and its
peerDependencies
in your respository:
yarn add --dev @formsort/eslint-config eslint-plugin-prefer-arrow eslint-plugin-jsdoc@24 eslint-plugin-prettier eslint-config-prettier eslint-plugin-import prettier eslint-plugin-react @typescript-eslint/eslint-plugin
- Ensure that your project has a
tsconfig.json
in the root. If you want, use the formsort common tsconfig. - Create a
.eslintrc.js
in the root with the following content:
module.exports = {
extends: "@formsort/eslint-config"
};
- For convenience, you may want to add the following scripts to your package.json
{
"scripts": {
"format": "eslint --ext .ts,.tsx src --fix",
"lint": "eslint --ext .ts,.tsx src"
}
}