@citrus-linting/eslint-config
v0.22.0
Published
ESLint config used by CitRUS.
Downloads
42
Maintainers
Readme
@citrus-linting/eslint-config
ESLint config used by CitRUS.
Config list
Usage
JavaScript
Install dependencies:
npm add -D @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting"]
// your options
}
// or only rules
{
"extends": ["@citrus-linting/eslint-config/rules/base"]
// your options
}
TypeScript
Install dependencies:
npm add -D @typescript-eslint/parser @typescript-eslint/eslint-plugin @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/typescript"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/typescript"
]
// your options
}
Svelte
Install dependencies:
npm add -D svelte-eslint-parser eslint-plugin-svelte @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/svelte"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/svelte"
]
// your options
}
Svelte TypeScript
Install dependencies:
npm add -D svelte-eslint-parser eslint-plugin-svelte @typescript-eslint/parser @typescript-eslint/eslint-plugin @citrus-linting/eslint-config
Add extends
field to your ESLint config:
NOTE: Need tsconfig.eslint.json file.
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/svelte-typescript"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/typescript",
"@citrus-linting/eslint-config/rules/svelte"
]
// your options
}
JSON
Install dependencies:
npm add -D jsonc-eslint-parser eslint-plugin-jsonc @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/json"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/json"
]
// your options
}
YAML
Install dependencies:
npm add -D yaml-eslint-parser eslint-plugin-yml @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/yaml"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/yaml"
]
// your options
}
Jest
Install dependencies:
npm add -D eslint-plugin-jest @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/jest"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/jest"
]
// your options
}
JSDoc
Install dependencies:
npm add -D eslint-plugin-jsdoc @citrus-linting/eslint-config
Add extends
field to your ESLint config:
{
"extends": ["@citrus-linting", "@citrus-linting/eslint-config/jsdoc"]
// your options
}
// or only rules
{
"extends": [
"@citrus-linting/eslint-config/rules/base",
"@citrus-linting/eslint-config/rules/jsdoc"
]
// your options
}