mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
- Add eslint.config.mjs at root with TypeScript/JS rules - Configure lint-staged to run ESLint --fix on JS/TS files - Add ESLint dependencies to root package.json - Set "type": "module" in package.json to fix module warning - Ignore projects with their own ESLint configs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
67 lines
1.7 KiB
JavaScript
67 lines
1.7 KiB
JavaScript
// @ts-check
|
|
import eslint from '@eslint/js';
|
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
/**
|
|
* Root ESLint config for the monorepo.
|
|
* Individual projects can override with their own eslint.config.* files.
|
|
*/
|
|
export default tseslint.config(
|
|
// Global ignores
|
|
{
|
|
ignores: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/build/**',
|
|
'**/.svelte-kit/**',
|
|
'**/.expo/**',
|
|
'**/.next/**',
|
|
'**/coverage/**',
|
|
'**/apps-archived/**',
|
|
// Ignore projects with their own ESLint configs
|
|
'apps/manadeck/apps/mobile/**',
|
|
'apps/picture/apps/mobile/**',
|
|
'apps/picture/apps/web/**',
|
|
'games/voxel-lava/apps/web/**',
|
|
],
|
|
},
|
|
// Base JavaScript rules
|
|
eslint.configs.recommended,
|
|
// TypeScript rules (without type-checking for speed)
|
|
...tseslint.configs.recommended,
|
|
// Prettier integration
|
|
eslintPluginPrettierRecommended,
|
|
// Global settings
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
...globals.browser,
|
|
...globals.es2022,
|
|
},
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
// TypeScript-specific rules (relaxed for monorepo compatibility)
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
],
|
|
'@typescript-eslint/no-require-imports': 'off',
|
|
},
|
|
},
|
|
// JavaScript-specific rules
|
|
{
|
|
files: ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'],
|
|
rules: {
|
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
|
},
|
|
}
|
|
);
|