/** * ESLint Base Configuration * Shared across all TypeScript projects in the workspace * * Usage in project: * ```js * // eslint.config.js * import baseConfig from '../../../devtools/configs/eslint.config.base.js'; * export default [...baseConfig]; * ``` */ import js from '@eslint/js'; import tseslint from 'typescript-eslint'; import prettierConfig from 'eslint-config-prettier'; export default [ js.configs.recommended, ...tseslint.configs.recommended, prettierConfig, { files: ['**/*.ts', '**/*.tsx'], languageOptions: { parser: tseslint.parser, parserOptions: { ecmaVersion: 'latest', sourceType: 'module', }, }, rules: { // TypeScript specific '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-non-null-assertion': 'warn', // General 'no-console': ['warn', { allow: ['warn', 'error', 'info'] }], 'no-debugger': 'error', 'prefer-const': 'error', 'no-var': 'error', 'eqeqeq': ['error', 'always'], // Import ordering (if using import plugin) // 'import/order': ['error', { 'newlines-between': 'always' }], }, }, { ignores: [ '**/node_modules/**', '**/dist/**', '**/build/**', '**/.next/**', '**/coverage/**', '**/*.js', '**/*.d.ts', ], }, ];