0.1.4 • Published 4 years ago
@wearesuperare/eslint-config v0.1.4
@wearesuperare/eslint-config
Installation
Full installation
yarn add -D @wearesuperare/eslint-config;
npx install-peerdeps --dev @wearesuperare/eslint-config;or
yarn add -D @wearesuperare/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import-helpers eslint-plugin-react eslint-plugin-react-hooks typescriptAdd to your eslint config (.eslintrc, or eslintConfig field in package.json):
{
"extends": "@wearesuperare"
}Installation using only JavaScript
yarn add -D eslint @wearesuperare/eslint-config eslint-plugin-import-helpersAdd to your eslint config (.eslintrc, or eslintConfig field in package.json):
{
"extends": "@wearesuperare/eslint-config/js"
}Installation using JavaScript and JSX
yarn add -D eslint @wearesuperare/eslint-config eslint-plugin-import-helpers eslint-plugin-react eslint-plugin-react-hooksAdd to your eslint config (.eslintrc, or eslintConfig field in package.json):
{
"extends": "@wearesuperare/eslint-config/jsx"
}Installation usign only TypeScript
yarn add -D eslint @wearesuperare/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import-helpers typescriptAdd to your eslint config (.eslintrc, or eslintConfig field in package.json):
{
"extends": "@wearesuperare/eslint-config/ts"
}Installation using TypeScript and JSX
It's the same thing as full installation
Setup
Follow scripts create:
npm set-script lint "eslint ."
npm set-script lint:fix "eslint . --fix"Setup with husky using yarn:
npx husky add .husky/pre-push 'yarn lint'Setup with husky using npm:
npx husky add .husky/pre-push 'npm run lint'