1 Star 0 Fork 0

dssljt/eslint

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
"use strict";
const path = require("path");
const rulesDirPlugin = require("eslint-plugin-rulesdir");
rulesDirPlugin.RULES_DIR = path.join(__dirname, "tools/internal-rules");
module.exports = {
root: true,
plugins: [
"eslint-plugin",
"rulesdir"
],
extends: [
"./packages/eslint-config-eslint/default.yml",
"plugin:eslint-plugin/recommended"
],
rules: {
"eslint-plugin/consistent-output": "error",
"eslint-plugin/no-deprecated-context-methods": "error",
"eslint-plugin/prefer-output-null": "error",
"eslint-plugin/prefer-placeholders": "error",
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
"eslint-plugin/test-case-property-ordering": "error",
"eslint-plugin/test-case-shorthand-strings": "error",
"rulesdir/multiline-comment-style": "error",
"rulesdir/no-useless-catch": "error"
},
overrides: [
{
files: ["lib/rules/*", "tools/internal-rules/*"],
rules: {
"rulesdir/no-invalid-meta": "error",
"rulesdir/consistent-docs-description": "error"
/*
* TODO: enable it when all the rules using meta.messages
* "rulesdir/consistent-meta-messages": "error"
*/
}
}, {
files: ["lib/rules/*"],
rules: {
"rulesdir/consistent-docs-url": "error"
}
}, {
files: ["tests/**/*"],
env: { mocha: true },
rules: {
"no-restricted-syntax": ["error", {
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
message: "`assert.doesNotThrow()` should be replaced with a comment next to the code."
}]
}
}
]
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dssljt/eslint.git
git@gitee.com:dssljt/eslint.git
dssljt
eslint
eslint
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385