代码拉取完成,页面将自动刷新
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']
];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。