import {
  importConfig,
  rulesConfig,
  sonarConfig,
  typescriptTypeCheckedConfig,
  unicornConfig,
  workspacesConfig,
} from '@xylabs/eslint-config-flat'
import type { Linter } from 'eslint'

const config: Linter.Config[] = [
  { ignores: ['.yarn', 'dist', 'build', 'coverage', 'docs', '**/dist', '**/build', '**/docs'] },
  unicornConfig,
  workspacesConfig,
  rulesConfig,
  ...typescriptTypeCheckedConfig,
  sonarConfig,
  {
    rules: {
      'sonarjs/public-static-readonly': ['off'],
      'sonarjs/prefer-single-boolean-return': ['off'],
    },
  },
  ...importConfig,
  { rules: { 'import-x/no-cycle': ['warn', { maxDepth: 5 }] } },
]

export default config
