|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "ignorePatterns": [ |
| 4 | + "*.md", |
| 5 | + "*.json", |
| 6 | + "*.yml", |
| 7 | + "*.sh", |
| 8 | + "functions/dist/**", |
| 9 | + "*.test.ts" |
| 10 | + ], |
| 11 | + "parserOptions": { |
| 12 | + // Required for certain syntax usages |
| 13 | + "ecmaVersion": 2018 |
| 14 | + }, |
| 15 | + "env": { |
| 16 | + "amd": true, |
| 17 | + "node": true, |
| 18 | + "es6": true |
| 19 | + }, |
| 20 | + "plugins": [ |
| 21 | + "promise" |
| 22 | + ], |
| 23 | + "extends": "eslint:recommended", |
| 24 | + "rules": { |
| 25 | + // Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules |
| 26 | + "no-regex-spaces": "off", |
| 27 | + // Removed rule "disallow the use of debugger" from recommended eslint rules |
| 28 | + "no-debugger": "off", |
| 29 | + // Removed rule "disallow unused variables" from recommended eslint rules |
| 30 | + "no-unused-vars": "off", |
| 31 | + // Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules |
| 32 | + "no-mixed-spaces-and-tabs": "off", |
| 33 | + // Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules |
| 34 | + // Warn against template literal placeholder syntax in regular strings |
| 35 | + "no-template-curly-in-string": 1, |
| 36 | + // Warn if return statements do not either always or never specify values |
| 37 | + "consistent-return": 1, |
| 38 | + // Require the use of === and !== |
| 39 | + "eqeqeq": 2, |
| 40 | + // Disallow the use of alert, confirm, and prompt |
| 41 | + "no-alert": 2, |
| 42 | + // Disallow the use of arguments.caller or arguments.callee |
| 43 | + "no-caller": 2, |
| 44 | + // Disallow null comparisons without type-checking operators |
| 45 | + "no-eq-null": 2, |
| 46 | + // Disallow the use of eval() |
| 47 | + "no-eval": 2, |
| 48 | + // Warn against extending native types |
| 49 | + "no-extend-native": 1, |
| 50 | + // Warn against unnecessary calls to .bind() |
| 51 | + "no-extra-bind": 1, |
| 52 | + // Warn against unnecessary labels |
| 53 | + "no-extra-label": 1, |
| 54 | + // Disallow leading or trailing decimal points in numeric literals |
| 55 | + "no-floating-decimal": 2, |
| 56 | + // Warn against shorthand type conversions |
| 57 | + "no-implicit-coercion": 1, |
| 58 | + // Warn against function declarations and expressions inside loop statements |
| 59 | + "no-loop-func": 1, |
| 60 | + // Disallow new operators with the Function object |
| 61 | + "no-new-func": 2, |
| 62 | + // Warn against new operators with the String, Number, and Boolean objects |
| 63 | + "no-new-wrappers": 1, |
| 64 | + // Disallow throwing literals as exceptions |
| 65 | + "no-throw-literal": 2, |
| 66 | + // Require using Error objects as Promise rejection reasons |
| 67 | + "prefer-promise-reject-errors": 2, |
| 68 | + // Enforce “for” loop update clause moving the counter in the right direction |
| 69 | + "for-direction": 2, |
| 70 | + // Enforce return statements in getters |
| 71 | + "getter-return": 2, |
| 72 | + // Disallow await inside of loops |
| 73 | + "no-await-in-loop": 2, |
| 74 | + // Disallow comparing against -0 |
| 75 | + "no-compare-neg-zero": 2, |
| 76 | + // Warn against catch clause parameters from shadowing variables in the outer scope |
| 77 | + "no-catch-shadow": 1, |
| 78 | + // Disallow identifiers from shadowing restricted names |
| 79 | + "no-shadow-restricted-names": 2, |
| 80 | + // Enforce return statements in callbacks of array methods |
| 81 | + "callback-return": 2, |
| 82 | + // Require error handling in callbacks |
| 83 | + "handle-callback-err": 2, |
| 84 | + // Warn against string concatenation with __dirname and __filename |
| 85 | + "no-path-concat": 1, |
| 86 | + // Prefer using arrow functions for callbacks |
| 87 | + "prefer-arrow-callback": 1, |
| 88 | + // Return inside each then() to create readable and reusable Promise chains. |
| 89 | + // Forces developers to return console logs and http calls in promises. |
| 90 | + "promise/always-return": 2, |
| 91 | + //Enforces the use of catch() on un-returned promises |
| 92 | + "promise/catch-or-return": 2, |
| 93 | + // Warn against nested then() or catch() statements |
| 94 | + "promise/no-nesting": 1, |
| 95 | + |
| 96 | + // This is temporary rule that we should remove on later stage |
| 97 | + "@typescript-eslint/no-var-requires": 0, |
| 98 | + |
| 99 | + // Console usage is not allowed. Use logger instead |
| 100 | + "no-console": 2 |
| 101 | + }, |
| 102 | + "overrides": [ |
| 103 | + { |
| 104 | + "files": [ |
| 105 | + "**/*.ts", |
| 106 | + "**/*.tsx" |
| 107 | + ], |
| 108 | + "parser": "@typescript-eslint/parser", |
| 109 | + "plugins": [ |
| 110 | + "@typescript-eslint" |
| 111 | + ], |
| 112 | + "extends": [ |
| 113 | + "eslint:recommended", |
| 114 | + "plugin:@typescript-eslint/recommended" |
| 115 | + ], |
| 116 | + "rules": { |
| 117 | + "@typescript-eslint/no-explicit-any": 0 |
| 118 | + } |
| 119 | + } |
| 120 | + ] |
| 121 | +} |
0 commit comments