Skip to content

Commit

Permalink
Use singleQuote
Browse files Browse the repository at this point in the history
  • Loading branch information
msand committed Jan 29, 2019
1 parent 1a4958b commit 6777211
Show file tree
Hide file tree
Showing 41 changed files with 317 additions and 317 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers
//"no-wrap-func": 1, // disallow wrapping of non-IIFE statements in parens
"no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation
"quotes": [1, "double", "avoid-escape"], // specify whether double or single quotes should be used
"quotes": [1, "single", "avoid-escape"], // specify whether double or single quotes should be used
"quote-props": 0, // require quotes around object literal property names (off by default)
"semi": 1, // require or disallow use of semicolons instead of ASI
"sort-vars": 0, // sort variables within the same declaration block (off by default)
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"trailingComma": "all",
"singleQuote": true,
"tabWidth": 2
}
12 changes: 6 additions & 6 deletions elements/Circle.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import Shape from './Shape';

export default class Circle extends Shape {
static displayName = "Circle";
static displayName = 'Circle';

static defaultProps = {
cx: 0,
Expand All @@ -27,4 +27,4 @@ export default class Circle extends Shape {
}
}

const RNSVGCircle = requireNativeComponent("RNSVGCircle");
const RNSVGCircle = requireNativeComponent('RNSVGCircle');
12 changes: 6 additions & 6 deletions elements/ClipPath.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractClipPath from "../lib/extract/extractClipPath";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractClipPath from '../lib/extract/extractClipPath';
import Shape from './Shape';

export default class ClipPath extends Shape {
static displayName = "ClipPath";
static displayName = 'ClipPath';

render() {
const { id, children } = this.props;
Expand All @@ -20,4 +20,4 @@ export default class ClipPath extends Shape {
}
}

const RNSVGClipPath = requireNativeComponent("RNSVGClipPath");
const RNSVGClipPath = requireNativeComponent('RNSVGClipPath');
8 changes: 4 additions & 4 deletions elements/Defs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Component } from "react";
import { requireNativeComponent } from "react-native";
import React, { Component } from 'react';
import { requireNativeComponent } from 'react-native';

export default class Defs extends Component {
static displayName = "Defs";
static displayName = 'Defs';

render() {
return <RNSVGDefs>{this.props.children}</RNSVGDefs>;
}
}

const RNSVGDefs = requireNativeComponent("RNSVGDefs");
const RNSVGDefs = requireNativeComponent('RNSVGDefs');
12 changes: 6 additions & 6 deletions elements/Ellipse.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import Shape from './Shape';

export default class Ellipse extends Shape {
static displayName = "Ellipse";
static displayName = 'Ellipse';

static defaultProps = {
cx: 0,
Expand All @@ -29,4 +29,4 @@ export default class Ellipse extends Shape {
}
}

const RNSVGEllipse = requireNativeComponent("RNSVGEllipse");
const RNSVGEllipse = requireNativeComponent('RNSVGEllipse');
16 changes: 8 additions & 8 deletions elements/G.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import { extractFont } from "../lib/extract/extractText";
import extractTransform from "../lib/extract/extractTransform";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import { extractFont } from '../lib/extract/extractText';
import extractTransform from '../lib/extract/extractTransform';
import Shape from './Shape';

export default class G extends Shape {
static displayName = "G";
static displayName = 'G';

setNativeProps = props => {
const matrix = !props.matrix && extractTransform(props);
Expand All @@ -31,4 +31,4 @@ export default class G extends Shape {
}
}

const RNSVGGroup = requireNativeComponent("RNSVGGroup");
const RNSVGGroup = requireNativeComponent('RNSVGGroup');
18 changes: 9 additions & 9 deletions elements/Image.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import React from "react";
import { Image, requireNativeComponent } from "react-native";
import { meetOrSliceTypes, alignEnum } from "../lib/extract/extractViewBox";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import Shape from "./Shape";
import React from 'react';
import { Image, requireNativeComponent } from 'react-native';
import { meetOrSliceTypes, alignEnum } from '../lib/extract/extractViewBox';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import Shape from './Shape';

const spacesRegExp = /\s+/;

export default class SvgImage extends Shape {
static displayName = "Image";
static displayName = 'Image';

static defaultProps = {
x: 0,
y: 0,
width: 0,
height: 0,
preserveAspectRatio: "xMidYMid meet",
preserveAspectRatio: 'xMidYMid meet',
};

render() {
Expand All @@ -38,11 +38,11 @@ export default class SvgImage extends Shape {
width={width}
height={height}
meetOrSlice={meetOrSliceTypes[modes[1]] || 0}
align={alignEnum[modes[0]] || "xMidYMid"}
align={alignEnum[modes[0]] || 'xMidYMid'}
src={Image.resolveAssetSource(href)}
/>
);
}
}

const RNSVGImage = requireNativeComponent("RNSVGImage");
const RNSVGImage = requireNativeComponent('RNSVGImage');
12 changes: 6 additions & 6 deletions elements/Line.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import Shape from './Shape';

export default class Line extends Shape {
static displayName = "Line";
static displayName = 'Line';

static defaultProps = {
x1: 0,
Expand All @@ -29,4 +29,4 @@ export default class Line extends Shape {
}
}

const RNSVGLine = requireNativeComponent("RNSVGLine");
const RNSVGLine = requireNativeComponent('RNSVGLine');
20 changes: 10 additions & 10 deletions elements/LinearGradient.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractGradient from "../lib/extract/extractGradient";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractGradient from '../lib/extract/extractGradient';
import Shape from './Shape';

export default class LinearGradient extends Shape {
static displayName = "LinearGradient";
static displayName = 'LinearGradient';

static defaultProps = {
x1: "0%",
y1: "0%",
x2: "100%",
y2: "0%",
x1: '0%',
y1: '0%',
x2: '100%',
y2: '0%',
};

render() {
Expand All @@ -29,4 +29,4 @@ export default class LinearGradient extends Shape {
}
}

const RNSVGLinearGradient = requireNativeComponent("RNSVGLinearGradient");
const RNSVGLinearGradient = requireNativeComponent('RNSVGLinearGradient');
24 changes: 12 additions & 12 deletions elements/Mask.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractTransform from "../lib/extract/extractTransform";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import units from "../lib/units";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractTransform from '../lib/extract/extractTransform';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import units from '../lib/units';
import Shape from './Shape';

export default class Mask extends Shape {
static displayName = "Mask";
static displayName = 'Mask';

static defaultProps = {
x: "0%",
y: "0%",
width: "100%",
height: "100%",
x: '0%',
y: '0%',
width: '100%',
height: '100%',
};

render() {
Expand Down Expand Up @@ -48,4 +48,4 @@ export default class Mask extends Shape {
}
}

const RNSVGMask = requireNativeComponent("RNSVGMask");
const RNSVGMask = requireNativeComponent('RNSVGMask');
12 changes: 6 additions & 6 deletions elements/Path.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractProps, { propsAndStyles } from "../lib/extract/extractProps";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractProps, { propsAndStyles } from '../lib/extract/extractProps';
import Shape from './Shape';

export default class Path extends Shape {
static displayName = "Path";
static displayName = 'Path';

render() {
const { props } = this;
Expand All @@ -18,4 +18,4 @@ export default class Path extends Shape {
}
}

const RNSVGPath = requireNativeComponent("RNSVGPath");
const RNSVGPath = requireNativeComponent('RNSVGPath');
24 changes: 12 additions & 12 deletions elements/Pattern.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractTransform from "../lib/extract/extractTransform";
import extractViewBox from "../lib/extract/extractViewBox";
import units from "../lib/units";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractTransform from '../lib/extract/extractTransform';
import extractViewBox from '../lib/extract/extractViewBox';
import units from '../lib/units';
import Shape from './Shape';

export default class Pattern extends Shape {
static displayName = "Pattern";
static displayName = 'Pattern';

static defaultProps = {
x: "0%",
y: "0%",
width: "100%",
height: "100%",
x: '0%',
y: '0%',
width: '100%',
height: '100%',
};

render() {
Expand Down Expand Up @@ -54,4 +54,4 @@ export default class Pattern extends Shape {
}
}

const RNSVGPattern = requireNativeComponent("RNSVGPattern");
const RNSVGPattern = requireNativeComponent('RNSVGPattern');
12 changes: 6 additions & 6 deletions elements/Polygon.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import Path from "./Path";
import Shape from "./Shape";
import extractPolyPoints from "../lib/extract/extractPolyPoints";
import React from 'react';
import Path from './Path';
import Shape from './Shape';
import extractPolyPoints from '../lib/extract/extractPolyPoints';

export default class Polygon extends Shape {
static displayName = "Polygon";
static displayName = 'Polygon';

static defaultProps = {
points: "",
points: '',
};

setNativeProps = props => {
Expand Down
12 changes: 6 additions & 6 deletions elements/Polyline.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import Path from "./Path";
import Shape from "./Shape";
import extractPolyPoints from "../lib/extract/extractPolyPoints";
import React from 'react';
import Path from './Path';
import Shape from './Shape';
import extractPolyPoints from '../lib/extract/extractPolyPoints';

export default class Polyline extends Shape {
static displayName = "Polyline";
static displayName = 'Polyline';

static defaultProps = {
points: "",
points: '',
};

setNativeProps = props => {
Expand Down
22 changes: 11 additions & 11 deletions elements/RadialGradient.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from "react";
import { requireNativeComponent } from "react-native";
import extractGradient from "../lib/extract/extractGradient";
import Shape from "./Shape";
import React from 'react';
import { requireNativeComponent } from 'react-native';
import extractGradient from '../lib/extract/extractGradient';
import Shape from './Shape';

export default class RadialGradient extends Shape {
static displayName = "RadialGradient";
static displayName = 'RadialGradient';

static defaultProps = {
fx: "50%",
fy: "50%",
cx: "50%",
cy: "50%",
r: "50%",
fx: '50%',
fy: '50%',
cx: '50%',
cy: '50%',
r: '50%',
};

render() {
Expand All @@ -32,4 +32,4 @@ export default class RadialGradient extends Shape {
}
}

const RNSVGRadialGradient = requireNativeComponent("RNSVGRadialGradient");
const RNSVGRadialGradient = requireNativeComponent('RNSVGRadialGradient');
Loading

0 comments on commit 6777211

Please sign in to comment.