mirror of
https://github.com/Mintplex-Labs/anything-llm
synced 2026-04-25 17:15:37 +02:00
* add eslint config to /collector * prettier formatting * fix unused * fix undefined * disable lines * lockfile --------- Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
import js from "@eslint/js";
|
|
import globals from "globals";
|
|
import { defineConfig } from "eslint/config";
|
|
import pluginPrettier from "eslint-plugin-prettier";
|
|
import configPrettier from "eslint-config-prettier";
|
|
import unusedImports from "eslint-plugin-unused-imports";
|
|
|
|
export default defineConfig([
|
|
{ ignores: ["__tests__/**"] },
|
|
{
|
|
files: ["**/*.{js,mjs,cjs}"],
|
|
plugins: { js, prettier: pluginPrettier, "unused-imports": unusedImports },
|
|
extends: ["js/recommended"],
|
|
languageOptions: { globals: { ...globals.node, ...globals.browser } },
|
|
rules: {
|
|
...configPrettier.rules,
|
|
"prettier/prettier": "error",
|
|
"no-case-declarations": "off",
|
|
"no-prototype-builtins": "off",
|
|
"no-async-promise-executor": "off",
|
|
"no-extra-boolean-cast": "off",
|
|
"no-empty": "off",
|
|
"no-unused-private-class-members": "warn",
|
|
"no-unused-vars": "off",
|
|
"unused-imports/no-unused-imports": "error",
|
|
"unused-imports/no-unused-vars": [
|
|
"error",
|
|
{
|
|
vars: "all",
|
|
varsIgnorePattern: "^_",
|
|
args: "after-used",
|
|
argsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
|
|
]);
|