.eslintrc
{
"env": {
"es6": true,
"node": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["deprecation", "jsdoc", "prettier"],
"extends": ["eslint:recommended"],
"ignorePatterns": ["src/migrations/sample-migration.ts"],
"rules": {
"arrow-parens": ["error", "always"],
"eqeqeq": ["error", "smart"],
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-trailing-spaces": ["error"],
"no-unused-vars": [
"warn",
{ "vars": "all", "varsIgnorePattern": "extend|should", "args": "none" }
],
"quotes": ["error", "single", { "avoidEscape": true }],
"linebreak-style": ["error", "unix"],
"semi": ["error", "always"],
"comma-dangle": ["error", "never"],
"no-useless-escape": ["warn"],
"no-console": ["warn"],
"no-await-in-loop": ["warn"],
"no-new-wrappers": ["warn"],
"no-template-curly-in-string": ["warn"],
"no-var": ["error"],
"prefer-const": ["error"],
"require-await": ["warn"],
"callback-return": ["warn"],
"no-new-require": ["warn"],
"no-path-concat": ["warn"],
"prefer-destructuring": [
"error",
{
"object": false,
"array": true
}
],
"prefer-numeric-literals": ["error"],
"prefer-rest-params": ["warn"],
"prefer-spread": ["warn"],
"prefer-template": ["error"],
"template-curly-spacing": ["error"],
"rest-spread-spacing": ["error"],
"prefer-arrow-callback": ["error"],
"jsdoc/no-undefined-types": 1,
"no-throw-literal": ["error"],
"prefer-promise-reject-errors": ["error"],
"no-else-return": ["error"],
"guard-for-in": ["error"],
// "arrow-body-style": ["warn", "as-needed"],
// "handle-callback-err": ["warn"],
// "no-shadow": ["warn"],
"prettier/prettier": ["error"]
},
"globals": {},
"overrides": [
{
"files": ["**/*.ts"],
"parser": "@typescript-eslint/parser",
"plugins": [
"deprecation",
"jsdoc",
"prettier",
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"rules": {
"@typescript-eslint/ban-types": ["warn"],
"@typescript-eslint/no-empty-interface": ["warn"],
"import/order": ["error", {
"groups": [
["builtin"],
["external"],
["internal", "parent", "sibling"]
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}],
"import/no-unresolved": ["off"]
}
}
]
}