This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.js
74 lines (70 loc) · 1.49 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
/**
* ESLint: Config
*
* @author Esteban Rocha
* @link https://github.com/Esteban-Rocha
* @since 1.0.0
*/
// Readable settings flags
const OFF = 0;
const WARN = 1;
const ERROR = 2;
module.exports = exports = {
env: {
amd: true,
browser: true,
es6: true,
jquery: true,
node: true,
serviceworker: true,
webextensions: true,
worker: true,
},
extends: "airbnb-base",
parserOptions: {
ecmaVersion: 8,
sourceType: "module",
},
rules: {
"accessor-pairs": [
ERROR,
{
getWithoutSet: false,
setWithoutGet: true,
},
],
"arrow-body-style": [WARN, "as-needed"],
"arrow-parens": [ERROR, "as-needed", { requireForBlockBody: false }],
"block-scoped-var": WARN,
"comma-dangle": [
ERROR,
{
arrays: "only-multiline",
objects: "only-multiline",
imports: "only-multiline",
exports: "only-multiline",
functions: "ignore",
},
],
// the dot goes with the property when doing multiline
"dot-location": [WARN, "property"],
"implicit-arrow-linebreak": OFF,
indent: [ERROR, "tab"],
"max-len": [WARN, { code: 110, ignoreUrls: true }],
"no-console": OFF,
"no-tabs": OFF,
"no-unused-expressions": [WARN, { allowShortCircuit: true, allowTernary: true }],
"space-before-function-paren": [
ERROR,
{
anonymous: "never",
named: "never",
asyncArrow: "ignore",
},
],
quotes: [ERROR, "double", { allowTemplateLiterals: true }],
"vars-on-top": WARN,
"wrap-iife": [ERROR, "any"],
yoda: ERROR,
},
};