This repository has been archived on 2024-01-15. You can view files and clone it, but cannot push or open issues or pull requests.
JSDocValidator/.eslintrc.json
2022-11-01 04:06:11 +01:00

88 lines
2.3 KiB
JSON

{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": ["tsconfig.json"],
"sourceType": "module"
},
"env": {
"node": true
},
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"rules": {
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "typeLike",
"format": ["PascalCase", "camelCase"]
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": ["classProperty", "typeProperty"],
"modifiers": ["readonly"],
"format": ["UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["const"],
"format": ["UPPER_CASE", "camelCase"]
},
{
"selector": ["classProperty", "variableLike"],
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will", "show", "hide", "with", "to", "are", "need"]
},
{
"selector": ["classProperty", "variableLike"],
"types": ["boolean"],
"modifiers": ["readonly"],
"format": ["UPPER_CASE"],
"prefix": ["IS_", "SHOULD_", "HAS_", "CAN_", "DID_", "WILL_", "SHOW_", "HIDE_", "WITH_", "TO_", "ARE_", "NEED_"]
}
],
"@typescript-eslint/typedef": [
"error",
{
"arrayDestructuring": false,
"arrowParameter": false,
"memberVariableDeclaration": false,
"objectDestructuring": false,
"parameter": false,
"propertyDeclaration": true,
"variableDeclaration": false,
"variableDeclarationIgnoreFunction": true
}
],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-function": ["error", { "allow": ["arrowFunctions"] }],
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
"@typescript-eslint/semi": "error",
"quotes": ["error", "single"],
"max-classes-per-file": "error",
"curly": "error",
"eqeqeq": "error",
"no-throw-literal": "error",
"semi": "error"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}