UNPKG

eslint-config-binden-ts

Version:
121 lines (119 loc) 5.71 kB
import binden from "eslint-config-binden-js"; import tseslint from "typescript-eslint"; export default [ ...binden, ...tseslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, ...tseslint.configs.strict, { name: "binden/eslint-config-ts", rules: { "@typescript-eslint/array-type": ["error", { default: "array" }], "@typescript-eslint/ban-tslint-comment": "error", "@typescript-eslint/class-literal-property-style": ["error", "getters"], "@typescript-eslint/consistent-generic-constructors": [ "error", "constructor", ], "@typescript-eslint/consistent-indexed-object-style": ["error", "record"], "@typescript-eslint/consistent-type-definitions": ["error", "interface"], "@typescript-eslint/consistent-type-exports": [ "error", { fixMixedExportsWithInlineTypeSpecifier: false }, ], "@typescript-eslint/consistent-type-imports": "off", "@typescript-eslint/explicit-function-return-type": "error", "@typescript-eslint/explicit-member-accessibility": "error", "@typescript-eslint/explicit-module-boundary-types": "error", "@typescript-eslint/member-delimiter-style": "off", "@typescript-eslint/member-ordering": "off", "@typescript-eslint/method-signature-style": ["error", "method"], "@typescript-eslint/naming-convention": "off", "@typescript-eslint/no-base-to-string": "error", "@typescript-eslint/no-confusing-void-expression": "error", "@typescript-eslint/no-duplicate-enum-values": "error", "@typescript-eslint/no-dynamic-delete": "error", "@typescript-eslint/no-empty-object-type": [ "error", { allowInterfaces: "with-single-extends" }, ], "@typescript-eslint/no-extraneous-class": "error", "@typescript-eslint/no-invalid-void-type": "error", "@typescript-eslint/no-meaningless-void-operator": "error", "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", "@typescript-eslint/no-redundant-type-constituents": "error", "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-type-alias": "off", "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-unnecessary-condition": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", "@typescript-eslint/no-unnecessary-type-arguments": "error", "@typescript-eslint/no-useless-empty-export": "error", "@typescript-eslint/parameter-properties": "off", "@typescript-eslint/prefer-enum-initializers": "error", "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-literal-enum-member": "error", "@typescript-eslint/prefer-nullish-coalescing": "error", "@typescript-eslint/prefer-optional-chain": "error", "@typescript-eslint/prefer-readonly": "error", "@typescript-eslint/prefer-readonly-parameter-types": "off", "@typescript-eslint/prefer-regexp-exec": "error", "@typescript-eslint/prefer-ts-expect-error": "error", "@typescript-eslint/promise-function-async": "off", "@typescript-eslint/require-array-sort-compare": "error", "@typescript-eslint/strict-boolean-expressions": "error", "@typescript-eslint/switch-exhaustiveness-check": "error", "@typescript-eslint/type-annotation-spacing": "off", "@typescript-eslint/typedef": "off", "@typescript-eslint/unified-signatures": [ "warn", { ignoreDifferentlyNamedParameters: true }, ], "@typescript-eslint/brace-style": "off", "@typescript-eslint/comma-dangle": "off", "@typescript-eslint/comma-spacing": "off", "default-param-last": "off", "@typescript-eslint/default-param-last": "error", "dot-notation": "off", "@typescript-eslint/dot-notation": "error", "@typescript-eslint/func-call-spacing": "off", "@typescript-eslint/indent": "off", "@typescript-eslint/keyword-spacing": "off", "@typescript-eslint/lines-between-class-members": "off", "no-dupe-class-members": "off", "@typescript-eslint/no-dupe-class-members": "error", "@typescript-eslint/no-extra-parens": "off", "no-invalid-this": "off", "@typescript-eslint/no-invalid-this": "error", "no-loop-func": "off", "@typescript-eslint/no-loop-func": "error", "no-redeclare": "off", "@typescript-eslint/no-redeclare": "error", "@typescript-eslint/no-restricted-imports": "off", "no-shadow": "off", "@typescript-eslint/no-shadow": "error", "no-throw-literal": "off", "@typescript-eslint/only-throw-error": "error", "no-unused-expressions": "off", "@typescript-eslint/no-unused-expressions": "error", "no-use-before-define": "off", "@typescript-eslint/no-use-before-define": "error", "no-useless-constructor": "off", "@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/object-curly-spacing": "off", "@typescript-eslint/padding-line-between-statements": "off", "@typescript-eslint/quotes": "off", "no-return-await": "off", "@typescript-eslint/return-await": "error", "@typescript-eslint/semi": "off", "space-before-blocks": "off", "@typescript-eslint/space-before-blocks": "off", "space-before-function-paren": "off", "@typescript-eslint/space-before-function-paren": "off", "space-infix-ops": "off", "@typescript-eslint/space-infix-ops": "off", }, }, ];