Skip to content

Commit

Permalink
updated prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdf committed May 29, 2017
1 parent 9ee1d33 commit 86fdcd1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 37 deletions.
6 changes: 1 addition & 5 deletions HTMLView.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React, {Component, PropTypes} from 'react';
import htmlToElement from './htmlToElement';
import {
Linking,
StyleSheet,
View,
} from 'react-native';
import {Linking, StyleSheet, View} from 'react-native';

const boldStyle = {fontWeight: '500'};
const italicStyle = {fontStyle: 'italic'};
Expand Down
6 changes: 4 additions & 2 deletions __tests__/HTMLView-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ describe('<HTMLView/>', () => {
});

it('should render an <Image />, with default width/height of 1', () => {
const imgSrc = 'https://facebook.github.io/react-native/img/header_logo.png';
const imgSrc =
'https://facebook.github.io/react-native/img/header_logo.png';
const htmlContent = `<img src="${imgSrc}"/>`;

expect(
Expand All @@ -49,7 +50,8 @@ describe('<HTMLView/>', () => {
});

it('should render an <Image /> with set width/height', () => {
const imgSrc = 'https://facebook.github.io/react-native/img/header_logo.png';
const imgSrc =
'https://facebook.github.io/react-native/img/header_logo.png';
const htmlContent = `<img src="${imgSrc}" width="66" height="58"/>`;

expect(
Expand Down
7 changes: 6 additions & 1 deletion format.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash

if [[ -z $1 ]]; then
echo "Error: expected args"
exit 1
fi
node_modules/.bin/prettier \
$@ \
"$@" \
--bracket-spacing=false \
--trailing-comma=es5 \
--single-quote=true \
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"eslint": "2.7.0",
"eslint-plugin-react": "4.3.0",
"jest": "^19.0.2",
"prettier": "^0.22.0",
"prettier": "^1.3.1",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
Expand Down
44 changes: 16 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,9 @@ assert-plus@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"

[email protected]:
version "0.8.18"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.18.tgz#c8b98574898e8914e9d8de74b947564a9fe929af"

[email protected]:
version "0.9.4"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.4.tgz#410d1f81890aeb8e0a38621558ba5869ae53c91b"
[email protected]:
version "0.9.8"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.8.tgz#6cb6a40beba31f49f20928e28439fc14a3dab078"

async@^1.4.0, async@^1.4.2:
version "1.5.2"
Expand Down Expand Up @@ -896,9 +892,9 @@ babel-types@^6.0.19, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.21
lodash "^4.2.0"
to-fast-properties "^1.0.1"

babylon@6.15.0:
version "6.15.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e"
babylon@7.0.0-beta.8:
version "7.0.0-beta.8"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.8.tgz#2bdc5ae366041442c27e068cce6f0d7c06ea9949"

babylon@^6.0.18, babylon@^6.11.0, babylon@^6.13.0, babylon@^6.14.1, babylon@^6.15.0:
version "6.16.1"
Expand Down Expand Up @@ -1131,10 +1127,6 @@ color-name@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d"

colors@>=0.6.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"

combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
Expand Down Expand Up @@ -1834,13 +1826,9 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"

[email protected]:
version "0.40.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.40.0.tgz#b3444742189093323c4319c4fe9d35391f46bcbc"
dependencies:
ast-types "0.8.18"
colors ">=0.6.2"
minimist ">=0.2.0"
[email protected]:
version "0.45.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.45.0.tgz#aa29d4ae27f06aa02817772bba0fcbefef7e62f0"

for-in@^1.0.1:
version "1.0.2"
Expand Down Expand Up @@ -3055,7 +3043,7 @@ [email protected], minimist@~0.0.1:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"

[email protected], minimist@>=0.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0:
[email protected], minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"

Expand Down Expand Up @@ -3369,16 +3357,16 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^0.22.0:
version "0.22.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-0.22.0.tgz#7b37c4480d0858180407e5a8e13f0f47da7385d2"
prettier@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.3.1.tgz#fa0ea84b45ac0ba6de6a1e4cecdcff900d563151"
dependencies:
ast-types "0.9.4"
ast-types "0.9.8"
babel-code-frame "6.22.0"
babylon "6.15.0"
babylon "7.0.0-beta.8"
chalk "1.1.3"
esutils "2.0.2"
flow-parser "0.40.0"
flow-parser "0.45.0"
get-stdin "5.0.1"
glob "7.1.1"
jest-validate "19.0.0"
Expand Down

0 comments on commit 86fdcd1

Please sign in to comment.