2021-01-30 18:15:47 +03:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
|
|
|
|
env: {
|
|
|
|
node: true,
|
2021-02-09 21:22:04 +03:00
|
|
|
jest: true
|
2021-01-30 18:15:47 +03:00
|
|
|
},
|
|
|
|
|
2021-02-09 21:22:04 +03:00
|
|
|
parser: '@typescript-eslint/parser',
|
2021-01-30 18:15:47 +03:00
|
|
|
|
|
|
|
extends: [
|
2021-02-09 21:22:04 +03:00
|
|
|
'standard-with-typescript',
|
|
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
|
|
'plugin:lodash-template/recommended',
|
2021-01-30 18:15:47 +03:00
|
|
|
// TODO: make this work with typescript
|
|
|
|
// 'plugin:node/recommended'
|
2021-03-08 04:43:36 +03:00
|
|
|
'prettier'
|
2021-01-30 18:15:47 +03:00
|
|
|
],
|
|
|
|
|
2021-02-09 21:22:04 +03:00
|
|
|
plugins: ['@typescript-eslint', 'node', 'security'],
|
2021-01-30 18:15:47 +03:00
|
|
|
|
|
|
|
parserOptions: {
|
|
|
|
tsconfigRootDir: __dirname,
|
2021-02-09 21:22:04 +03:00
|
|
|
project: './tsconfig.json'
|
2021-01-30 18:15:47 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
globals: {
|
|
|
|
__statics: true,
|
2021-02-09 21:22:04 +03:00
|
|
|
process: true
|
2021-01-30 18:15:47 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
// add your custom rules here
|
|
|
|
rules: {
|
|
|
|
// allow console.log during development only
|
2021-02-09 21:22:04 +03:00
|
|
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
2021-01-30 18:15:47 +03:00
|
|
|
// allow debugger during development only
|
2021-02-09 21:22:04 +03:00
|
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
|
|
'no-process-exit': 'off',
|
|
|
|
'security/detect-non-literal-fs-filename': 'warn',
|
|
|
|
'security/detect-unsafe-regex': 'error',
|
|
|
|
'security/detect-buffer-noassert': 'error',
|
|
|
|
'security/detect-child-process': 'warn',
|
|
|
|
'security/detect-disable-mustache-escape': 'error',
|
|
|
|
'security/detect-eval-with-expression': 'error',
|
|
|
|
'security/detect-no-csrf-before-method-override': 'error',
|
|
|
|
'security/detect-non-literal-regexp': 'error',
|
|
|
|
'security/detect-non-literal-require': 'warn',
|
|
|
|
'security/detect-object-injection': 'warn',
|
|
|
|
'security/detect-possible-timing-attacks': 'error',
|
|
|
|
'security/detect-pseudoRandomBytes': 'error',
|
|
|
|
'space-before-function-paren': 'off',
|
|
|
|
'@typescript-eslint/default-param-last': 'off',
|
2021-02-17 06:38:18 +03:00
|
|
|
'@typescript-eslint/strict-boolean-expressions': 0,
|
|
|
|
'no-return-await': 'warn',
|
|
|
|
'@typescript-eslint/return-await': 'off'
|
2021-02-09 21:22:04 +03:00
|
|
|
}
|
|
|
|
}
|