refactor: replace 'let' with 'const' for better variable scoping and immutability
This commit is contained in:
@@ -1,15 +1,23 @@
|
||||
import js from "@eslint/js";
|
||||
import pluginReact from "eslint-plugin-react";
|
||||
import pluginReactHooks from "eslint-plugin-react-hooks";
|
||||
import { defineConfig } from "eslint/config";
|
||||
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,mts,cts,jsx,tsx}"],
|
||||
plugins: { js },
|
||||
plugins: {
|
||||
js,
|
||||
"react-hooks": pluginReactHooks,
|
||||
},
|
||||
extends: ["js/recommended"],
|
||||
languageOptions: { globals: globals.browser },
|
||||
rules: {
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "error",
|
||||
},
|
||||
},
|
||||
tseslint.configs.recommended,
|
||||
pluginReact.configs.flat["jsx-runtime"],
|
||||
|
||||
Reference in New Issue
Block a user