From a23b25bff7e1872448407eda95806ee695230bfe Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 31 Mar 2023 09:18:58 +0900 Subject: [PATCH] tweak misskey-js eslintrc --- packages/misskey-js/.eslintrc.cjs | 9 +++++ packages/misskey-js/.eslintrc.js | 57 ------------------------------- 2 files changed, 9 insertions(+), 57 deletions(-) create mode 100644 packages/misskey-js/.eslintrc.cjs delete mode 100644 packages/misskey-js/.eslintrc.js diff --git a/packages/misskey-js/.eslintrc.cjs b/packages/misskey-js/.eslintrc.cjs new file mode 100644 index 000000000..e2e31e9e3 --- /dev/null +++ b/packages/misskey-js/.eslintrc.cjs @@ -0,0 +1,9 @@ +module.exports = { + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./tsconfig.json'], + }, + extends: [ + '../shared/.eslintrc.js', + ], +}; diff --git a/packages/misskey-js/.eslintrc.js b/packages/misskey-js/.eslintrc.js deleted file mode 100644 index 426894947..000000000 --- a/packages/misskey-js/.eslintrc.js +++ /dev/null @@ -1,57 +0,0 @@ -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, - plugins: [ - '@typescript-eslint', - ], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - ], - rules: { - 'indent': ['error', 'tab', { - 'SwitchCase': 1, - 'MemberExpression': 'off', - 'flatTernaryExpressions': true, - 'ArrayExpression': 'first', - 'ObjectExpression': 'first', - }], - 'eol-last': ['error', 'always'], - 'semi': ['error', 'always'], - 'quotes': ['error', 'single'], - 'comma-dangle': ['error', 'always-multiline'], - 'keyword-spacing': ['error', { - 'before': true, - 'after': true, - }], - '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'], - 'eqeqeq': ['error', 'always', { 'null': 'ignore' }], - 'no-multiple-empty-lines': ['error', { 'max': 1 }], - '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'], - '@typescript-eslint/no-unnecessary-condition': ['error'], - '@typescript-eslint/no-inferrable-types': ['warn'], - '@typescript-eslint/no-non-null-assertion': ['warn'], - '@typescript-eslint/explicit-function-return-type': ['warn'], - '@typescript-eslint/no-misused-promises': ['error', { - 'checksVoidReturn': false, - }], - '@typescript-eslint/consistent-type-imports': 'error', - }, -};