Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
chore: configure eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Sznajder committed Aug 2, 2019
1 parent 9781b94 commit 9d0ec40
Show file tree
Hide file tree
Showing 7 changed files with 4,078 additions and 69 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
@@ -0,0 +1,3 @@
node_modules/
coverage/
lib/
22 changes: 22 additions & 0 deletions .eslintrc
@@ -0,0 +1,22 @@
{
"extends": "eslint-config-satya164",

"plugins": ["react-native-globals"],

"settings": {
"react": {
"version": "detect"
}
},

"env": {
"es6": true,
"react-native-globals/all": true
},

"rules": {
"import/no-unresolved": "off",
"react/sort-comp": "off",
"jest/no-disabled-tests": "off"
}
}
4 changes: 3 additions & 1 deletion commitlint.config.js
@@ -1,3 +1,5 @@
/* eslint-disable import/no-commonjs */

module.exports = {
extends: ["@commitlint/config-conventional"]
extends: ['@commitlint/config-conventional'],
};
6 changes: 5 additions & 1 deletion index.d.ts
@@ -1,5 +1,9 @@
import * as React from 'react';
import { NavigationRouteConfigMap, SwitchNavigatorConfig, NavigationContainer } from 'react-navigation';
import {
NavigationRouteConfigMap,
SwitchNavigatorConfig,
NavigationContainer,
} from 'react-navigation';
import { Transition } from 'react-native-reanimated';

export interface AnimatedSwitchNavigatorConfig extends SwitchNavigatorConfig {
Expand Down
29 changes: 23 additions & 6 deletions package.json
Expand Up @@ -8,25 +8,42 @@
"types": "lib/typescript/src/index.d.ts",
"author": "",
"license": "MIT",
"files": [
"src",
"lib"
],
"scripts": {
"prepare": "bob build",
"lint": "eslint --ext .js,.ts,.tsx .",
"typescript": "tsc --noEmit"
},
"devDependencies": {
"@commitlint/config-conventional": "8.1.0",
"@react-native-community/bob": "0.6.1",
"commitlint": "8.1.0",
"eslint": "6.1.0",
"eslint-config-satya164": "2.4.1",
"eslint-plugin-react-native-globals": "0.1.2",
"husky": "3.0.2",
"prettier": "1.18.2",
"react": "16.8.6",
"react-native": "0.60.4",
"typescript": "3.5.3"
},
"scripts": {
"prepare": "bob build"
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"prettier": {
"trailingComma": "es5",
"singleQuote": true
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn typescript",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"files": [
"src",
"lib"
],
"@react-native-community/bob": {
"source": "src",
"output": "lib",
Expand Down
9 changes: 8 additions & 1 deletion src/index.js
@@ -1,4 +1,5 @@
import * as React from 'react';
import { StyleSheet } from 'react-native';
import { createNavigator, SceneView, SwitchRouter } from 'react-navigation';
import { Transitioning, Transition } from 'react-native-reanimated';

Expand Down Expand Up @@ -36,7 +37,7 @@ class SwitchView extends React.Component {
<Transitioning.View
ref={this.containerRef}
transition={transition}
style={{ flex: 1 }}
style={styles.container}
>
<SceneView
component={ChildComponent}
Expand All @@ -56,3 +57,9 @@ export default function createAnimatedSwitchNavigator(
const Navigator = createNavigator(SwitchView, router, switchConfig);
return Navigator;
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
});

0 comments on commit 9d0ec40

Please sign in to comment.