1 Star 0 Fork 0

刘凯/anything-llm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
eslint.config.js 2.42 KB
一键复制 编辑 原始数据 按行查看 历史
Francisco Bischoff 提交于 2024-01-08 23:31 . devcontainer v1 (#297)
import globals from "./server/node_modules/globals/index.js"
import eslintRecommended from "./server/node_modules/@eslint/js/src/index.js"
import eslintConfigPrettier from "./server/node_modules/eslint-config-prettier/index.js"
import prettier from "./server/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js"
import react from "./server/node_modules/eslint-plugin-react/index.js"
import reactRefresh from "./server/node_modules/eslint-plugin-react-refresh/index.js"
import reactHooks from "./server/node_modules/eslint-plugin-react-hooks/index.js"
import ftFlow from "./server/node_modules/eslint-plugin-ft-flow/dist/index.js"
import hermesParser from "./server/node_modules/hermes-eslint/dist/index.js"
const reactRecommended = react.configs.recommended
const jsxRuntime = react.configs["jsx-runtime"]
export default [
eslintRecommended.configs.recommended,
eslintConfigPrettier,
{
ignores: ["**/*.test.js"],
languageOptions: {
parser: hermesParser,
parserOptions: {
ecmaFeatures: { jsx: true }
},
ecmaVersion: 2020,
sourceType: "module",
globals: {
...globals.browser,
...globals.es2020,
...globals.node
}
},
linterOptions: { reportUnusedDisableDirectives: true },
settings: { react: { version: "18.2" } },
plugins: {
ftFlow,
react,
"jsx-runtime": jsxRuntime,
"react-hooks": reactHooks,
prettier
},
rules: {
...reactRecommended.rules,
...reactHooks.configs.recommended.rules,
...ftFlow.recommended,
"no-unused-vars": "warn",
"no-undef": "warn",
"no-empty": "warn",
"no-extra-boolean-cast": "warn",
"prettier/prettier": "warn"
}
},
{
files: ["frontend/src/**/*.js"],
plugins: {
ftFlow,
prettier
},
rules: {
"prettier/prettier": "warn"
}
},
{
files: [
"server/endpoints/**/*.js",
"server/models/**/*.js",
"server/swagger/**/*.js",
"server/utils/**/*.js",
"server/index.js"
],
rules: {
"no-undef": "warn"
}
},
{
files: ["frontend/src/**/*.jsx"],
plugins: {
ftFlow,
react,
"jsx-runtime": jsxRuntime,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
prettier
},
rules: {
...jsxRuntime.rules,
"react/prop-types": "off", // FIXME
"react-refresh/only-export-components": "warn"
}
}
]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/MufcLiuKai/anything-llm.git
git@gitee.com:MufcLiuKai/anything-llm.git
MufcLiuKai
anything-llm
anything-llm
master

搜索帮助