| 
 | 1 | +module.exports = {  | 
 | 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 | +    "google",  | 
 | 12 | +    "prettier",  | 
 | 13 | +  ],  | 
 | 14 | +  rules: {  | 
 | 15 | +    "jsdoc/newline-after-description": "off",  | 
 | 16 | +    "jsdoc/require-jsdoc": ["warn", { publicOnly: true }],  | 
 | 17 | +    "no-restricted-globals": ["error", "name", "length"],  | 
 | 18 | +    "prefer-arrow-callback": "error",  | 
 | 19 | +    "prettier/prettier": "error",  | 
 | 20 | +    "require-atomic-updates": "off", // This rule is so noisy and isn't useful: https://github.com/eslint/eslint/issues/11899  | 
 | 21 | +    "require-jsdoc": "off", // This rule is deprecated and superseded by jsdoc/require-jsdoc.  | 
 | 22 | +    "valid-jsdoc": "off", // This is deprecated but included in recommended configs.  | 
 | 23 | + | 
 | 24 | +    "no-prototype-builtins": "warn",  | 
 | 25 | +    "no-useless-escape": "warn",  | 
 | 26 | +    "prefer-promise-reject-errors": "warn",  | 
 | 27 | +  },  | 
 | 28 | +  overrides: [  | 
 | 29 | +    {  | 
 | 30 | +      files: ["*.ts"],  | 
 | 31 | +      rules: {  | 
 | 32 | +        "jsdoc/require-param-type": "off",  | 
 | 33 | +        "jsdoc/require-returns-type": "off",  | 
 | 34 | + | 
 | 35 | +        // Google style guide allows us to omit trivial parameters and returns  | 
 | 36 | +        "jsdoc/require-param": "off",  | 
 | 37 | +        "jsdoc/require-returns": "off",  | 
 | 38 | + | 
 | 39 | +        "@typescript-eslint/no-invalid-this": "error",  | 
 | 40 | +        "@typescript-eslint/no-unused-vars": "error", // Unused vars should not exist.  | 
 | 41 | +        "@typescript-eslint/no-misused-promises": "warn", // rule does not work with async handlers for express.  | 
 | 42 | +        "no-invalid-this": "off", // Turned off in favor of @typescript-eslint/no-invalid-this.  | 
 | 43 | +        "no-unused-vars": "off", // Off in favor of @typescript-eslint/no-unused-vars.  | 
 | 44 | +        eqeqeq: ["error", "always", { null: "ignore" }],  | 
 | 45 | +        camelcase: ["error", { properties: "never" }], // snake_case allowed in properties iif to satisfy an external contract / style  | 
 | 46 | + | 
 | 47 | +        // Ideally, all these warning should be error - let's fix them in  the future.  | 
 | 48 | +        "@typescript-eslint/no-unsafe-argument": "warn",  | 
 | 49 | +        "@typescript-eslint/no-unsafe-assignment": "warn",  | 
 | 50 | +        "@typescript-eslint/no-unsafe-call": "warn",  | 
 | 51 | +        "@typescript-eslint/no-unsafe-member-access": "warn",  | 
 | 52 | +        "@typescript-eslint/no-unsafe-return": "warn",  | 
 | 53 | +        "@typescript-eslint/restrict-template-expressions": "warn",  | 
 | 54 | +      },  | 
 | 55 | +    },  | 
 | 56 | +    {  | 
 | 57 | +      files: ["*.spec.*"],  | 
 | 58 | +      env: {  | 
 | 59 | +        mocha: true,  | 
 | 60 | +      },  | 
 | 61 | +      rules: {},  | 
 | 62 | +    },  | 
 | 63 | +  ],  | 
 | 64 | +  globals: {},  | 
 | 65 | +  parserOptions: {  | 
 | 66 | +    project: "tsconfig.json",  | 
 | 67 | +  },  | 
 | 68 | +  plugins: ["prettier", "@typescript-eslint", "jsdoc"],  | 
 | 69 | +  parser: "@typescript-eslint/parser",  | 
 | 70 | +};  | 
0 commit comments