1.0.0 • Published 1 year ago
@moonstar-x/eslint-config v1.0.0
@moonstar-x/eslint-config
This repo contains a custom ESLint config used by moonstar-x.
Usage
This config is meant for ESLint version 8, make sure to install it in your project as well with:
npm install eslint@8This config exposes multiple configs depending on the type of the project you're using.
Node
For Node.js projects, you should use the following config inside your eslint config:
{
"extends": ["@moonstar-x/eslint-config/rules/node"]
}Node (TypeScript)
For Node.js with TypeScript projects, you should use the following config inside your eslint config:
{
"extends": ["@moonstar-x/eslint-config/rules/node", "@moonstar-x/eslint-config/rules/typescript"]
}React
For React projects, you should use the following config inside your eslint config:
{
"extends": ["@moonstar-x/eslint-config/rules/react"]
}React (TypeScript)
For React with TypeScript projects, you should use the following config inside your eslint config:
{
"extends": ["@moonstar-x/eslint-config/rules/react/typescript"]
}Rule Overriding
In addition to including this config and its derivatives, you can override rules by adding the following to your eslint config:
{
"extends": [
"@moonstar-x/eslint-config/rules/type"
],
"rules": {
"eslint-rule-name": ["enabled", "options"]
...
}
}1.0.0
1 year ago