This repository has been archived on 2022-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
irreligious/.eslintrc.json

107 lines
5.2 KiB
JSON

{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {"project": "tsconfig.json"},
"plugins": ["@typescript-eslint"],
"rules": {
"max-len": ["warn", {
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true}],
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/array-type": ["warn", {"default": "array-simple"}],
"@typescript-eslint/consistent-indexed-object-style": ["warn", "index-signature"],
"@typescript-eslint/consistent-type-assertions": ["warn", {
"assertionStyle": "angle-bracket",
"objectLiteralTypeAssertions": "never"}],
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-member-accessibility": ["error", {
"accessibility": "explicit",
"overrides": {"constructors": "no-public"}}],
"@typescript-eslint/member-delimiter-style": ["warn", {
"multiline": {"delimiter": "semi", "requireLast": true},
"singleline": {"delimiter": "comma", "requireLast": false}}],
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/method-signature-style": ["warn", "property"],
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-implicit-any-catch": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-parameter-properties": ["error", {
"allows": ["public", "readonly", "public readonly"]}],
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/prefer-enum-initializers": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
"@typescript-eslint/prefer-return-this-type": "warn",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "warn",
"@typescript-eslint/require-array-sort-compare": "warn",
"@typescript-eslint/strict-boolean-expressions": ["error", {
"allowString": false,
"allowNumber": false,
"allowNullableObject": false}],
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/unified-signatures": "warn",
"@typescript-eslint/brace-style": "warn",
"@typescript-eslint/comma-dangle": ["warn", "always-multiline"],
"@typescript-eslint/comma-spacing": "warn",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/func-call-spacing": ["warn", "never"],
"@typescript-eslint/indent": ["warn", 2, {
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"FunctionDeclaration": {"parameters": 1, "body": 1},
"CallExpression": {"arguments": 1},
"ArrayExpression": 1,
"ObjectExpression": 1,
"MemberExpression": 2,
"flatTernaryExpressions": false,
"ignoreComments": false}],
"@typescript-eslint/keyword-spacing": "error",
"@typescript-eslint/lines-between-class-members": ["warn", "always", {
"exceptAfterSingleLine": true}],
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-extra-parens": "warn",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-loss-of-precision": "warn",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/object-curly-spacing": ["warn", "always", {
"arraysInObjects": true,
"objectsInObjects": false}],
"@typescript-eslint/quotes": ["warn", "single", {"avoidEscape": true}],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/space-before-function-paren": ["warn", "always"],
"@typescript-eslint/space-infix-ops": "warn"
}
}