forked from Dragios/Discord-Bot
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
78 lines (68 loc) · 1.87 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
74
75
76
77
78
'use strict';
// Unlike the rest of the project, this file uses double quotes instead of backticks, because ESLint
// expects the former for the rules.
module.exports = {
env:
{
// Use EMCAScript6 features.
es6: true,
// Use Node.js features.
node: true
},
// Use the recommended ruleset as a base.
extends: `eslint:recommended`,
plugins: [`more-naming-conventions`],
rules:
{
// These are organized by the order in which they appear in the ESLint docs.
// Best Practices
// C++: Warn about empty return values.
"consistent-return": `warn`,
// C++: Require type-safe comparisons.
"eqeqeq": `error`,
// C++: Warn about unused expressions.
"no-unused-expressions": `warn`,
// Style: Allow fallthrough in switches.
"no-fallthrough": `off`,
// Strict Mode
// Safety: Always use strict mode.
"strict": [
`error`,
`global`
],
// Variables
// C++: Warn for unused variables.
"no-unused-vars": `warn`,
// Stylistic Issues
// Style: Force array newlines IF there are any existing newlines (Everything being on one line,
// and it being a short line is alright.).
"array-bracket-newline": `warn`,
// Style: Use Allman style braces, warn otherwise.
"brace-style": [
`warn`,
`allman`
],
// Style: Use 2 levels of indentation, throw error otherwise..
"indent": [
`error`,
2
],
// Consistency: Use template literals, throw error otherwise.
"quotes": [
`error`,
`backtick`
],
// Style: Use no more than 100 lines.
"max-len": [
`error`,
100
],
// Style: Use spaces only.
"no-tabs": `error`,
// C++: Use semicolons.
"semi": `error`,
// Custom Rules
"more-naming-conventions/snake-case-variables": `warn`,
"more-naming-conventions/upper-camel-case-functions": `warn`
}
};