|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "es6": true, |
| 4 | + "node": true |
| 5 | + }, |
| 6 | + "extends": [ |
| 7 | + "eslint:recommended", |
| 8 | + "plugin:@typescript-eslint/recommended", |
| 9 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 10 | + "plugin:jsdoc/recommended", |
| 11 | + "plugin:prettier/recommended" |
| 12 | + ], |
| 13 | + "parser": "@typescript-eslint/parser", |
| 14 | + "parserOptions": { |
| 15 | + "project": ["./tsconfig.lint.json"], |
| 16 | + "warnOnUnsupportedTypeScriptVersion": false |
| 17 | + }, |
| 18 | + "plugins": ["@typescript-eslint", "prettier", "jsdoc", "spellcheck", "inclusive-language"], |
| 19 | + "rules": { |
| 20 | + "curly": ["error"], |
| 21 | + "linebreak-style": ["error", "unix"], |
| 22 | + "no-case-declarations": "warn", |
| 23 | + "quotes": ["error", "single", { "avoidEscape": true }], |
| 24 | + "semi": ["error", "always"], |
| 25 | + |
| 26 | + "@typescript-eslint/ban-ts-comment": "off", |
| 27 | + "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }], |
| 28 | + "@typescript-eslint/indent": ["error", 2, { "SwitchCase": 1, "ignoredNodes": ["MemberExpression"] }], |
| 29 | + "@typescript-eslint/interface-name-prefix": "off", |
| 30 | + "@typescript-eslint/member-ordering": "warn", |
| 31 | + "@typescript-eslint/no-explicit-any": "off", |
| 32 | + "@typescript-eslint/no-inferrable-types": "off", |
| 33 | + "@typescript-eslint/no-parameter-properties": "off", |
| 34 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 35 | + "@typescript-eslint/no-unused-vars": "off", |
| 36 | + "@typescript-eslint/prefer-nullish-coalescing": "warn", |
| 37 | + "@typescript-eslint/prefer-optional-chain": "warn", |
| 38 | + "@typescript-eslint/prefer-readonly": ["warn"], |
| 39 | + "@typescript-eslint/restrict-template-expressions": "off", |
| 40 | + "@typescript-eslint/typedef": ["warn", { "memberVariableDeclaration": true, "variableDeclaration": true }], |
| 41 | + |
| 42 | + "jsdoc/match-description": [ |
| 43 | + "warn", |
| 44 | + { |
| 45 | + "mainDescription": "/^[A-Z`].+?(\\.|:)(\\n\\n.*((\\n{1,2}- .+)|(_.+_)|`.+`|\\n\\n---))?$/us", |
| 46 | + "matchDescription": "^[A-Z`].+(\\.|`.+`)$", |
| 47 | + "contexts": ["any"], |
| 48 | + "tags": { |
| 49 | + "param": true, |
| 50 | + "returns": true |
| 51 | + } |
| 52 | + } |
| 53 | + ], |
| 54 | + "jsdoc/no-types": "error", |
| 55 | + "jsdoc/require-jsdoc": [ |
| 56 | + "warn", |
| 57 | + { |
| 58 | + "contexts": [ |
| 59 | + "ClassDeclaration", |
| 60 | + "ClassProperty:not([accessibility='private'])", |
| 61 | + "ExportNamedDeclaration:has(VariableDeclaration)", |
| 62 | + "FunctionExpression", |
| 63 | + "MethodDefinition:not([accessibility='private']) > FunctionExpression", |
| 64 | + "TSEnumDeclaration", |
| 65 | + "TSInterfaceDeclaration", |
| 66 | + "TSMethodSignature", |
| 67 | + // 'TSPropertySignature', |
| 68 | + "TSTypeAliasDeclaration" |
| 69 | + ] |
| 70 | + } |
| 71 | + ], |
| 72 | + "jsdoc/require-param-type": "off", |
| 73 | + "jsdoc/require-returns-type": "off", |
| 74 | + |
| 75 | + "spellcheck/spell-checker": [ |
| 76 | + "warn", |
| 77 | + { |
| 78 | + "minLength": 3, |
| 79 | + "skipWords": [] |
| 80 | + } |
| 81 | + ], |
| 82 | + |
| 83 | + "inclusive-language/use-inclusive-words": [ |
| 84 | + "warn", |
| 85 | + { |
| 86 | + "allowedTerms": [ |
| 87 | + { |
| 88 | + "term": "/master", |
| 89 | + "allowPartialMatches": true |
| 90 | + } |
| 91 | + ], |
| 92 | + "words": [ |
| 93 | + { |
| 94 | + "word": "guys", |
| 95 | + "suggestions": ["folks"] |
| 96 | + } |
| 97 | + ] |
| 98 | + } |
| 99 | + ] |
| 100 | + }, |
| 101 | + "settings": { |
| 102 | + "jsdoc": { |
| 103 | + "mode": "typescript" |
| 104 | + } |
| 105 | + } |
| 106 | +} |
0 commit comments