Skip to content

Commit 6b9e386

Browse files
committed
Linting
1 parent 08b6d48 commit 6b9e386

File tree

6 files changed

+500
-376
lines changed

6 files changed

+500
-376
lines changed

.eslintrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: "@react-native-community" };

example/ProgressBarAndroidExample.android.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class ProgressBarAndroidExample extends React.Component<{}> {
4949
<RNTesterPage title="ProgressBar Examples">
5050
<RNTesterBlock title="Horizontal Indeterminate ProgressBar">
5151
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
52-
* found when making Flow check .android.js files. */}
52+
* found when making Flow check .android.js files. */}
5353
<ProgressBar styleAttr="Horizontal" />
5454
</RNTesterBlock>
5555

@@ -59,7 +59,7 @@ export default class ProgressBarAndroidExample extends React.Component<{}> {
5959

6060
<RNTesterBlock title="Horizontal Black Indeterminate ProgressBar">
6161
{/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
62-
* found when making Flow check .android.js files. */}
62+
* found when making Flow check .android.js files. */}
6363
<ProgressBar styleAttr="Horizontal" color="black" />
6464
</RNTesterBlock>
6565

example/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import React from 'react';
22
import {AppRegistry} from 'react-native';
33

44
import {name as appName} from './app.json';
5-
import ProgressBarAndroidExample from "./ProgressBarAndroidExample.android";
5+
import ProgressBarAndroidExample from './ProgressBarAndroidExample.android';
66

77
class ExampleApp extends React.Component<{}> {
88
render() {
99
return (
1010
<ProgressBarAndroidExample />
11-
)
11+
);
1212
}
1313
}
14-
AppRegistry.registerComponent(appName, () => ExampleApp);
14+
AppRegistry.registerComponent(appName, () => ExampleApp);

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"start": "node node_modules/react-native/local-cli/cli.js start",
88
"start:android": "adb shell am start -n com.androidprogressbar/.MainActivity",
99
"build:android": "cd example/android && ./gradlew installDebug && cd ../.. && npm run start:android",
10-
"test": "jest"
10+
"test": "jest",
11+
"validate:eslint": "eslint 'js/**/*.js' && eslint 'example/**/*.js'"
1112
},
1213
"keywords": [
1314
"react-native",
@@ -28,9 +29,13 @@
2829
"devDependencies": {
2930
"@babel/core": "^7.4.3",
3031
"@babel/runtime": "^7.4.3",
32+
"@react-native-community/eslint-config": "0.0.5",
3133
"babel-jest": "^24.7.1",
34+
"eslint": "^5.16.0",
35+
"eslint-plugin-prettier": "^3.0.1",
3236
"jest": "^24.7.1",
3337
"metro-react-native-babel-preset": "^0.53.1",
38+
"prettier": "^1.17.0",
3439
"react-test-renderer": "16.8.3"
3540
},
3641
"jest": {

0 commit comments

Comments
 (0)