1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | "use strict";
|
18 |
|
19 |
|
20 | require('./load-rules.js');
|
21 |
|
22 | var ERROR = 2;
|
23 | var WARNING = 1;
|
24 | var IGNORE = 0;
|
25 |
|
26 |
|
27 | module.exports = {
|
28 | version: false,
|
29 | eslintrc: false,
|
30 | env: {
|
31 | browser: true
|
32 | },
|
33 | parserOptions: {
|
34 | ecmaVersion: 5
|
35 | },
|
36 | globals: {
|
37 | "$A": true,
|
38 | "AuraContext": true,
|
39 | "AuraSerializationService": true,
|
40 | "AuraExpressionService": true,
|
41 | "AuraEventService": true,
|
42 | "AuraLocalizationService": true,
|
43 | "AuraStorageService": true,
|
44 | "AuraStyleService": true,
|
45 | "MetricsService": true,
|
46 | "AuraDevToolService": true,
|
47 | "Component": true,
|
48 | "CKEDITOR": true,
|
49 | "FORCE": true,
|
50 | "moment": true,
|
51 | "exports": true,
|
52 | "iScroll": true,
|
53 | "unescape": true,
|
54 | "Promise": true
|
55 | },
|
56 | rules: {
|
57 |
|
58 | "ecma-intrinsics": ERROR,
|
59 | "new-rule-template": IGNORE,
|
60 | "secure-document": ERROR,
|
61 | "aura-api": ERROR,
|
62 | "secure-window": ERROR,
|
63 |
|
64 |
|
65 | "no-alert": ERROR,
|
66 | "no-array-constructor": ERROR,
|
67 | "no-bitwise": WARNING,
|
68 | "no-caller": ERROR,
|
69 | "no-catch-shadow": ERROR,
|
70 | "no-cond-assign": ERROR,
|
71 | "no-console": ERROR,
|
72 | "no-constant-condition": ERROR,
|
73 | "no-control-regex": WARNING,
|
74 | "no-debugger": ERROR,
|
75 | "no-delete-var": WARNING,
|
76 | "no-div-regex": WARNING,
|
77 | "no-dupe-keys": ERROR,
|
78 | "no-dupe-args": ERROR,
|
79 | "no-duplicate-case": ERROR,
|
80 | "no-else-return": IGNORE,
|
81 | "no-empty-character-class": ERROR,
|
82 | "no-eq-null": WARNING,
|
83 | "no-eval": ERROR,
|
84 | "no-ex-assign": ERROR,
|
85 | "no-extend-native": ERROR,
|
86 | "no-extra-bind": ERROR,
|
87 | "no-extra-boolean-cast": ERROR,
|
88 | "no-fallthrough": ERROR,
|
89 | "no-floating-decimal": WARNING,
|
90 | "no-func-assign": ERROR,
|
91 | "no-implied-eval": ERROR,
|
92 | "no-inner-declarations": [ERROR, "functions"],
|
93 | "no-invalid-regexp": ERROR,
|
94 | "no-irregular-whitespace": ERROR,
|
95 | "no-iterator": ERROR,
|
96 | "no-label-var": ERROR,
|
97 | "no-labels": ERROR,
|
98 | "no-loop-func": ERROR,
|
99 | "no-multi-str": ERROR,
|
100 | "no-native-reassign": ERROR,
|
101 | "no-negated-in-lhs": ERROR,
|
102 | "no-nested-ternary": WARNING,
|
103 | "no-new": ERROR,
|
104 | "no-new-func": ERROR,
|
105 | "no-new-object": ERROR,
|
106 | "no-new-wrappers": ERROR,
|
107 | "no-obj-calls": ERROR,
|
108 | "no-octal": ERROR,
|
109 | "no-octal-escape": ERROR,
|
110 | "no-param-reassign": WARNING,
|
111 | "no-plusplus": WARNING,
|
112 | "no-proto": ERROR,
|
113 | "no-redeclare": ERROR,
|
114 | "no-regex-spaces": ERROR,
|
115 | "no-return-assign": ERROR,
|
116 | "no-script-url": ERROR,
|
117 | "no-self-compare": ERROR,
|
118 | "no-sequences": ERROR,
|
119 | "no-shadow": ERROR,
|
120 | "no-shadow-restricted-names": ERROR,
|
121 | "no-sparse-arrays": ERROR,
|
122 | "no-ternary": IGNORE,
|
123 | "no-throw-literal": WARNING,
|
124 | "no-undef": WARNING,
|
125 | "no-undef-init": WARNING,
|
126 | "no-undefined": IGNORE,
|
127 | "no-underscore-dangle": IGNORE,
|
128 | "no-unreachable": ERROR,
|
129 | "no-unused-expressions": WARNING,
|
130 | "no-unused-vars": [WARNING, {"vars": "all", "args": "after-used"}],
|
131 | "no-use-before-define": [ERROR, { "functions": false }],
|
132 | "no-void": ERROR,
|
133 | "no-var": IGNORE,
|
134 | "no-with": ERROR,
|
135 | "consistent-return": WARNING,
|
136 | "default-case": ERROR,
|
137 | "dot-notation": [WARNING, { "allowKeywords": true }],
|
138 | "eqeqeq": ["error", "smart"],
|
139 | "guard-for-in": WARNING,
|
140 | "handle-callback-err": WARNING,
|
141 | "new-parens": ERROR,
|
142 | "radix": ERROR,
|
143 | "strict": [ERROR, "global"],
|
144 | "use-isnan": ERROR,
|
145 | "valid-typeof": ERROR,
|
146 | "wrap-iife": [WARNING, "any"]
|
147 |
|
148 |
|
149 |
|
150 | }
|
151 | };
|