// @ts-check
const antfu = require('@antfu/eslint-config').default

module.exports = antfu(
  {
    ignores: [
      // eslint ignore globs here
      'node_modules',
      '.vscode',
      'dist',
      '/public',
      '.husky',
    ],
  },
  {
    rules: {
      // 允许使用 debugger
      'no-debugger': 'off',
      'unused-imports/no-unused-vars': 'off',
      'unused-imports/no-unused-imports': 'off',
      'jsdoc/require-returns-description': 'off',
      'no-restricted-syntax': [
        // eslint-disable-next-line node/prefer-global/process
        process.env.MODE === 'production' ? 2 : 0,
      ],
    },
  },
)
