diff --git a/package.json b/package.json index 2bfc443..ce0693e 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "start": "node node_modules/react-native/local-cli/cli.js start", "rename": "sh ./scripts/rename.sh", "podspec": "sh ./scripts/podspec.sh", + "prettier": "prettier --write 'src/**/*.{json,md,js,jsx,ts,tsx}'", "test": "jest", "test:e2e": "yarn build:e2e:ios && yarn test:e2e:ios", "test:e2e:ios": "detox test --configuration ios.sim.release", @@ -76,7 +77,7 @@ "@types/react-native-navigation": "2.0.0", "@types/react-test-renderer": "16.8.1", "@ueno/stylelint-config": "1.1.2", - "@ueno/tslint-config": "1.0.6", + "@ueno/tslint-config": "1.0.8", "babel-jest": "24.3.0", "detox": "10.0.12", "enzyme": "3.9.0", @@ -97,6 +98,7 @@ "stylelint": "9.10.1", "ts-jest": "24.0.0", "tslint": "5.13.1", + "tslint-config-prettier": "1.18.0", "typescript": "3.3.3333" }, "jest": { diff --git a/src/components/button/Button.tsx b/src/components/button/Button.tsx index 2f7aa28..4320494 100644 --- a/src/components/button/Button.tsx +++ b/src/components/button/Button.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { - View, - Text, - TouchableOpacity, - TouchableNativeFeedback, + AccessibilityTrait, GestureResponderEvent, Platform, - AccessibilityTrait, + Text, + TouchableNativeFeedback, + TouchableOpacity, + View, ViewStyle, } from 'react-native'; import s from './Button.scss'; diff --git a/src/screens/home/Home.tsx b/src/screens/home/Home.tsx index 605163c..568cd35 100644 --- a/src/screens/home/Home.tsx +++ b/src/screens/home/Home.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Image, Text, View } from 'react-native'; import { Navigation } from 'react-native-navigation'; +import Logo from '../../assets/images/logo.png'; import { Button } from '../../components/button/Button'; import { COUNTER } from '../index'; -import Logo from '../../assets/images/logo.png'; import s from './Home.scss'; export const HomeScreen = ({ componentId }: any) => { const onCounterScreenPress = () => { diff --git a/src/utils/setup.ts b/src/utils/setup.ts index 053722e..29684ba 100644 --- a/src/utils/setup.ts +++ b/src/utils/setup.ts @@ -1,5 +1,5 @@ -import { Sentry } from 'react-native-sentry'; import CodePush from 'react-native-code-push'; +import { Sentry } from 'react-native-sentry'; import { config } from './config'; if (!__DEV__ && config.SENTRY_DSN) { diff --git a/tslint.json b/tslint.json index 0f94661..696fe62 100644 --- a/tslint.json +++ b/tslint.json @@ -1,7 +1,6 @@ { - "extends": "@ueno/tslint-config/react-native", + "extends": ["@ueno/tslint-config/react-native", "tslint-config-prettier"], "rules": { - "origin-ordered-imports": false, "interface-name": false } } diff --git a/yarn.lock b/yarn.lock index f89f3ea..b145e1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1323,10 +1323,10 @@ stylelint-config-primer "3.0.1" stylelint-order "2.0.0" -"@ueno/tslint-config@1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@ueno/tslint-config/-/tslint-config-1.0.6.tgz#be61901f557c3ce01dc673926fe4f07aa3d3065e" - integrity sha512-1Wvt+2g9Rg2j8A9Df4f8LFPnlCqX/8rVDn3V1YhFNRzDHPbOPAIaurNnf5qAs00nkQGkvMQy9lY0LE4oCPLVeg== +"@ueno/tslint-config@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@ueno/tslint-config/-/tslint-config-1.0.8.tgz#d4a3f707eaa27572f4e70f771660bd54a67248c9" + integrity sha512-PFymuzIcqUyNUgejc9arxfvoER7S5yiWSzZmBdQwkByVdUiBjAtrmrKZ3ZV+lfWz9WH5AQFi4P2RtlEeawu69g== dependencies: tslint "^5.12.1" tslint-config-airbnb "^5.11.1" @@ -10723,6 +10723,11 @@ tslint-config-airbnb@^5.11.1: tslint-eslint-rules "^5.4.0" tslint-microsoft-contrib "~5.2.1" +tslint-config-prettier@1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" + integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== + tslint-consistent-codestyle@^1.14.1: version "1.15.0" resolved "https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.15.0.tgz#a3acf8d0a3ca0dc7d1285705102ba1fe4a17c4cb"