forked from concord-consortium/codap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
69 lines (64 loc) · 2.39 KB
/
.eslintrc.json
File metadata and controls
69 lines (64 loc) · 2.39 KB
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
{
"env": {
"browser": true
},
"globals": { "DG": false, "Raphael": false, "$": false, "SC": false, "sc_require": false,
"sc_super": false, "static_url": false, "NO": false, "YES": false,
"module": false, "require": false },
"extends": [ "eslint:recommended" ],
"rules": {
// possible errors
"no-console": "off", // 19 console statements
"no-extra-parens": "off", // liberal use of extra parens
"no-prototype-builtins": "off", // 8 calls to hasOwnProperty
"no-template-curly-in-string": "error",
"no-unreachable": "error",
"no-unsafe-negation": "error",
// best practices
"array-callback-return": "error",
"block-scoped-var": "warn",
"consistent-return": "off", // liberal use of inconsistent returns, e.g. SproutCore properties
"dot-notation": ["warn", { "allowKeywords": false }],
"eqeqeq": ["error", "allow-null"],
"no-alert": "error",
"no-caller": "error",
"no-eval": "error",
"no-extra-bind": "off", // 18 extra binds
"no-global-assign": "error",
"no-implicit-globals": "off", // 4 implicit globals
"no-invalid-this": "error",
"no-loop-func": "warn",
"no-new-wrappers": "error",
"no-proto": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
"no-useless-call": "error",
"no-useless-concat": "warn",
"no-useless-escape": "off", // 34 unnecessary escapes
"no-useless-return": "error",
"no-with": "error",
"radix": "error",
"wrap-iife": "warn",
// strict mode
"strict": "off",
// variables
"no-shadow-restricted-names": "error",
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
"no-use-before-define": "off", // 169 used before defined
// node.js/CommonJS
"no-mixed-requires": "warn",
// stylistic issues
"eol-last": "off", // 13 files missing final EOLs
"func-name-matching": "error",
"new-cap": ["warn", { "capIsNew": false }],
"new-parens": "warn",
"no-bitwise": "warn",
"no-lonely-if": "off", // 8 lonely ifs
"no-underscore-dangle": "off", // liberal use of leading underscores
"no-unneeded-ternary": "warn",
"no-whitespace-before-property": "warn",
"quote-props": ["error", "as-needed", { "keywords": true, "unnecessary": false }],
"quotes": "off",
"semi": ["error", "always"]
}
}