Files
Giveaway-app/eslint.config.mjs
T
Alexandru Eduard Farcas f8144fb5ac lint rules update
2025-05-18 10:15:18 +03:00

32 lines
993 B
JavaScript

import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import { defineConfig } from "eslint/config";
export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"] },
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], languageOptions: { globals: {...globals.browser, ...globals.node} } },
tseslint.configs.recommended,
{
...pluginReact.configs.flat.recommended,
rules: {
...pluginReact.configs.flat.recommended.rules,
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/jsx-filename-extension": ["error", { extensions: [".jsx", ".tsx"] }],
"react/jsx-no-bind": [
"error",
{
ignoreRefs: true,
allowArrowFunctions: true,
allowFunctions: true,
allowBind: false,
},
],
},
}
]);