1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-15 15:18:22 +09:00
cherrypick/.eslintrc.js

56 lines
1.5 KiB
JavaScript
Raw Normal View History

2021-07-30 01:18:19 +09:00
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
2021-12-28 00:45:47 +09:00
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
2021-07-30 01:18:19 +09:00
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'indent': ['error', 'tab', {
'SwitchCase': 1,
2021-12-11 22:31:57 +09:00
'MemberExpression': 'off',
2021-07-30 01:18:19 +09:00
'flatTernaryExpressions': true,
2021-12-11 22:31:57 +09:00
'ArrayExpression': 'first',
'ObjectExpression': 'first',
2021-07-30 01:18:19 +09:00
}],
'eol-last': ['error', 'always'],
'semi': ['error', 'always'],
'quotes': ['error', 'single'],
2021-12-11 22:31:57 +09:00
'comma-dangle': ['error', 'always-multiline'],
2021-07-30 01:18:19 +09:00
'keyword-spacing': ['error', {
'before': true,
'after': true,
}],
2021-12-11 22:31:57 +09: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'],
'no-multiple-empty-lines': ['error', { 'max': 1 }],
2021-07-30 01:18:19 +09:00
'no-multi-spaces': ['error'],
'no-var': ['error'],
'prefer-arrow-callback': ['error'],
'no-throw-literal': ['error'],
'no-param-reassign': ['warn'],
'no-constant-condition': ['warn'],
'no-empty-pattern': ['warn'],
2021-12-28 00:34:20 +09:00
'@typescript-eslint/no-unnecessary-condition': ['error'],
2021-07-30 01:18:44 +09:00
'@typescript-eslint/no-inferrable-types': ['warn'],
2021-12-11 22:31:57 +09:00
'@typescript-eslint/no-non-null-assertion': ['warn'],
'@typescript-eslint/explicit-function-return-type': ['warn'],
'@typescript-eslint/no-misused-promises': ['error', {
'checksVoidReturn': false,
}],
2021-07-30 01:18:19 +09:00
},
};