代码拉取完成,页面将自动刷新
const js = require('@eslint/js');
const globals = require('globals');
const prettier = require('eslint-plugin-prettier');
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
const jest = require('eslint-plugin-jest');
module.exports = [
js.configs.recommended,
eslintPluginPrettierRecommended,
{
plugins: {
prettier
},
rules: {
'prettier/prettier': ['error'],
'no-var': ['error'],
'no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}
]
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.webextensions,
...globals.es2021,
...globals.jquery,
...globals.serviceworker
}
}
},
{
files: [
'functional-samples/tutorial.puppeteer/**/*',
'functional-samples/tutorial.terminate-sw/**/*'
],
plugins: { jest },
rules: {
...jest.configs['flat/recommended'].rules
},
languageOptions: {
globals: {
...globals.jest
}
},
settings: {
jest: {
version: '29.7.0'
}
}
},
{
// Ignores must be in a separate block to apply globally:
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
ignores: [
'eslint.config.js',
'.repo/**/*',
'_archive/**/*',
'**/third-party/**',
'**/node_modules/**/*',
// These are autogenerated files that we shouldn't lint
'functional-samples/cookbook.wasm-helloworld-print/wasm/pkg/**/*',
'functional-samples/cookbook.wasm-helloworld-print-nomodule/wasm/pkg/**/*'
]
}
];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。