forked from gramener/comicgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
39 lines (39 loc) · 1.25 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
// We specify ESLint config as JS rather than JSON to enable comments
module.exports = {
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
},
'overrides': [{
'files': ['test/server.js', 'scripts/png.js'],
'parserOptions': {
'ecmaVersion': 8
}
}],
'plugins': [
'template' // Handle Tornado templates and JS in HTML files
],
'env': {
'node': true, // Include node globals
'es6': true, // Allow ES6 in JavaScript
'browser': true, // Include browser globals
'jquery': true // Include jQuery and $
},
'globals': {
'_': true,
'g1': true,
'd3': true,
'flubber': true,
'tape': true
},
'extends': 'eslint:recommended',
'rules': {
/* Override default rules */
'indent': [2, 2, { 'VariableDeclarator': 2 }], // Force 2 space indentation
'linebreak-style': ['error', 'unix'], // Force UNIX style line
'semi': ['error', 'never'], // Force no-semicolon style
'no-cond-assign': ['off', 'always'], // Allow this for loops
'space-before-blocks': ['error', 'always'], // Space must precede brace
'quotes': ['error', 'single'] // We may go for a double-quotes style
}
}