From 8b2f23f4badb5cde12afee2ee45578ca2d198e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Felipe=20Schulle?= Date: Thu, 27 Jun 2024 14:49:21 -0300 Subject: [PATCH] fix(next-config): ajustes e adicionado regra para default export next --- package.json | 2 +- src/presets/next.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a1509d..e6982b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@brainylab/eslint-config", - "version": "2.5.1", + "version": "2.5.2", "description": "ESLint config for BrainyLab projects", "keywords": [ "eslint", diff --git a/src/presets/next.ts b/src/presets/next.ts index b05f93b..9542964 100644 --- a/src/presets/next.ts +++ b/src/presets/next.ts @@ -10,4 +10,17 @@ export const next = [ '@next/next/no-html-link-for-pages': 'off', }, }, + { + name: 'no default exports exceptions', + files: [ + 'src/app/**/{page,layout,template}.tsx', + '*.config.{ts,js}', + '**/*.config.{ts,js}', + '*.d.ts', + '**/*.d.ts', + ], + rules: { + 'no-restricted-syntax': ['off', { selector: 'ExportDefaultDeclaration' }], + }, + }, ];