chore(eslint): Import ESlint to the /Server

- Exec 'npm init @eslint/config@latest'
- Update configuration according to docs
This commit is contained in:
Mert Şişmanoğlu committed 2024-12-20 23:29:48 +03:00
1 parent 4a78adfefd
commit f9874d33fc
3 files changed
+850

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import mochaPlugin from "eslint-plugin-mocha";
/*
Please do not forget to look at the latest eslint configurations and rules.
ESlint v9 configuration is different than v8.
"https://eslint.org/docs/latest/use/configure/"
*/
/** @type {import('eslint').Linter.Config[]} */
export default [
{
languageOptions: { globals: globals.node }, // Add Node.js globals
},
pluginJs.configs.recommended, // Core JS rules
mochaPlugin.configs.flat.recommended, // Mocha rules
{
rules: {
"mocha/max-top-level-suites": "warn", // Warn if there are too many top-level suites instead of failing
},
},
];