forked from eslint/eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
73 lines (70 loc) · 2.3 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
"use strict";
module.exports = {
root: true,
plugins: [
"eslint-plugin",
"internal-rules"
],
extends: [
"eslint",
"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/require-meta-type": "error",
"eslint-plugin/test-case-property-ordering": [
"error",
// https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/79
[
"filename",
"code",
"output",
"options",
"parser",
"parserOptions",
"globals",
"env",
"errors"
]
],
"eslint-plugin/test-case-shorthand-strings": "error",
"internal-rules/multiline-comment-style": "error"
},
overrides: [
{
files: ["lib/rules/*", "tools/internal-rules/*"],
excludedFiles: ["tools/internal-rules/index.js"],
rules: {
"internal-rules/no-invalid-meta": "error",
"internal-rules/consistent-docs-description": "error"
/*
* TODO: enable it when all the rules using meta.messages
* "internal-rules/consistent-meta-messages": "error"
*/
}
}, {
files: ["tools/internal-rules/*"],
rules: {
"node/no-unpublished-require": "off"
}
}, {
files: ["lib/rules/*"],
rules: {
"internal-rules/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."
}]
}
}
]
};