UNPKG

@pdfme/ui

Version:

TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!

42 lines (38 loc) 1.03 kB
import { fileURLToPath } from 'url'; import { dirname, resolve } from 'path'; import reactPlugin from 'eslint-plugin-react'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); // Import the root config const rootConfigPath = resolve(__dirname, '../../eslint.config.mjs'); const rootConfig = await import(rootConfigPath); export default [ ...rootConfig.default, { files: ['src/**/*.ts', 'src/**/*.tsx'], languageOptions: { parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, ecmaFeatures: { jsx: true, }, }, }, plugins: { react: reactPlugin, 'react-hooks': reactHooksPlugin, }, settings: { react: { version: 'detect', }, }, rules: { ...reactPlugin.configs.recommended.rules, 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', }, }, ];