UNPKG

@tangany/eslint-config

Version:
40 lines (32 loc) 1.33 kB
import TSESLint from "typescript-eslint"; export default TSESLint.config( { rules: { // Disallow await inside of loops // https://eslint.org/docs/rules/no-await-in-loop "no-await-in-loop": "warn", // disallow use of console "no-console": "warn", // disallow function or variable declarations in nested blocks "no-inner-declarations": "error", // Disallow returning values from Promise executor functions // https://eslint.org/docs/rules/no-promise-executor-return "no-promise-executor-return": "error", // Disallow template literal placeholder syntax in regular strings // https://eslint.org/docs/rules/no-template-curly-in-string "no-template-curly-in-string": "error", // Disallow loops with a body that allows only one iteration // https://eslint.org/docs/rules/no-unreachable-loop "no-unreachable-loop": [ "error", { ignore: [], // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement }, ], // Disallow assignments that can lead to race conditions due to usage of await or yield // https://eslint.org/docs/rules/require-atomic-updates // note: not enabled because it is very buggy "require-atomic-updates": "off", }, }, );