-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolução do lint, agora ele está rodando corretamente e gerando…
… os warnings e errors corretamente
- Loading branch information
Showing
1 changed file
with
12 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,19 @@ | ||
import globals from "globals"; | ||
import tseslint from "@typescript-eslint/eslint-plugin"; | ||
import pluginReact from "eslint-plugin-react"; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
{ | ||
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], | ||
files: ["**/*.{js,jsx,ts,tsx}"], | ||
languageOptions: { | ||
globals: globals.browser, | ||
sourceType: "module", // Especifica o uso de módulos ES6 | ||
}, | ||
plugins: { | ||
"@typescript-eslint": tseslint, | ||
"react": pluginReact, | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
globals: { | ||
...globals.node, | ||
...globals.es2021, | ||
}, | ||
}, | ||
rules: { | ||
// Adicione aqui regras personalizadas se necessário | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.js"], | ||
languageOptions: { | ||
sourceType: "commonjs", // Para arquivos .js que usam CommonJS | ||
}, | ||
}, | ||
...tseslint.configs.recommended, | ||
pluginReact.configs.recommended, // Use as configurações recomendadas | ||
"no-unused-vars": "warn", | ||
"no-console": "off" | ||
} | ||
} | ||
]; |