misskey/.eslintrc.js

46 lines
1.2 KiB
JavaScript
Raw Normal View History

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: {
2021-09-05 07:21:38 +02:00
'indent': ['warn', 'tab', {
'SwitchCase': 1,
2021-08-30 13:56:05 +02:00
'MemberExpression': 'off',
'flatTernaryExpressions': true,
2021-08-30 13:50:41 +02:00
'ArrayExpression': 'first',
'ObjectExpression': 'first',
}],
'eol-last': ['error', 'always'],
'semi': ['error', 'always'],
2021-08-30 13:56:05 +02:00
'quotes': ['warn', 'single'],
'keyword-spacing': ['error', {
'before': true,
'after': true,
}],
'no-multi-spaces': ['error'],
'no-var': ['error'],
'prefer-arrow-callback': ['error'],
2021-09-05 07:21:38 +02:00
'no-throw-literal': ['warn'],
'no-param-reassign': ['warn'],
'no-constant-condition': ['warn'],
'no-empty-pattern': ['warn'],
2021-09-05 07:21:38 +02:00
'no-async-promise-executor': ['off'],
2021-09-05 07:32:04 +02:00
'no-useless-escape': ['off'],
'no-multi-spaces': ['warn'],
'@typescript-eslint/no-inferrable-types': ['warn'],
2021-09-05 07:21:38 +02:00
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-non-null-assertion': ['off'],
'import/no-unresolved': ['off'],
'import/no-default-export': ['warn'],
},
};