forked from eslint/eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
57 lines (53 loc) · 1.88 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"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."
}]
}
}
]
};