mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-23 12:07:26 +08:00
Update prettier
This commit is contained in:
@@ -48,13 +48,13 @@
|
||||
"enzyme": "^2.8.2",
|
||||
"enzyme-to-json": "^1.5.1",
|
||||
"eslint": "^3.19.0",
|
||||
"eslint-config-prettier": "^1.6.0",
|
||||
"eslint-config-prettier": "^1.7.0",
|
||||
"eslint-plugin-promise": "^3.5.0",
|
||||
"eslint-plugin-react": "^6.10.3",
|
||||
"file-loader": "^0.11.1",
|
||||
"jest": "^19.0.2",
|
||||
"node-libs-browser": "^0.5.3",
|
||||
"prettier": "^1.1.0",
|
||||
"prettier": "^1.2.2",
|
||||
"react": "~15.4.1",
|
||||
"react-addons-test-utils": "~15.4.1",
|
||||
"react-dom": "~15.4.1",
|
||||
|
||||
@@ -299,7 +299,8 @@ var PanResponder = {
|
||||
PanResponder._initializeGestureState(gestureState);
|
||||
}
|
||||
} else if (
|
||||
e.nativeEvent.originalEvent && e.nativeEvent.originalEvent.type === 'mousedown'
|
||||
e.nativeEvent.originalEvent &&
|
||||
e.nativeEvent.originalEvent.type === 'mousedown'
|
||||
) {
|
||||
PanResponder._initializeGestureState(gestureState);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,8 @@ class ListView extends Component {
|
||||
totalIndex++;
|
||||
|
||||
if (
|
||||
renderSeparator && (rowIdx !== rowIDs.length - 1 || sectionIdx === allRowIDs.length - 1)
|
||||
renderSeparator &&
|
||||
(rowIdx !== rowIDs.length - 1 || sectionIdx === allRowIDs.length - 1)
|
||||
) {
|
||||
const adjacentRowHighlighted =
|
||||
this.state.highlightedRow.sectionID === sectionID &&
|
||||
|
||||
@@ -75,7 +75,10 @@ const applyLayout = Component => {
|
||||
if (!this._isMounted) return;
|
||||
|
||||
if (
|
||||
layout.x !== x || layout.y !== y || layout.width !== width || layout.height !== height
|
||||
layout.x !== x ||
|
||||
layout.y !== y ||
|
||||
layout.width !== width ||
|
||||
layout.height !== height
|
||||
) {
|
||||
this._layoutState = { x, y, width, height };
|
||||
const nativeEvent = { layout: this._layoutState };
|
||||
|
||||
4
src/vendor/setValueForStyles/index.js
vendored
4
src/vendor/setValueForStyles/index.js
vendored
@@ -158,7 +158,9 @@ function dangerousStyleValue(name, value, component) {
|
||||
|
||||
var isNonNumeric = isNaN(value);
|
||||
if (
|
||||
isNonNumeric || value === 0 || (unitlessNumbers.hasOwnProperty(name) && unitlessNumbers[name])
|
||||
isNonNumeric ||
|
||||
value === 0 ||
|
||||
(unitlessNumbers.hasOwnProperty(name) && unitlessNumbers[name])
|
||||
) {
|
||||
return '' + value; // cast to string
|
||||
}
|
||||
|
||||
12
yarn.lock
12
yarn.lock
@@ -2324,9 +2324,9 @@ escope@^3.6.0:
|
||||
esrecurse "^4.1.0"
|
||||
estraverse "^4.1.1"
|
||||
|
||||
eslint-config-prettier@^1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-1.6.0.tgz#56e53a8eb461c06eced20cec40d765c185100fd5"
|
||||
eslint-config-prettier@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-1.7.0.tgz#cda3ce22df1e852daa9370f1f3446e8b8a02ce44"
|
||||
dependencies:
|
||||
get-stdin "^5.0.1"
|
||||
|
||||
@@ -5006,9 +5006,9 @@ preserve@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
|
||||
prettier@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.1.0.tgz#9d6ad005703efefa66b6999b8916bfc6afeaf9f8"
|
||||
prettier@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.2.2.tgz#22d17c1132faaaea1f1d4faea31f19f7a1959f3e"
|
||||
dependencies:
|
||||
ast-types "0.9.8"
|
||||
babel-code-frame "6.22.0"
|
||||
|
||||
Reference in New Issue
Block a user