代码拉取完成,页面将自动刷新
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
plugins: ["prettier", "n", "jest", "jsdoc"],
extends: [
"eslint:recommended",
"plugin:n/recommended",
"plugin:prettier/recommended"
],
env: {
node: true,
es6: true
},
globals: {
WebAssembly: true
},
parserOptions: {
ecmaVersion: 2018
},
rules: {
"prettier/prettier": "error",
"no-template-curly-in-string": "error",
"no-caller": "error",
"no-control-regex": "off",
yoda: "error",
eqeqeq: "error",
"eol-last": "error",
"no-extra-bind": "warn",
"no-process-exit": "warn",
"no-use-before-define": "off",
"no-unused-vars": ["error", { args: "none", ignoreRestSiblings: true }],
"no-loop-func": "off",
"n/no-missing-require": ["error", { allowModules: ["webpack"] }],
"jsdoc/check-indentation": "error",
"jsdoc/check-param-names": "error",
"jsdoc/check-property-names": "error",
"jsdoc/check-tag-names": "error",
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
"jsdoc/require-param-description": "error",
"jsdoc/require-param-name": "error",
"jsdoc/require-param-type": "error",
"jsdoc/require-param": "error",
"jsdoc/require-property": "error",
"jsdoc/require-property-name": "error",
"jsdoc/require-property-type": "error",
"jsdoc/require-returns-description": "error",
"jsdoc/require-returns-type": "error",
"jsdoc/require-returns": "error",
// Disallow @ts-ignore directive. Use @ts-expect-error instead
"no-warning-comments": [
"error",
{ terms: ["@ts-ignore"], location: "start" }
]
},
settings: {
jsdoc: {
mode: "typescript",
// supported tags https://github.com/microsoft/TypeScript-wiki/blob/master/JSDoc-support-in-JavaScript.md
tagNamePreference: {
...["implements", "const", "memberof", "readonly", "yields"].reduce(
(acc, tag) => {
acc[tag] = {
message: `@${tag} currently not supported in TypeScript`
};
return acc;
},
{}
),
extends: "extends",
return: "returns",
constructor: "constructor",
prop: "property",
arg: "param",
augments: "extends",
description: false,
desc: false,
inheritdoc: false,
class: "constructor"
},
overrideReplacesDocs: false
}
},
overrides: [
{
// Allow to use `dynamic` import
files: ["bin/**/*.js"],
parserOptions: {
ecmaVersion: 2020
}
},
{
files: ["lib/**/*.runtime.js", "hot/*.js"],
env: {
es6: false,
browser: true
},
globals: {
Promise: false
},
parserOptions: {
ecmaVersion: 5
}
},
{
files: ["tooling/**/*.js"],
env: { es6: true },
parserOptions: {
ecmaVersion: 2020
}
},
{
files: ["test/**/*.js"],
env: {
"jest/globals": true
},
parserOptions: {
ecmaVersion: 2020
},
globals: {
nsObj: false,
jasmine: false
}
},
{
files: ["examples/**/*.js"],
rules: {
"n/no-missing-require": "off",
"n/no-unpublished-require": "off",
"n/no-extraneous-require": "off"
}
}
]
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。