First, install the package with your preferred package manager
npm install @tbhesswebber/eslint-config
Next, add the config to your Eslint config via the extends
property (see the official documentation here).
{
"extends": ["@tbhesswebber"]
}
If using a named config, make sure that you use @tbhesswebber/eslint-config/<config-name>
This is the default config and it is the same as using core
, but without @tbhesswebber/eslint-config/format
, which you should apply yourself (if you want to use it). Effectively, you should use this configuration if you have additional configurations to extend that take precedence over this one and need to apply the formatting rules at the end.
You can manually install all of the peer dependencies from every configuration below or use the install-peerdeps
package via npx install-peerdeps -D @tbhesswebber/eslint-config
This configuration is intended to be a complete "extends" clause for a standard JavaScript project (see note for TypeScript or React projects). This is generally satisfactory for getting a project bootstrapped quickly, kicking the can of loosening the configuration or making it more targeted to the current project down the road.
typescript
/react
and format
configurations instead of this one.
eslint-plugin-unicorn
eslint-config-airbnb-base
eslint-plugin-eslint-comments
eslint-plugin-import
This config is exclusively for formatting configurations and should always appear last in your extends
array.
eslint-plugin-prettier
eslint-config-prettier
prettier
This config enables a highly opinionated set of rules for TypeScript. This will be much slower to run without a cache, which shouldn't be an issue for IDEs, but may have an impact on CI costs.
typescript
@typescript-eslint/parser
@typescript-eslint/eslint-plugin
eslint-import-resolver-typescript
eslint-plugin-import
This config enables a number of rules for React projects, including warnings on possible security and performance problems.
eslint-config-airbnb
eslint-plugin-import
eslint-plugin-react
eslint-plugin-react-hooks
eslint-plugin-jsx-a11y