2021-07-31 06:12:43 +00:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
parser: '@typescript-eslint/parser',
|
2022-01-09 10:25:43 +00:00
|
|
|
parserOptions: {
|
|
|
|
tsconfigRootDir: __dirname,
|
|
|
|
project: ['./tsconfig.json'],
|
|
|
|
},
|
2021-07-31 06:12:43 +00:00
|
|
|
plugins: [
|
|
|
|
'@typescript-eslint',
|
|
|
|
],
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
'indent': ['error', 'tab', {
|
|
|
|
'SwitchCase': 1,
|
2021-12-27 15:34:46 +00:00
|
|
|
'MemberExpression': 'off',
|
2021-07-31 06:12:43 +00:00
|
|
|
'flatTernaryExpressions': true,
|
2021-12-27 15:34:46 +00:00
|
|
|
'ArrayExpression': 'first',
|
|
|
|
'ObjectExpression': 'first',
|
2021-07-31 06:12:43 +00:00
|
|
|
}],
|
|
|
|
'eol-last': ['error', 'always'],
|
|
|
|
'semi': ['error', 'always'],
|
|
|
|
'quotes': ['error', 'single'],
|
2021-12-27 15:34:46 +00:00
|
|
|
'comma-dangle': ['error', 'always-multiline'],
|
2021-07-31 06:12:43 +00:00
|
|
|
'keyword-spacing': ['error', {
|
|
|
|
'before': true,
|
|
|
|
'after': true,
|
|
|
|
}],
|
2021-12-27 15:34:46 +00:00
|
|
|
'key-spacing': ['error', {
|
|
|
|
'beforeColon': false,
|
|
|
|
'afterColon': true,
|
|
|
|
}],
|
|
|
|
'space-infix-ops': ['error'],
|
|
|
|
'space-before-blocks': ['error', 'always'],
|
|
|
|
'object-curly-spacing': ['error', 'always'],
|
|
|
|
'nonblock-statement-body-position': ['error', 'beside'],
|
2022-01-31 12:29:41 +00:00
|
|
|
'eqeqeq': ['error', 'always', { 'null': 'ignore' }],
|
2021-12-27 15:34:46 +00:00
|
|
|
'no-multiple-empty-lines': ['error', { 'max': 1 }],
|
2021-07-31 06:12:43 +00:00
|
|
|
'no-multi-spaces': ['error'],
|
|
|
|
'no-var': ['error'],
|
|
|
|
'prefer-arrow-callback': ['error'],
|
|
|
|
'no-throw-literal': ['error'],
|
|
|
|
'no-param-reassign': ['warn'],
|
2024-06-13 02:19:25 +00:00
|
|
|
'no-constant-condition': ['warn', {
|
|
|
|
checkLoops: false,
|
|
|
|
}],
|
2021-07-31 06:12:43 +00:00
|
|
|
'no-empty-pattern': ['warn'],
|
2024-06-13 02:19:25 +00:00
|
|
|
'@typescript-eslint/no-unnecessary-condition': ['warn', {
|
|
|
|
allowConstantLoopConditions: true,
|
|
|
|
}],
|
2021-07-31 06:12:43 +00:00
|
|
|
'@typescript-eslint/no-inferrable-types': ['warn'],
|
2021-12-27 15:34:46 +00:00
|
|
|
'@typescript-eslint/no-non-null-assertion': ['warn'],
|
|
|
|
'@typescript-eslint/explicit-function-return-type': ['warn'],
|
|
|
|
'@typescript-eslint/no-misused-promises': ['error', {
|
|
|
|
'checksVoidReturn': false,
|
|
|
|
}],
|
2024-06-13 02:19:25 +00:00
|
|
|
'@typescript-eslint/no-unused-vars': ['error', {
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
}]
|
2021-07-31 06:12:43 +00:00
|
|
|
},
|
|
|
|
};
|