import globals from 'globals' import tseslint from 'typescript-eslint' import pluginReact from 'eslint-plugin-react' import pluginReactHooks from 'eslint-plugin-react-hooks' export default tseslint.config( { ignores: ['dist/**', 'node_modules/**', 'coverage/**'] }, { files: ['**/*.{ts,tsx}'], extends: [ ...tseslint.configs.recommended, ], plugins: { react: pluginReact, 'react-hooks': pluginReactHooks, }, languageOptions: { globals: { ...globals.browser, ...globals.es2022, }, parserOptions: { ecmaFeatures: { jsx: true }, }, }, settings: { react: { version: 'detect' }, }, rules: { ...pluginReact.configs.recommended.rules, ...pluginReactHooks.configs.recommended.rules, 'react/react-in-jsx-scope': 'off', 'react/prop-types': 'off', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-unused-vars': [ 'error', { argsIgnorePattern: '^_' }, ], }, }, { // R2: the application's rules run in the Rust core; its contracts come from // @faunosteo/core-wasm. The TypeScript domain stays frozen for the PDF engine, the // pipeline and scripts/ until R4/R5 (RUST_ARCHITECTURE_REVIEW VI.4). files: ['src/**/*.{ts,tsx}'], rules: { 'no-restricted-imports': [ 'error', { paths: [ { name: '@faunosteo/domain', message: 'Use @faunosteo/core-wasm (types) and the core operations.', }, ], patterns: ['@faunosteo/domain/*'], }, ], }, }, )