Central shareable eslint config for all MenuDocs projects
npm i -D eslint-config-tesseract eslint
yarn add -D eslint-config-tesseract eslint
- npm:
npm i --save-dev MenuDocs/eslint-config-tesseract eslint
- yarn:
yarn add -D MenuDocs/eslint-config-tesseract eslint
{
"extends": "tesseract"
}
- npm:
npm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
- yarn:
yarn add -D @typescript-eslint/parser @typescript-eslint/eslint-plugin
{
"extends": "tesseract/typescript"
}
- npm:
npm i --save-dev prettier eslint-plugin-prettier eslint-config-prettier
- yarn:
yarn add -D prettier eslint-plugin-prettier eslint-config-prettier
{
"extends": "tesseract/prettier"
}
Note: Prettier config extends TypeScript eslint config.
{
"extends": "tesseract/prettier/typescript"
}
ESLint may display a lot of warnings and errors about your code when you start using it, but don't let this startle you. In order to get started, follow these steps:
- Create a file in your root directory named
.eslintrc.json
(where your main project file is located). - Copy the code below into the file.
{
"extends": "tesseract"
}