-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
62 lines (50 loc) · 1.33 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
/*
* ESLint rule-set
* ===============
*
* The following rules are intended to be the least restrictive possible. Tweak
* them as much as you want, or simply replace this file with another one you
* have previously edited.
*
* Learn more about how to configure ESLint at
* <http://eslint.org/docs/user-guide/configuring>.
*/
// Make sure this is the root ESlint configuration of this project.
// This avoids ESLint from recursively search parent directories, looking for
// other configuration files that might conflict with this one.
exports.root = true;
exports.env = {
// Enable ES2015+ features
es6: true,
// Enable Browser global variables
browser: true,
node: true
};
exports.parserOptions = {
// Validate ECMAScript 2015+ syntax
ecmaVersion: 2018,
// Allow ECMAScript modules
sourceType: 'module'
};
exports.globals = {
Phaser: false
};
// Make ESLint less strict
//exports.extends = 'eslint:recommended';
exports.rules = {
// Indent code with 2 spaces
'indent': ['error', 2],
// Prefer single quotes for strings and occasionally template literals
'quotes': [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true
}
],
// Favor Unix-style line endings
'linebreak-style': ['error', 'unix'],
// End lines with semicolons
'semi': ['error', 'always']
};