2 Star 1 Fork 1

Gitee 极速下载 / chatgpt-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/kudoai/chatgpt.js
克隆/下载
eslint.config.mjs 1.81 KB
一键复制 编辑 原始数据 按行查看 历史
import js from '@eslint/js';
import globals from 'globals';
import eslintPluginJsonSchemaValidator from 'eslint-plugin-json-schema-validator';
export default [
js.configs.recommended,
{ ignores: ['**/*.min.js'] },
{
rules: {
'indent': 'off', 'no-unexpected-multiline': 'off', // allow whitespace anywhere
'semi': ['error', 'always'], // enforce semicolons at end of statement
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }], // enforce single quotes except backticks to avoid escaping quotes
'key-spacing': ['error', { 'beforeColon': false, 'afterColon': true }], // enforce spacing in object properties
'comma-dangle': ['error', 'never'], // enforce no trailing commas in arrays or objects
'no-async-promise-executor': 'off', // allow promise executor functions to be async (to accomodate await lines)
'no-constant-condition': 'off', // allow constant conditions
'no-empty': 'off', // allow empty blocks
'no-inner-declarations': 'off', // allow function declarations anywhere
'no-useless-escape': 'off', // allow all escape chars cause ESLint sucks at detecting truly useless ones
'no-unused-vars': ['error', { 'caughtErrors': 'none' }] // allow unused named args in catch blocks
},
languageOptions: {
ecmaVersion: 2022, sourceType: 'script',
globals: {
...globals.browser, ...globals.greasemonkey, ...globals.node,
chatgpt: 'readonly', chrome: 'readonly', CryptoJS: 'readonly',
syncExtension: 'writable'
}
}
},
{ files: ['**/*.mjs', '**/lib*/*.js'], languageOptions: { sourceType: 'module' }},
...eslintPluginJsonSchemaValidator.configs['flat/recommended']
];
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/chatgpt-js.git
git@gitee.com:mirrors/chatgpt-js.git
mirrors
chatgpt-js
chatgpt-js
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891