eslint-config-heck contains an ESLint configuration for ES2015+, TypeScript, and React.
npm install --save-dev eslint eslint-config-heck
To use one of the included configurations, create a .eslintrc.json
file and use the extends
keyword.
For a Node.js project use:
{
"extends": "heck/node"
}
If you are in the browser, use:
{
"extends": "heck/browser"
}
Optionally you can enable some complexity rules by using the complexity configuration in addition to the node or browser rules:
{
"extends": ["heck/node", "heck/complexity"]
}
Optionally you can switch to another import sorting rule, which groups the imports by type and supports auto fixing. You can enable this rule by adding the groupImports configuration in addition to the node or browser rules:
{
"extends": ["heck/node", "heck/groupImports"]
}
If you are using react-native, you can enable react-native specific rules:
{
"extends": ["heck/node", "heck/reactNative"]
}
To disable some of the formatting rules (when using a formatter like prettier or Biome) you can use this configuration:
{
"extends": ["heck/node", "heck/noFormatting"]
}
If you are using Biome you can use "nodeWithBiome" or "browserWithBiome":
{
"extends": ["heck/nodeWithBiome"]
}
If you are using Biome you can also extend your Biome config with the "biomeLinting.json":
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["eslint-config-heck/biome"]
}