Skip to content

Commit 92ecc1e

Browse files
authored
Merge pull request KartikTalwar#330 from KartikTalwar/eslint
Adhere to objective code-quality metrics as per eslint This fixes KartikTalwar#327.
2 parents 38b18fa + d84aeae commit 92ecc1e

File tree

3 files changed

+2518
-2258
lines changed

3 files changed

+2518
-2258
lines changed

.eslintrc.json

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"browser": true
5+
},
6+
"globals": {
7+
"jQuery": true,
8+
"GLOBALS": true,
9+
"VIEW_DATA": true
10+
},
11+
"ecmaFeatures": {},
12+
"rules": {
13+
"no-alert": "off",
14+
"no-array-constructor": "error",
15+
"no-bitwise": "off",
16+
"no-caller": "off",
17+
"no-case-declarations": "error",
18+
"no-catch-shadow": "off",
19+
"no-class-assign": "error",
20+
"no-cond-assign": "error",
21+
"no-confusing-arrow": "off",
22+
"no-const-assign": "error",
23+
"no-constant-condition": "off",
24+
"no-continue": "off",
25+
"no-control-regex": "error",
26+
"no-debugger": "error",
27+
"no-delete-var": "error",
28+
"no-div-regex": "off",
29+
"no-dupe-args": "error",
30+
"no-dupe-class-members": "error",
31+
"no-dupe-keys": "error",
32+
"no-duplicate-case": "error",
33+
"no-duplicate-imports": "off",
34+
"no-else-return": "off",
35+
"no-empty": "error",
36+
"no-empty-character-class": "error",
37+
"no-empty-function": "off",
38+
"no-empty-pattern": "error",
39+
"no-eq-null": "off",
40+
"no-eval": "off",
41+
"no-ex-assign": "error",
42+
"no-extend-native": "off",
43+
"no-extra-bind": "off",
44+
"no-extra-boolean-cast": "error",
45+
"no-extra-label": "off",
46+
"no-extra-parens": "off",
47+
"no-extra-semi": "error",
48+
"no-fallthrough": "error",
49+
"no-floating-decimal": "off",
50+
"no-func-assign": "error",
51+
"no-global-assign": "error",
52+
"no-implicit-coercion": "off",
53+
"no-implicit-globals": "off",
54+
"no-implied-eval": "off",
55+
"no-inline-comments": "off",
56+
"no-inner-declarations": "error",
57+
"no-invalid-regexp": "error",
58+
"no-invalid-this": "off",
59+
"no-irregular-whitespace": "error",
60+
"no-iterator": "off",
61+
"no-label-var": "off",
62+
"no-labels": "off",
63+
"no-lone-blocks": "off",
64+
"no-lonely-if": "off",
65+
"no-loop-func": "off",
66+
"no-magic-numbers": "off",
67+
"no-mixed-operators": "off",
68+
"no-mixed-requires": "off",
69+
"no-mixed-spaces-and-tabs": "error",
70+
"no-multi-spaces": "off",
71+
"no-multi-str": "off",
72+
"no-multiple-empty-lines": "off",
73+
"no-native-reassign": "off",
74+
"no-negated-condition": "off",
75+
"no-negated-in-lhs": "off",
76+
"no-nested-ternary": "off",
77+
"no-new": "off",
78+
"no-new-func": "off",
79+
"no-new-object": "off",
80+
"no-new-require": "off",
81+
"no-new-symbol": "error",
82+
"no-new-wrappers": "off",
83+
"no-obj-calls": "error",
84+
"no-octal": "error",
85+
"no-octal-escape": "off",
86+
"no-param-reassign": "off",
87+
"no-path-concat": "off",
88+
"no-plusplus": "off",
89+
"no-process-env": "off",
90+
"no-process-exit": "off",
91+
"no-proto": "off",
92+
"no-prototype-builtins": "off",
93+
"no-redeclare": "error",
94+
"no-regex-spaces": "error",
95+
"no-restricted-globals": "off",
96+
"no-restricted-imports": "off",
97+
"no-restricted-modules": "off",
98+
"no-restricted-properties": "off",
99+
"no-restricted-syntax": "off",
100+
"no-return-assign": "off",
101+
"no-return-await": "off",
102+
"no-script-url": "off",
103+
"no-self-assign": "error",
104+
"no-self-compare": "off",
105+
"no-sequences": "off",
106+
"no-shadow": "off",
107+
"no-shadow-restricted-names": "off",
108+
"no-whitespace-before-property": "off",
109+
"no-spaced-func": "off",
110+
"no-sparse-arrays": "error",
111+
"no-sync": "off",
112+
"no-tabs": "off",
113+
"no-ternary": "off",
114+
"no-trailing-spaces": "off",
115+
"no-this-before-super": "error",
116+
"no-throw-literal": "off",
117+
"no-undef": "error",
118+
"no-undef-init": "off",
119+
"no-undefined": "off",
120+
"no-unexpected-multiline": "error",
121+
"no-underscore-dangle": "off",
122+
"no-unmodified-loop-condition": "off",
123+
"no-unneeded-ternary": "off",
124+
"no-unreachable": "error",
125+
"no-unsafe-finally": "error",
126+
"no-unsafe-negation": "error",
127+
"no-unused-expressions": "off",
128+
"no-unused-labels": "error",
129+
"no-unused-vars": "warn",
130+
"no-use-before-define": "off",
131+
"no-useless-call": "off",
132+
"no-useless-computed-key": "off",
133+
"no-useless-concat": "off",
134+
"no-useless-constructor": "off",
135+
"no-useless-escape": "off",
136+
"no-useless-rename": "off",
137+
"no-useless-return": "off",
138+
"no-void": "off",
139+
"no-var": "off",
140+
"no-warning-comments": "off",
141+
"no-with": "off",
142+
"array-bracket-spacing": "off",
143+
"array-callback-return": "off",
144+
"arrow-body-style": "off",
145+
"arrow-parens": "off",
146+
"arrow-spacing": "off",
147+
"accessor-pairs": "off",
148+
"block-scoped-var": "error",
149+
"block-spacing": "off",
150+
"brace-style": "off",
151+
"callback-return": "off",
152+
"camelcase": "off",
153+
"class-methods-use-this": "off",
154+
"comma-dangle": "off",
155+
"comma-spacing": "off",
156+
"comma-style": "off",
157+
"complexity": "off",
158+
"computed-property-spacing": "off",
159+
"consistent-return": "off",
160+
"consistent-this": "off",
161+
"constructor-super": "error",
162+
"curly": "off",
163+
"default-case": "off",
164+
"dot-location": "off",
165+
"dot-notation": "off",
166+
"eol-last": "off",
167+
"eqeqeq": "error",
168+
"func-call-spacing": "off",
169+
"func-names": "off",
170+
"func-name-matching": "off",
171+
"func-style": "off",
172+
"generator-star-spacing": "off",
173+
"global-require": "off",
174+
"guard-for-in": "off",
175+
"handle-callback-err": "off",
176+
"id-blacklist": "off",
177+
"id-length": "off",
178+
"id-match": "off",
179+
"indent": "error",
180+
"init-declarations": "off",
181+
"jsx-quotes": "off",
182+
"key-spacing": "off",
183+
"keyword-spacing": "off",
184+
"linebreak-style": "off",
185+
"line-comment-position": "off",
186+
"lines-around-comment": "off",
187+
"lines-around-directive": "off",
188+
"max-depth": "off",
189+
"max-len": "off",
190+
"max-lines": "off",
191+
"max-nested-callbacks": "off",
192+
"max-params": "off",
193+
"max-statements": "off",
194+
"max-statements-per-line": "off",
195+
"multiline-ternary": "off",
196+
"new-cap": "off",
197+
"new-parens": "off",
198+
"newline-after-var": "off",
199+
"newline-before-return": "off",
200+
"newline-per-chained-call": "off",
201+
"object-curly-newline": "off",
202+
"object-curly-spacing": ["off", "never"],
203+
"object-property-newline": "off",
204+
"object-shorthand": "off",
205+
"one-var": "off",
206+
"one-var-declaration-per-line": "off",
207+
"operator-assignment": "off",
208+
"operator-linebreak": "off",
209+
"padded-blocks": "off",
210+
"prefer-arrow-callback": "off",
211+
"prefer-const": "off",
212+
"prefer-numeric-literals": "off",
213+
"prefer-reflect": "off",
214+
"prefer-rest-params": "off",
215+
"prefer-spread": "off",
216+
"prefer-template": "off",
217+
"quote-props": "off",
218+
"quotes": "off",
219+
"radix": "off",
220+
"require-jsdoc": "off",
221+
"require-yield": "error",
222+
"rest-spread-spacing": "off",
223+
"semi": "error",
224+
"semi-spacing": "off",
225+
"sort-keys": "off",
226+
"sort-imports": "off",
227+
"sort-vars": "off",
228+
"space-before-blocks": "off",
229+
"space-before-function-paren": "off",
230+
"space-in-parens": "off",
231+
"space-infix-ops": "off",
232+
"space-unary-ops": "off",
233+
"spaced-comment": "off",
234+
"strict": "off",
235+
"symbol-description": "off",
236+
"template-curly-spacing": "off",
237+
"unicode-bom": "off",
238+
"use-isnan": "error",
239+
"valid-jsdoc": "off",
240+
"valid-typeof": "error",
241+
"vars-on-top": "off",
242+
"wrap-iife": "off",
243+
"wrap-regex": "off",
244+
"no-template-curly-in-string": "off",
245+
"yield-star-spacing": "off",
246+
"yoda": "off"
247+
}
248+
}

package.json

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
{
2-
"name": "gmail-js",
3-
"version": "0.5.3",
4-
"description": "JavaScript API for Gmail (useful for chrome extensions)",
5-
"main": "src/gmail.js",
6-
"types": "src/gmail.d.ts",
7-
"repository": {
8-
"type": "git",
9-
"url": "https://github.com/KartikTalwar/gmail.js.git"
10-
},
11-
"keywords": [
12-
"gmail",
13-
"gmail api",
14-
"gmail.js",
15-
"gmail extension",
16-
"gmail chrome extension"
17-
],
18-
"dependencies": {
19-
"jquery": "^1.10.2"
20-
},
21-
"devDependencies": {
22-
"typescript": "^2.0.7",
23-
"@types/jquery": "^1.10.27"
24-
},
25-
"author": "Kartik Talwar",
26-
"license": "MIT",
27-
"bugs": {
28-
"url": "https://github.com/KartikTalwar/gmail.js/issues"
29-
},
30-
"homepage": "https://github.com/KartikTalwar/gmail.js"
2+
"name": "gmail-js",
3+
"version": "0.5.3",
4+
"description": "JavaScript API for Gmail (useful for chrome extensions)",
5+
"main": "src/gmail.js",
6+
"types": "src/gmail.d.ts",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/KartikTalwar/gmail.js.git"
10+
},
11+
"scripts": {
12+
"test": "./node_modules/.bin/eslint src/*.js"
13+
},
14+
"keywords": [
15+
"gmail",
16+
"gmail api",
17+
"gmail.js",
18+
"gmail extension",
19+
"gmail chrome extension"
20+
],
21+
"dependencies": {
22+
"jquery": "^1.10.2"
23+
},
24+
"devDependencies": {
25+
"@types/jquery": "^1.10.27",
26+
"eslint": "^3.10.2",
27+
"typescript": "^2.0.7"
28+
},
29+
"author": "Kartik Talwar",
30+
"license": "MIT",
31+
"bugs": {
32+
"url": "https://github.com/KartikTalwar/gmail.js/issues"
33+
},
34+
"homepage": "https://github.com/KartikTalwar/gmail.js"
3135
}

0 commit comments

Comments
 (0)