Skip to content

Commit a9c06a8

Browse files
author
alvaromb
committed
Added lint to Travis CI
1 parent 8a6f200 commit a9c06a8

File tree

3 files changed

+210
-1
lines changed

3 files changed

+210
-1
lines changed

.eslintrc

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
{
2+
"parser": "babel-eslint",
3+
4+
"ecmaFeatures": {
5+
"jsx": true,
6+
"modules": true,
7+
"experimentalObjectRestSpread": true
8+
},
9+
10+
"env": {
11+
"es6": true,
12+
"jasmine": true,
13+
"node": 1,
14+
},
15+
16+
"plugins": [
17+
"react"
18+
],
19+
20+
"globals": {
21+
"__DEV__": true,
22+
"__dirname": false,
23+
"__fbBatchedBridgeConfig": false,
24+
"cancelAnimationFrame": false,
25+
"clearImmediate": true,
26+
"clearInterval": false,
27+
"clearTimeout": false,
28+
"console": false,
29+
"document": false,
30+
"escape": false,
31+
"exports": false,
32+
"fetch": false,
33+
"global": false,
34+
"jest": false,
35+
"Map": true,
36+
"module": false,
37+
"navigator": false,
38+
"process": false,
39+
"Promise": true,
40+
"requestAnimationFrame": true,
41+
"require": false,
42+
"Set": true,
43+
"setImmediate": true,
44+
"setInterval": false,
45+
"setTimeout": false,
46+
"window": false,
47+
"XMLHttpRequest": false,
48+
"pit": false,
49+
"FormData": true,
50+
},
51+
52+
"rules": {
53+
"comma-dangle": 0,
54+
"no-cond-assign": 1,
55+
"no-console": 0,
56+
"no-constant-condition": 0,
57+
"no-control-regex": 1,
58+
"no-debugger": 1,
59+
"no-dupe-keys": 1,
60+
"no-empty": 0,
61+
"no-empty-character-class": 1,
62+
"no-ex-assign": 1,
63+
"no-extra-boolean-cast": 1,
64+
"no-extra-parens": 0,
65+
"no-extra-semi": 1,
66+
"no-func-assign": 1,
67+
"no-inner-declarations": 0,
68+
"no-invalid-regexp": 1,
69+
"no-negated-in-lhs": 1,
70+
"no-obj-calls": 1,
71+
"no-regex-spaces": 1,
72+
"no-reserved-keys": 0,
73+
"no-sparse-arrays": 1,
74+
"no-unreachable": 1,
75+
"use-isnan": 1,
76+
"valid-jsdoc": 0,
77+
"valid-typeof": 1,
78+
79+
"block-scoped-var": 0,
80+
"complexity": 0,
81+
"consistent-return": 0,
82+
"curly": 1,
83+
"default-case": 0,
84+
"dot-notation": 1,
85+
"eqeqeq": 1,
86+
"guard-for-in": 0,
87+
"no-alert": 1,
88+
"no-caller": 1,
89+
"no-div-regex": 1,
90+
"no-else-return": 0,
91+
"no-labels": 1,
92+
"no-eq-null": 0,
93+
"no-eval": 1,
94+
"no-extend-native": 1,
95+
"no-extra-bind": 1,
96+
"no-fallthrough": 1,
97+
"no-floating-decimal": 1,
98+
"no-implied-eval": 1,
99+
"no-iterator": 1,
100+
"no-lone-blocks": 1,
101+
"no-loop-func": 0,
102+
"no-multi-str": 0,
103+
"no-native-reassign": 0,
104+
"no-new": 1,
105+
"no-new-func": 1,
106+
"no-new-wrappers": 1,
107+
"no-octal": 1,
108+
"no-octal-escape": 1,
109+
"no-proto": 1,
110+
"no-redeclare": 0,
111+
"no-return-assign": 1,
112+
"no-script-url": 1,
113+
"no-self-compare": 1,
114+
"no-sequences": 1,
115+
"no-unused-expressions": 0,
116+
"no-void": 1,
117+
"no-warning-comments": 0,
118+
"no-with": 1,
119+
"radix": 1,
120+
"vars-on-top": 0,
121+
"wrap-iife": 0,
122+
"yoda": 1,
123+
124+
"strict": 0,
125+
126+
"no-catch-shadow": 1,
127+
"no-delete-var": 1,
128+
"no-label-var": 1,
129+
"no-shadow": 1,
130+
"no-shadow-restricted-names": 1,
131+
"no-undef": 2,
132+
"no-undefined": 0,
133+
"no-undef-init": 1,
134+
"no-unused-vars": [1, {"vars": "all", "args": "none"}],
135+
"no-use-before-define": 0,
136+
"handle-callback-err": 1,
137+
"no-mixed-requires": 1,
138+
"no-new-require": 1,
139+
"no-path-concat": 1,
140+
"no-process-exit": 0,
141+
"no-restricted-modules": 1,
142+
"no-sync": 0,
143+
144+
"key-spacing": 0,
145+
"comma-spacing": 0,
146+
"no-multi-spaces": 0,
147+
"brace-style": 0,
148+
"camelcase": 0,
149+
"consistent-this": [1, "self"],
150+
"eol-last": 1,
151+
"func-names": 0,
152+
"func-style": 0,
153+
"new-cap": 0,
154+
"new-parens": 1,
155+
"no-nested-ternary": 0,
156+
"no-array-constructor": 1,
157+
"no-lonely-if": 0,
158+
"no-new-object": 1,
159+
"no-spaced-func": 1,
160+
"semi-spacing": 1,
161+
"no-ternary": 0,
162+
"no-trailing-spaces": 1,
163+
"no-underscore-dangle": 0,
164+
"no-mixed-spaces-and-tabs": 1,
165+
"quotes": [1, "single", "avoid-escape"],
166+
"quote-props": 0,
167+
"semi": 0,
168+
"sort-vars": 0,
169+
"keyword-spacing": 1,
170+
"space-in-brackets": 0,
171+
"space-in-parens": 0,
172+
"space-infix-ops": 1,
173+
"space-unary-ops": [1, { "words": true, "nonwords": false }],
174+
"max-nested-callbacks": 0,
175+
"one-var": 0,
176+
"wrap-regex": 0,
177+
178+
"max-depth": 0,
179+
"max-len": 0,
180+
"max-params": 0,
181+
"max-statements": 0,
182+
"no-bitwise": 1,
183+
"no-plusplus": 0,
184+
185+
"react/display-name": 0,
186+
"react/jsx-boolean-value": 0,
187+
"react/jsx-quotes": [1, "single", "avoid-escape"],
188+
"react/jsx-no-undef": 1,
189+
"react/jsx-sort-props": 0,
190+
"react/jsx-uses-react": 0,
191+
"react/jsx-uses-vars": 1,
192+
"react/no-did-mount-set-state": 1,
193+
"react/no-did-update-set-state": 1,
194+
"react/no-multi-comp": 0,
195+
"react/no-unknown-property": 0,
196+
"react/prop-types": 0,
197+
"react/react-in-jsx-scope": 0,
198+
"react/self-closing-comp": 1,
199+
"react/wrap-multilines": 0
200+
}
201+
}

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- 6.2.0

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "A React Native ScrollView component that resizes when the keyboard appears.",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"lint": "eslint lib",
8+
"test": "npm run lint"
89
},
910
"repository": {
1011
"type": "git",
@@ -34,5 +35,9 @@
3435
"homepage": "https://github.com/APSL/react-native-keyboard-aware-scroll-view#readme",
3536
"dependencies": {
3637
"react-timer-mixin": "^0.13.3"
38+
},
39+
"devDependencies": {
40+
"babel-eslint": "^6.0.4",
41+
"eslint": "^2.12.0"
3742
}
3843
}

0 commit comments

Comments
 (0)