Updated ESLint rules to turn off 'no-console' to allow console statements. Streamlined the GitHub Actions workflow to combine test coverage and TypeDoc generation into a single script for more efficient documentation deployment. Enhanced README with simplified test coverage badges. Added new npm scripts to automate documentation fixes, including a script to correct escaping issues in HTML files. Improved documentation generation, ensuring comprehensive and accurate project documentation.
299 lines
8.5 KiB
Plaintext
299 lines
8.5 KiB
Plaintext
{
|
|
"root": true,
|
|
"parser": "@typescript-eslint/parser",
|
|
"env": {
|
|
"node": true
|
|
},
|
|
"plugins": [
|
|
"@typescript-eslint",
|
|
"deprecation",
|
|
"prettier",
|
|
"import",
|
|
"jsdoc",
|
|
"override",
|
|
"@stylistic"
|
|
],
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:jsdoc/recommended-typescript"
|
|
],
|
|
"parserOptions": {
|
|
"sourceType": "module",
|
|
"project": "./tsconfig.json"
|
|
},
|
|
"rules": {
|
|
"override/require-override": "error",
|
|
"override/require-static-override": "off",
|
|
"prettier/prettier": "warn",
|
|
"array-callback-return": [
|
|
"error"
|
|
],
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_",
|
|
"caughtErrorsIgnorePattern": "^_",
|
|
"args": "none"
|
|
}
|
|
],
|
|
"no-warning-comments": [
|
|
"warn",
|
|
{
|
|
"terms": [
|
|
"@todo"
|
|
],
|
|
"location": "anywhere"
|
|
}
|
|
],
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
"no-prototype-builtins": "off",
|
|
"@typescript-eslint/no-empty-function": "off",
|
|
"deprecation/deprecation": "warn",
|
|
"no-console": "off",
|
|
"@typescript-eslint/naming-convention": [
|
|
"warn",
|
|
{
|
|
"selector": "classProperty",
|
|
"modifiers": [
|
|
"private"
|
|
],
|
|
"format": [],
|
|
"custom": {
|
|
"regex": "^(_{1,2}I[A-Z][a-zA-Z0-9]*_?|_{1,2}[a-z][a-zA-Z0-9]*)$",
|
|
"match": true
|
|
}
|
|
},
|
|
{
|
|
"selector": "classProperty",
|
|
"modifiers": [
|
|
"protected"
|
|
],
|
|
"format": [],
|
|
"custom": {
|
|
"regex": "^(_{1,2}I[A-Z][a-zA-Z0-9]*_?|_{1,2}[a-z][a-zA-Z0-9]*)$",
|
|
"match": true
|
|
}
|
|
},
|
|
{
|
|
"selector": [
|
|
"typeProperty",
|
|
"classProperty"
|
|
],
|
|
"types": [
|
|
"boolean"
|
|
],
|
|
"format": [
|
|
"PascalCase"
|
|
],
|
|
"prefix": [
|
|
"is",
|
|
"has",
|
|
"can",
|
|
"did",
|
|
"will",
|
|
"should"
|
|
],
|
|
"leadingUnderscore": "allow"
|
|
},
|
|
{
|
|
"selector": "memberLike",
|
|
"modifiers": [
|
|
"public"
|
|
],
|
|
"format": [
|
|
"camelCase"
|
|
],
|
|
"leadingUnderscore": "forbid",
|
|
"filter": {
|
|
"regex": "^(Events|Styles|Classes|Then)$",
|
|
"match": false
|
|
}
|
|
},
|
|
{
|
|
"selector": "typeProperty",
|
|
"modifiers": [
|
|
"public"
|
|
],
|
|
"format": null,
|
|
"filter": {
|
|
"regex": ".*-event$",
|
|
"match": true
|
|
},
|
|
"custom": {
|
|
"regex": "^[a-z]+(-[a-z]+)*-event$",
|
|
"match": true
|
|
}
|
|
},
|
|
{
|
|
"selector": "typeProperty",
|
|
"modifiers": [
|
|
"public"
|
|
],
|
|
"format": [
|
|
"camelCase"
|
|
],
|
|
"filter": {
|
|
"regex": ".*-event$|^(Events|Styles|Classes|Then)$",
|
|
"match": false
|
|
}
|
|
}
|
|
],
|
|
"@typescript-eslint/no-unused-expressions": "off",
|
|
"@stylistic/padding-line-between-statements": [
|
|
"warn",
|
|
{
|
|
"blankLine": "always",
|
|
"prev": "*",
|
|
"next": [
|
|
"return",
|
|
"if",
|
|
"multiline-const",
|
|
"function",
|
|
"multiline-expression",
|
|
"multiline-let",
|
|
"block-like"
|
|
]
|
|
},
|
|
{
|
|
"blankLine": "always",
|
|
"prev": [
|
|
"function"
|
|
],
|
|
"next": "*"
|
|
}
|
|
],
|
|
"import/order": [
|
|
"warn",
|
|
{
|
|
"groups": [
|
|
[
|
|
"builtin",
|
|
"external"
|
|
],
|
|
[
|
|
"internal"
|
|
],
|
|
[
|
|
"parent",
|
|
"sibling"
|
|
]
|
|
],
|
|
"newlines-between": "never",
|
|
"alphabetize": {
|
|
"order": "asc",
|
|
"caseInsensitive": true
|
|
}
|
|
}
|
|
],
|
|
"jsdoc/no-undefined-types": [
|
|
"warn",
|
|
{
|
|
"disableReporting": true,
|
|
"markVariablesAsUsed": true
|
|
}
|
|
],
|
|
"jsdoc/require-jsdoc": [
|
|
"warn",
|
|
{
|
|
"require": {
|
|
"FunctionDeclaration": true,
|
|
"MethodDefinition": true,
|
|
"ClassDeclaration": true,
|
|
"ArrowFunctionExpression": false,
|
|
"FunctionExpression": false
|
|
},
|
|
"minLineCount": 10
|
|
}
|
|
],
|
|
"jsdoc/require-param": [
|
|
"warn",
|
|
{
|
|
"exemptedBy": [
|
|
"deprecated",
|
|
"inheritdoc"
|
|
]
|
|
}
|
|
],
|
|
"jsdoc/require-description": [
|
|
"warn",
|
|
{
|
|
"contexts": [
|
|
"FunctionDeclaration",
|
|
"MethodDefinition",
|
|
"ClassDeclaration",
|
|
"ClassExpression"
|
|
],
|
|
"descriptionStyle": "body",
|
|
"exemptedBy": [
|
|
"deprecated",
|
|
"inheritdoc"
|
|
]
|
|
}
|
|
],
|
|
"jsdoc/require-returns": [
|
|
"warn",
|
|
{
|
|
"checkGetters": false,
|
|
"exemptedBy": [
|
|
"deprecated",
|
|
"inheritdoc"
|
|
]
|
|
}
|
|
],
|
|
"jsdoc/check-tag-names": [
|
|
"warn",
|
|
{
|
|
"definedTags": [
|
|
"remarks",
|
|
"jest-environment",
|
|
"singleton"
|
|
]
|
|
}
|
|
],
|
|
"jsdoc/check-alignment": "warn",
|
|
"jsdoc/check-indentation": "warn",
|
|
"jsdoc/no-restricted-syntax": [
|
|
"error",
|
|
{
|
|
"contexts": [
|
|
{
|
|
"context": "MethodDefinition[kind='get']",
|
|
"comment": "JsdocBlock:has(JsdocTag[tag='returns'])",
|
|
"message": "JSDoc @returns comments are not allowed in getters."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"@typescript-eslint/prefer-readonly": "warn",
|
|
"@typescript-eslint/explicit-function-return-type": [
|
|
"warn",
|
|
{
|
|
"allowExpressions": true,
|
|
"allowTypedFunctionExpressions": true,
|
|
"allowHigherOrderFunctions": true
|
|
}
|
|
],
|
|
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
|
|
"@typescript-eslint/no-misused-promises": "warn",
|
|
"@typescript-eslint/prefer-optional-chain": "warn"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"*.test.ts",
|
|
"*.spec.ts"
|
|
],
|
|
"rules": {
|
|
"jsdoc/require-jsdoc": "off",
|
|
"jsdoc/require-param": "off",
|
|
"jsdoc/require-description": "off",
|
|
"jsdoc/require-returns": "off",
|
|
"@typescript-eslint/explicit-function-return-type": "off"
|
|
}
|
|
}
|
|
]
|
|
} |