加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.js 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
向成军 提交于 2022-05-07 23:22 . fix: 修复 GitHub Actions 异常
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"wx": "writable",
"App": "readonly",
"Page": "readonly",
"Component": "readonly",
"getApp": "readonly",
"getCurrentPages": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"comma-dangle": ["error", "only-multiline"]
},
"overrides": [
{
"files": ["*.wxs"],
"globals": {
"getDate": "readonly",
"getRegExp": "readonly"
},
"env": {
"es6": false
},
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"rules": {
"quote-props": ["error", "as-needed", { "numbers": true }],
"no-useless-escape": "off"
}
},
{
"files": ["./cloudfunctions/**/*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
},
{
files: ['./scripts/**/*.cjs'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['**/*.spec.{js,mjs}'],
env: { jest: true },
},
]
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化