2021-11-18 14:32:43 +00:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
plugins: [
|
|
|
|
'@typescript-eslint',
|
|
|
|
'import'
|
|
|
|
],
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:import/recommended',
|
|
|
|
'plugin:import/typescript'
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
'indent': ['warn', 'tab', {
|
|
|
|
'SwitchCase': 1,
|
|
|
|
'MemberExpression': 'off',
|
|
|
|
'flatTernaryExpressions': true,
|
|
|
|
'ArrayExpression': 'first',
|
|
|
|
'ObjectExpression': 'first',
|
|
|
|
}],
|
|
|
|
'eol-last': ['error', 'always'],
|
|
|
|
'semi': ['error', 'always'],
|
2022-07-16 15:34:04 +00:00
|
|
|
'semi-spacing': ['error', { 'before': false, 'after': true }],
|
2022-12-07 21:27:39 +00:00
|
|
|
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
|
2021-11-18 14:32:43 +00:00
|
|
|
'comma-dangle': ['warn', 'always-multiline'],
|
|
|
|
'keyword-spacing': ['error', {
|
|
|
|
'before': true,
|
|
|
|
'after': true,
|
|
|
|
}],
|
|
|
|
'key-spacing': ['error', {
|
|
|
|
'beforeColon': false,
|
|
|
|
'afterColon': true,
|
|
|
|
}],
|
2022-07-13 08:15:24 +00:00
|
|
|
'arrow-spacing': ['error', {
|
|
|
|
'before': true,
|
|
|
|
'after': true,
|
|
|
|
}],
|
|
|
|
'padded-blocks': ['error', 'never'],
|
2021-11-18 14:32:43 +00:00
|
|
|
/* TODO: path aliasを使わないとwarnする
|
|
|
|
'no-restricted-imports': ['warn', {
|
|
|
|
'patterns': [
|
|
|
|
]
|
|
|
|
}],
|
|
|
|
*/
|
2022-01-31 12:29:08 +00:00
|
|
|
'eqeqeq': ['error', 'always', { 'null': 'ignore' }],
|
2021-11-18 14:32:43 +00:00
|
|
|
'no-multi-spaces': ['error'],
|
|
|
|
'no-var': ['error'],
|
|
|
|
'prefer-arrow-callback': ['error'],
|
|
|
|
'no-throw-literal': ['warn'],
|
|
|
|
'no-param-reassign': ['warn'],
|
|
|
|
'no-constant-condition': ['warn'],
|
|
|
|
'no-empty-pattern': ['warn'],
|
|
|
|
'no-async-promise-executor': ['off'],
|
|
|
|
'no-useless-escape': ['off'],
|
|
|
|
'no-multi-spaces': ['warn'],
|
|
|
|
'no-multiple-empty-lines': ['error', { 'max': 1 }],
|
|
|
|
'no-control-regex': ['warn'],
|
|
|
|
'no-empty': ['warn'],
|
|
|
|
'no-inner-declarations': ['off'],
|
|
|
|
'no-sparse-arrays': ['off'],
|
|
|
|
'nonblock-statement-body-position': ['error', 'beside'],
|
|
|
|
'object-curly-spacing': ['error', 'always'],
|
|
|
|
'space-infix-ops': ['error'],
|
|
|
|
'space-before-blocks': ['error', 'always'],
|
2022-01-31 12:34:47 +00:00
|
|
|
'@typescript-eslint/no-unnecessary-condition': ['warn'],
|
2021-11-18 14:32:43 +00:00
|
|
|
'@typescript-eslint/no-var-requires': ['warn'],
|
|
|
|
'@typescript-eslint/no-inferrable-types': ['warn'],
|
|
|
|
'@typescript-eslint/no-empty-function': ['off'],
|
2023-05-07 12:28:24 +00:00
|
|
|
'@typescript-eslint/no-explicit-any': ['off'],
|
2021-11-18 14:32:43 +00:00
|
|
|
'@typescript-eslint/no-non-null-assertion': ['warn'],
|
2022-08-12 06:35:22 +00:00
|
|
|
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
|
2021-11-18 14:32:43 +00:00
|
|
|
'@typescript-eslint/no-misused-promises': ['error', {
|
|
|
|
'checksVoidReturn': false,
|
|
|
|
}],
|
|
|
|
'import/no-unresolved': ['off'],
|
|
|
|
'import/no-default-export': ['warn'],
|
2022-04-15 06:05:43 +00:00
|
|
|
'import/order': ['warn', {
|
|
|
|
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
|
2022-08-02 21:25:36 +00:00
|
|
|
}],
|
2022-08-03 12:49:55 +00:00
|
|
|
'object-shorthand': ['warn', 'always'],
|
2021-11-18 14:32:43 +00:00
|
|
|
},
|
|
|
|
};
|