aboutsummaryrefslogtreecommitdiff
path: root/eslint.config.mjs
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-07 22:53:24 -0400
committerbobzel <zzzman@gmail.com>2024-10-07 22:53:24 -0400
commit607443efdf3a618d9c5b062131ef9f7cbb6b032c (patch)
tree29e10f14a633a16a1c4ddb8fa023be74ddfe9cd2 /eslint.config.mjs
parentb67de10bc8b2eab16de7bb5dd4a7a8646e2a8d5f (diff)
restored eslint config file
Diffstat (limited to 'eslint.config.mjs')
-rw-r--r--eslint.config.mjs65
1 files changed, 56 insertions, 9 deletions
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 4f03c066a..f7063caa5 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -1,11 +1,58 @@
-import globals from "globals";
-import tseslint from "typescript-eslint";
-import pluginReact from "eslint-plugin-react";
-
+import pluginJs from '@eslint/js';
+import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
+import globals from 'globals';
+import tseslint from 'typescript-eslint';
export default [
- {files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"]},
- {languageOptions: { globals: globals.browser }},
- ...tseslint.configs.recommended,
- pluginReact.configs.flat.recommended,
-]; \ No newline at end of file
+ {
+ languageOptions: { globals: { ...globals.browser, ...globals.node } },
+ },
+ pluginJs.configs.recommended,
+ ...tseslint.configs.recommended,
+ {
+ rules: {
+ 'node/no-missing-import': 0,
+ 'no-console': 'off',
+ 'func-names': 'off',
+ 'no-process-exit': 'off',
+ 'object-shorthand': 'off',
+ 'class-methods-use-this': 'off',
+ 'single-quote': 'off',
+ 'max-classes-per-file': 0,
+
+ 'react/jsx-filename-extension': [
+ 2,
+ {
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
+ },
+ ],
+
+ 'import/prefer-default-export': 'off',
+ 'no-unused-expressions': 'off',
+ '@typescript-eslint/no-unused-expressions': 'off',
+ 'prefer-template': 'off',
+ 'no-inner-declarations': 'off',
+ 'no-plusplus': 'off',
+ 'no-multi-assign': 'off',
+ 'no-underscore-dangle': 'off',
+ 'no-nested-ternary': 'off',
+ 'no-param-reassign': 'error',
+ 'lines-between-class-members': 'off',
+ 'no-shadow': 'off',
+ '@typescript-eslint/no-shadow': 'warn',
+ 'no-unused-vars': 'off',
+ '@typescript-eslint/no-unused-vars': 'error',
+ '@typescript-eslint/no-namespace': 'off',
+ 'react/destructuring-assignment': 0,
+ 'prefer-arrow-callback': 'error',
+ 'no-return-assign': 'error',
+ 'no-await-in-loop': 'error',
+ 'no-loop-func': 'error',
+ 'no-cond-assign': 'error',
+ 'no-use-before-define': 'error',
+ '@typescript-eslint/no-explicit-any': 'error',
+ 'no-restricted-globals': ['error', 'event'],
+ },
+ },
+ pluginReactConfig,
+];