This repository has been archived by the owner on Jun 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.js
49 lines (46 loc) · 1.46 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
49
module.exports = {
env: {
browser: true
},
globals: {
_: false,
Backbone: false,
jQuery: false,
JSON: false,
wp: false
},
rules: {
// Possible Errors
// Disallow assignment in conditional expressions
'no-cond-assign': ['error', 'except-parens'],
// Disallow irregular whitespace outside of strings and comments
'no-irregular-whitespace': 'error',
// Best Practices
// Specify curly brace conventions for all control statements
'curly': 'error',
// Require the use of === and !==
'eqeqeq': 'error',
// Disallow use of arguments.caller or arguments.callee
'no-caller': 'error',
// Disallow comparisons to null without a type-checking operator
'no-eq-null': 'error',
// Disallow usage of expressions in statement position
'no-unused-expressions': 'error',
// Require immediate function invocation to be wrapped in parentheses
'wrap-iife': ['error', 'any'],
// Strict Mode
// Variables
// Disallow use of undeclared variables unless mentioned in a /*global */ block
'no-undef': 'error',
// Disallow declaration of variables that are not used in the code
'no-unused-vars': 'error',
// Stylistic Issues
// Disallow trailing whitespace at the end of lines
'no-trailing-spaces': 'error',
// Enforce variables to be declared either together or separately in functions
'one-var': ['error', 'always'],
// Specify whether backticks, double or single quotes should be used
'quotes': ['error', 'single']
// Legacy
}
};