forked from sql-js/sql.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
67 lines (66 loc) · 2.18 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
"use strict";
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: [
"airbnb-base"
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
ignorePatterns: [
"/dist/",
"/examples/",
"/node_modules/",
"/out/",
"/src/shell-post.js",
"/src/shell-pre.js",
"/test/",
"!/.eslintrc.js"
],
parserOptions: {
ecmaVersion: 5,
sourceType: "script"
},
rules: {
// reason - sqlite exposes functions with underscore-naming-convention
camelcase: "off",
// reason - They make it easier to add new elements to arrays
// and parameters to functions, and make commit diffs clearer
"comma-dangle": "off",
// reason - string-notation needed to prevent closure-minifier
// from mangling property-name
"dot-notation": "off",
// reason - enforce 4-space indent
indent: ["error", 4, { SwitchCase: 1 }],
// reason - enforce 80-column-width limit
"max-len": ["error", { code: 80 }],
// reason - src/api.js uses bitwise-operators
"no-bitwise": "off",
"no-cond-assign": ["error", "except-parens"],
"no-param-reassign": "off",
"no-throw-literal": "off",
// reason - parserOptions is set to es5 language-syntax
"no-var": "off",
// reason - parserOptions is set to es5 language-syntax
"object-shorthand": "off",
// reason - parserOptions is set to es5 language-syntax
"prefer-arrow-callback": "off",
// reason - parserOptions is set to es5 language-syntax
"prefer-destructuring": "off",
// reason - parserOptions is set to es5 language-syntax
"prefer-spread": "off",
// reason - parserOptions is set to es5 language-syntax
"prefer-template": "off",
// reason - sql.js frequently use sql-query-strings containing
// single-quotes
quotes: ["error", "double"],
// reason - allow top-level "use-strict" in commonjs-modules
strict: ["error", "safe"],
"vars-on-top": "off"
}
};