eslint - rules updated

This commit is contained in:
Sebastian Seedorf
2020-11-19 22:22:14 +01:00
parent b79c2f96cd
commit 5c31dc285a
13 changed files with 100 additions and 83 deletions

View File

@@ -5,38 +5,48 @@ module.exports = {
plugins: [
'@typescript-eslint',
'no-null',
'promise',
],
extends: [
'eslint:recommended',
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
],
rules: {
"no-console": "error",
"max-len": ["error", {"code": 128}],
"no-process-env": "error",
"no-process-exit": "error",
"no-null/no-null": "error",
"no-useless-return": "error",
"prefer-arrow-callback": "warn",
"object-curly-spacing": "error",
"consistent-return": "error",
"@typescript-eslint/explicit-function-return-type": [
"error", {
"allowExpressions": true,
'max-len': ['error', {'code': 128}],
'no-process-env': 'error',
'no-process-exit': 'error',
'no-null/no-null': 'error',
'no-useless-return': 'error',
'prefer-arrow-callback': 'warn',
'consistent-return': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error', {
'allowExpressions': true,
},
],
"no-void": "error",
"comma-spacing": "error",
"comma-dangle": ["error", "always-multiline"],
"comma-style": "error",
"semi": "error",
"no-implicit-coercion": "error",
'no-void': 'error',
'comma-spacing': 'error',
'comma-dangle': ['error', 'always-multiline'],
'comma-style': 'error',
'semi': 'error',
'no-implicit-coercion': 'error',
'quotes': ['error', 'single', 'avoid-escape'],
'keyword-spacing': 'error',
'semi-spacing': 'error',
'arrow-spacing': 'error',
'object-curly-spacing': 'error',
'array-bracket-spacing': 'error',
'key-spacing': 'error',
'block-spacing': 'error',
'promise/always-return': 'off',
"no-restricted-imports": ["error",
"assert", "buffer", "child_process", "cluster", "crypto", "dgram", "dns", "domain", "events", "freelist",
"fs", "http", "https", "module", "net", "os", "path", "punycode", "querystring", "readline", "repl",
"smalloc", "stream", "string_decoder", "sys", "timers", "tls", "tracing", "tty", "url", "util", "vm", "zlib",
'no-restricted-imports': ['error',
'assert', 'buffer', 'child_process', 'cluster', 'crypto', 'dgram', 'dns', 'domain', 'events', 'freelist',
'fs', 'http', 'https', 'module', 'net', 'os', 'path', 'punycode', 'querystring', 'readline', 'repl',
'smalloc', 'stream', 'string_decoder', 'sys', 'timers', 'tls', 'tracing', 'tty', 'url', 'util', 'vm', 'zlib',
],
'no-console': ['error', {allow: ['warn', 'error']}],
},
};