DEV Community

Discussion on: Static check with next 11 (Prettier, ESLint)

Collapse
 
dahelg profile image
Helge Drews

Very helpful! I think in next@^11 the "next/core-web-vitals" already extends the "next" config, so you don't need to put it in the array.
You can see this in node_modules/@next/eslint-plugin-next/lib/index.js when you're searching for 'core-web-vitals' in your next project:

// ...
'core-web-vitals': {
      plugins: ['@next/next'],
      extends: ['plugin:@next/next/recommended'],
      rules: {
        '@next/next/no-sync-scripts': 2,
        '@next/next/no-html-link-for-pages': 2,
      },
  },
Enter fullscreen mode Exit fullscreen mode

By the way, at the moment you need to pin eslint to "7.32.0", because the version 8 has breaking changes and throws an error.

Collapse
 
edsonluiz profile image
Edson Luiz Ribeiro Rodrigues

My apologies for the delay in responding. I am so thankful for your tip, especially about the version.