Skip to content

Commit 08be08c

Browse files
Add kiwicom-eslint-package, add circleci config
1 parent 3f69f47 commit 08be08c

File tree

6 files changed

+522
-377
lines changed

6 files changed

+522
-377
lines changed

.circleci/config.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
defaults: &defaults
6+
working_directory: ~/react-native-reverse-geocode
7+
docker:
8+
- image: circleci/node:11
9+
10+
version: 2
11+
jobs:
12+
install-dependencies:
13+
<<: *defaults
14+
steps:
15+
- checkout
16+
- attach_workspace:
17+
at: ~/react-native-reverse-geocode
18+
- restore_cache:
19+
keys:
20+
- v1-dependencies-{{ checksum "yarn.lock" }}
21+
- v1-dependencies-
22+
- run:
23+
name: Install Dependencies
24+
command: yarn install --frozen-lockfile
25+
- save_cache:
26+
paths:
27+
- node_modules
28+
key: v1-dependencies-{{ checksum "yarn.lock" }}
29+
- persist_to_workspace:
30+
root: .
31+
paths: .
32+
flow:
33+
<<: *defaults
34+
steps:
35+
- attach_workspace:
36+
at: ~/react-native-reverse-geocode
37+
- run: yarn flow
38+
lint:
39+
<<: *defaults
40+
steps:
41+
- attach_workspace:
42+
at: ~/react-native-reverse-geocode
43+
- run: yarn lint
44+
45+
46+
47+
workflows:
48+
version: 2
49+
test-and-release:
50+
jobs:
51+
- install-dependencies
52+
- lint:
53+
requires:
54+
- install-dependencies
55+
- flow:
56+
requires:
57+
- install-dependencies

.eslintrc

-7
This file was deleted.

.eslintrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'babel-eslint',
4+
env: {
5+
node: true,
6+
},
7+
extends: ['@kiwicom/eslint-config'],
8+
};

index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ const searchForLocations = (
4040
searchText: string,
4141
region: Region,
4242
callback: Callback,
43-
debounceMs: number = 200
43+
debounceMs: number = 200,
4444
) => {
4545
debounce(
4646
RNReverseGeocode.searchForLocations(searchText, region, callback),
47-
debounceMs
47+
debounceMs,
4848
);
4949
};
5050

51-
export default { searchForLocations };
51+
const SearchForLocations = { searchForLocations };
52+
53+
export default SearchForLocations;

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"lint": "eslint .",
8+
"lint": "eslint . --report-unused-disable-directives",
99
"flow": "flow"
1010
},
1111
"keywords": [
@@ -22,8 +22,9 @@
2222
"url": "https://github.com/kiwicom/react-native-reverse-geocode"
2323
},
2424
"devDependencies": {
25-
"@callstack/eslint-config": "^2.0.0",
26-
"eslint": "^5.6.1",
25+
"@kiwicom/eslint-config": "^2.11.0",
26+
"babel-eslint": "^10.0.1",
27+
"eslint": "^5.13.0",
2728
"flow-bin": "0.78.0",
2829
"react": "^16.5.2",
2930
"react-native": "^0.57.2"

0 commit comments

Comments
 (0)