From 0acf130a02a48737137ebae413a3bd9a2c5185a1 Mon Sep 17 00:00:00 2001 From: cmaddox5 Date: Fri, 15 Nov 2024 09:11:47 -0500 Subject: [PATCH] File format. --- assets/eslint.config.mjs | 108 ++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/assets/eslint.config.mjs b/assets/eslint.config.mjs index d933dfa6..ed0cdc8e 100644 --- a/assets/eslint.config.mjs +++ b/assets/eslint.config.mjs @@ -11,75 +11,87 @@ import { FlatCompat } from "@eslint/eslintrc"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, }); -export default [{ +export default [ + { ignores: [ - "**/webpack.config.js", - "**/.eslintrc.js", - "**/socket.js", - "**/node_modules", - "**/coverage", + "**/webpack.config.js", + "**/.eslintrc.js", + "**/socket.js", + "**/node_modules", + "**/coverage", ], -}, ...fixupConfigRules(compat.extends( - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "plugin:jsx-a11y/recommended", - "plugin:react-hooks/recommended", -)), { + }, + ...fixupConfigRules( + compat.extends( + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "plugin:jsx-a11y/recommended", + "plugin:react-hooks/recommended", + ), + ), + { plugins: { - "@typescript-eslint": fixupPluginRules(typescriptEslint), - react: fixupPluginRules(react), - "jsx-a11y": fixupPluginRules(jsxA11Y), + "@typescript-eslint": fixupPluginRules(typescriptEslint), + react: fixupPluginRules(react), + "jsx-a11y": fixupPluginRules(jsxA11Y), }, linterOptions: { - reportUnusedDisableDirectives: true, + reportUnusedDisableDirectives: true, }, languageOptions: { - parser: tsParser, - ecmaVersion: 5, - sourceType: "script", + parser: tsParser, + ecmaVersion: 5, + sourceType: "script", - parserOptions: { - ecmaFeatures: { - jsx: true, - }, + parserOptions: { + ecmaFeatures: { + jsx: true, }, + }, }, settings: { - react: { - version: "detect", - }, + react: { + version: "detect", + }, }, rules: { - "no-console": 0, - "prefer-rest-params": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-explicit-any": "off", + "no-console": 0, + "prefer-rest-params": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": ["error", { - argsIgnorePattern: "^_.*", - varsIgnorePattern: "^_.*", - destructuredArrayIgnorePattern: "^_.*", - }], + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_.*", + varsIgnorePattern: "^_.*", + destructuredArrayIgnorePattern: "^_.*", + }, + ], - "react/display-name": "off", + "react/display-name": "off", - "react/function-component-definition": ["error", { - namedComponents: "arrow-function", - unnamedComponents: "arrow-function", - }], + "react/function-component-definition": [ + "error", + { + namedComponents: "arrow-function", + unnamedComponents: "arrow-function", + }, + ], - "react/no-danger": "error", - "jsx-a11y/no-static-element-interactions": "off", - "jsx-a11y/click-events-have-key-events": "off", + "react/no-danger": "error", + "jsx-a11y/no-static-element-interactions": "off", + "jsx-a11y/click-events-have-key-events": "off", }, -}]; \ No newline at end of file + }, +];