Next.js Discord

Discord Forum

ESLINT using Flat Config

Beveren posted this in #help-forum
Open in Discord
I need some help converting this .eslintrc.js file to use the new eslint flat config:

How do I output my plugins & extends with flat config?

module.exports = {
    root: true,
    parserOptions: {
        ecmaVersion: 'latest',
        sourceType: 'module',
        ecmaFeatures: {
            jsx: true,
    env: {
        browser: true,
        node: true,
        es6: true,
    settings: {
        react: {
            version: 'detect',
        'import/resolver': {
            node: {
                extensions: ['.ts', '.tsx'],
    plugins: ['@typescript-eslint', 'testing-library'],
    extends: [

0 Replies