From cf008327aa45c04bc9993ea39d4f2e743dbfe59b Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Wed, 1 May 2024 19:12:52 +0800 Subject: [PATCH] update --- eslint.config.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..56408a7 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,37 @@ +const antfu = require('@antfu/eslint-config').default + +module.exports = antfu( + { + stylistic: { + indent: 2, + quotes: 'single', + }, + typescript: true, + }, + { + rules: { + 'no-console': 'off', + 'unused-imports/no-unused-vars': 'off', + 'unused-imports/no-unused-imports': 2, + 'ts/consistent-type-imports': 'off', + 'node/prefer-global/process': 'off', + 'node/prefer-global/buffer': 'off', + 'antfu/if-newline': 'off', + 'import/order': [ + 2, + { + pathGroups: [ + { + pattern: '~/**', + group: 'external', + position: 'after', + }, + ], + alphabetize: { order: 'asc', caseInsensitive: false }, + 'newlines-between': 'always-and-inside-groups', + warnOnUnassignedImports: true, + }, + ], + }, + }, +)