gverse
Version:
Object Graph Mapper for Dgraph
195 lines (194 loc) • 8.15 kB
JavaScript
module.exports = {
env: {
es6: true,
node: true
},
extends: ["plugin:@typescript-eslint/all", "prettier"],
ignorePatterns: ["*.d.ts", "*.js", "coverage", "dist", "node_modules"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module"
},
plugins: [
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow",
"@typescript-eslint"
],
rules: {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/comma-dangle": [
"error",
{
arrays: "only-multiline",
objects: "only-multiline",
imports: "only-multiline",
functions: "only-multiline",
enums: "only-multiline"
}
],
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["off", "type"],
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/generic-type-naming": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/member-delimiter-style": [
"off",
{
multiline: {
delimiter: "none",
requireLast: true
},
singleline: {
delimiter: "semi",
requireLast: false
}
}
],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/method-signature-style": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implicit-any-catch": "off",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-restricted-imports": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-this-alias": [
"error",
{
allowDestructuring: true,
allowedNames: ["admin"]
}
],
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-acces": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-untyped-public-signature": "off",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars-experimental": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-enum-initializers": "off",
"@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-namespace-keyword": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/prefer-reduce-type-parameter": "off",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/return-await": "off",
"@typescript-eslint/semi": ["off", null],
"@typescript-eslint/sort-type-union-intersection-members": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/switch-exhaustiveness-check": "off",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/unified-signatures": "error",
complexity: [
"warn",
{
max: 10
}
],
"default-param-last": "off",
"dot-notation": "off",
"init-declarations": "off",
"jsdoc/check-alignment": "off",
"jsdoc/check-indentation": "off",
"jsdoc/newline-after-description": "off",
"lines-between-class-members": "off",
"max-lines": ["warn", 500],
"no-array-constructor": "off",
"no-console": "off",
"no-dupe-class-members": "off",
"no-duplicate-imports": "off",
"no-else-return": "error",
"no-empty": "off",
"no-empty-function": "off",
"no-implied-eval": "off",
"no-invalid-this": "off",
"no-loop-func": "off",
"no-loss-of-precision": "off",
"no-magic-numbers": "off",
"no-redeclare": "off",
"no-return-await": "off",
"no-shadow": "off",
"no-throw-literal": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-useless-constructor": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"require-await": "off",
"simple-import-sort/exports": "off",
"simple-import-sort/imports": "off"
}
}