Skip to content

Commit

Permalink
Update to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-vasconcelos committed Oct 24, 2024
1 parent 3651ac1 commit b3904a4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions rules/next.rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/* * */

import nextPlugin from '@next/eslint-plugin-next';
import globals from 'globals';

import commonRule from './common.rule.js';
Expand All @@ -12,6 +13,18 @@ export default [

...commonRule,

{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
'@next/next': nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs['core-web-vitals'].rules,
'@next/next/no-img-element': 'error',
},
},

{
languageOptions: {
globals: {
Expand All @@ -35,8 +48,4 @@ export default [
},
},

{
extends: ['plugin:@next/next/recommended'],
},

];

0 comments on commit b3904a4

Please sign in to comment.