-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
48 lines (36 loc) · 1.16 KB
/
index.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
"use strict";
module.exports = {
env: {
es6: true,
},
parserOptions: {
ecmaVersion: 2018,
},
rules: {
// disallow modifying variables of class declarations
"no-class-assign": "error",
// disallow modifying variables that are declared using const
"no-const-assign": "error",
// disallow use of constant expressions in conditions
"no-constant-condition": "error",
// disallow duplicate name in class members
"no-dupe-class-members": "error",
// disallow template literals in normal strings
"no-template-curly-in-string": "error",
// disallow use of this/super before calling super() in constructors.
"no-this-before-super": "error",
// require let or const instead of var
"no-var": "error",
// require method and property shorthand syntax for object literals
"object-shorthand": "warn",
// Use arrow functions instead of anonymous functions for callbacks
"prefer-arrow-callback": [
"error",
{
allowNamedFunctions: true, // unless the function is named
}
],
// disallow generator functions that do not have yield
"require-yield": "error",
}
};