eslint-config-trustpilot
v6.0.0
Published
Shared ESLint config for Trustpilot projects
Downloads
911
Readme
eslint-config-trustpilot
Shared eslint and prettier config for Trustpilot projects.
In short, we use prettier for code formatting and eslint for everything else.
Installation
npm i -D eslint-config-trustpilot
You also need to install the following peer dependencies:
npm i -D @babel/eslint-parser eslint eslint-plugin-prettier eslint-config-prettier prettier
The browser config additionally requires:
npm i -D eslint-plugin-html
The React config additionally requires:
npm i -D eslint-plugin-react
The Typescript config additionally requires:
npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser
Getting Started
Add "extends": "trustpilot"
to your .eslintrc
file:
{
"extends": "trustpilot"
}
This package includes the following complete and ready to use configurations:
trustpilot
- ES6 configurationtrustpilot/test
- Mocha teststrustpilot/react
- React and JSXtrustpilot/browser
- ES6 browsertrustpilot/typescript
- Typescript (Use alongsidetrustpilot/react
to have bothtypescript
andreact
)