const { resolve } = require('node:path');

const project = resolve(process.cwd(), 'tsconfig.eslint.json');

/** @type {import("eslint").Linter.Config} */
module.exports = {
    env: {
        node: true,
        browser: true,
    },
    globals: {
        React: true,
        JSX: true,
    },
    extends: ['plugin:@next/next/recommended', './base-ts'],
    settings: {
        'import/resolver': {
            typescript: {
                project,
            },
        },
    },
    ignorePatterns: [
        // Ignore dotfiles
        'node_modules/',
    ],
};
