Skip to content

Commit 77b5796

Browse files
authored
Setup eslint and prettier (#5)
Setup eslint and prettier
2 parents ce53458 + 26edd12 commit 77b5796

File tree

7 files changed

+6813
-13
lines changed

7 files changed

+6813
-13
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends:["@react-native-community"]
3+
}

babel.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module.exports = {
2-
presets: ["module:metro-react-native-babel-preset"],
2+
presets: ['module:metro-react-native-babel-preset'],
33
plugins: [
44
[
5-
"module-resolver",
5+
'module-resolver',
66
{
77
alias: {
8-
"@react-native-community/progressview": "./js"
8+
'@react-native-community/progressview': './js',
99
},
10-
cwd: "babelrc"
11-
}
12-
]
13-
]
10+
cwd: 'babelrc',
11+
},
12+
],
13+
],
1414
};

example/metro.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ module.exports = {
1010
getTransformOptions: async () => ({
1111
transform: {
1212
experimentalImportSupport: false,
13-
inlineRequires: false
14-
}
15-
})
16-
}
13+
inlineRequires: false,
14+
},
15+
}),
16+
},
1717
};

js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/* @flow */
22

3-
export {default} from './ProgressViewIOS.ios';
3+
export {default} from './ProgressViewIOS.ios';

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"scripts": {
1010
"run:ios": "node node_modules/react-native/local-cli/cli.js run-ios --project-path \"./example/ios\"",
1111
"start": "node node_modules/react-native/local-cli/cli.js start --projectRoot example --watchFolders $PWD",
12-
"flow": "flow"
12+
"flow": "flow",
13+
"lint": "eslint ."
1314
},
1415
"peerDependencies": {
1516
"react": "^16.8.3",
@@ -19,11 +20,16 @@
1920
"devDependencies": {
2021
"@babel/core": "^7.4.3",
2122
"@babel/runtime": "^7.4.3",
23+
"@react-native-community/eslint-config": "^0.0.6",
24+
"@react-native-community/eslint-plugin": "^1.0.0",
2225
"babel-jest": "24.7.1",
2326
"babel-plugin-module-resolver": "^3.2.0",
27+
"eslint": "^6.8.0",
28+
"eslint-plugin-prettier": "^3.1.2",
2429
"flow-bin": "^0.86.0",
2530
"jest": "24.7.1",
2631
"metro-react-native-babel-preset": "0.53.1",
32+
"prettier": "^1.19.1",
2733
"react": "16.8.3",
2834
"react-native": "0.59.5",
2935
"react-test-renderer": "16.8.3"

0 commit comments

Comments
 (0)