create-react-linters
v1.0.1
Published
setup all linters you like for your react app in 1 minute π
Downloads
3
Maintainers
Readme
Create React Linters π
Setup all linters you like and don't let π© slip into your code base!
Eslint | Stylelint | Commitlint | Prettier | EditorConfig | Commitizen
Useage
Prerequisites:
- Node.js (
^12.22.0
,^14.17.0
, or>=16.0.0
) - Project initialized with
git
andpackage.json
npx create-react-linters@latest
π― Eslint
Find and fix problems in your JavaScript code.
we are extending airbnb
configurations. no extra rules are added.
Provided:
- eslint-config-airbnb
- eslint-config-airbnb-typescript
Typescript Only
- @typescript-eslint/eslint-plugin
Typescript Only
- @typescript-eslint/parser
Typescript Only
- eslint-plugin-import
- eslint-plugin-jsx-a11y
- eslint-plugin-react
- eslint-plugin-react-hooks
- eslint-plugin-jest
- eslint-plugin-jest-dom
- eslint-plugin-testing-library
Scripts
npm run eslint:check
npm run eslint:fix
β¨ Stylelint
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
we are extending standard
configurations. no extra rules are added.
Provided:
- stylelint-config-standard
- stylelint-config-standard-scss
SCSS/SASS Only
Scripts
npm run stylelint:check
npm run stylelint:fix
β¨ Commitlint
Helps your team adhering to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy.
we are extending config-conventional
configurations. no extra rules are added.\
Learn more about conventional commits. here
Provided:
π Prettier
An opinionated code formatter.prettierrc.json
is created with some configurations, feel free to update them.\
Learn more about prettier options. here
Provided:
- eslint-config-prettier
if.eslintrc.json found
- eslint-plugin-prettier
if.eslintrc.json found
- stylelint-config-prettier
if.stylelintrc.json found
- stylelint-prettier
if.stylelintrc.json found
Scripts
npm run prettier:check
npm run prettier:fix
π EditorConfig
Maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
Default .editorconfig
generated file is used\
π» Commitizen
When you commit with Commitizen, you'll be prompted to fill out any required commit fields at commit time.\
npm run commit
πΆ Husky & Lint-Staged
Run linters against staged git files and don't let π© slip into your code base!\
pre-commit | eslint, stylelint and prettier commit | commitlint