Skip to content

Commit 747a767

Browse files
committed
chore: upgrade devDependencies
1 parent d20ac2d commit 747a767

File tree

7 files changed

+33
-34
lines changed

7 files changed

+33
-34
lines changed

babel.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ module.exports = {
44
'@babel/preset-env',
55
{
66
targets: {
7-
node: 'current'
8-
}
9-
}
10-
]
11-
]
7+
node: 'current',
8+
},
9+
},
10+
],
11+
],
1212
}

generate.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,31 @@ function resolvePath(file) {
3131

3232
const FILES = (exports.FILES = {
3333
GLYPH_MAP: 'glyph/map.json',
34-
FONT_FILE: 'fonts/Ionicons.ttf'
34+
FONT_FILE: 'fonts/Ionicons.ttf',
3535
})
3636

3737
function generate() {
3838
const workflows = [
3939
{
4040
file: FILES.GLYPH_MAP,
4141
from: 'scss/ionicons-icons.scss',
42-
steps: [String, parseGlyphs, stringify]
42+
steps: [String, parseGlyphs, stringify],
4343
},
4444
{
4545
file: FILES.FONT_FILE,
4646
from: 'fonts/ionicons.ttf',
47-
steps: []
48-
}
47+
steps: [],
48+
},
4949
].map(({ file, from, steps }) =>
5050
[resolvePath, fs.readFileSync, ...steps]
5151
.reduce((prev, next) => prev.then(next), Promise.resolve(from))
52-
.then(it => fs.writeFileSync(path.resolve(__dirname, file), it))
52+
.then((it) => fs.writeFileSync(path.resolve(__dirname, file), it))
5353
.then(() => console.log(` Generated ${file} ...`))
5454
)
5555

5656
Promise.all(workflows)
5757
.then(() => console.log('All is done'))
58-
.catch(e => console.log(e.message))
58+
.catch((e) => console.log(e.message))
5959
}
6060

6161
// only run as script

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import { tryGlyph } from './glyph'
1414
* @return {string}
1515
*/
1616
const getGlyph = Platform.select({
17-
ios: (_android, ios, name) => tryGlyph([ios, name], x => `ios-${x}`),
18-
default: (android, _ios, name) => tryGlyph([android, name], x => `md-${x}`)
17+
ios: (_android, ios, name) => tryGlyph([ios, name], (x) => `ios-${x}`),
18+
default: (android, _ios, name) => tryGlyph([android, name], (x) => `md-${x}`),
1919
})
2020

2121
class Icon extends React.PureComponent {
2222
constructor(props) {
2323
super(props)
2424

25-
this._setRef = ref => {
25+
this._setRef = (ref) => {
2626
this._text = ref
2727
}
2828
}
@@ -47,7 +47,7 @@ class Icon extends React.PureComponent {
4747

4848
const fontStyle = {
4949
fontSize: size,
50-
color
50+
color,
5151
}
5252

5353
return (
@@ -65,7 +65,7 @@ class Icon extends React.PureComponent {
6565

6666
Icon.defaultProps = {
6767
allowFontScaling: false,
68-
size: 30
68+
size: 30,
6969
}
7070

7171
export default Icon
@@ -74,6 +74,6 @@ const styles = StyleSheet.create({
7474
icon: {
7575
fontFamily: 'Ionicons',
7676
fontWeight: 'normal',
77-
fontStyle: 'normal'
78-
}
77+
fontStyle: 'normal',
78+
},
7979
})

index.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare module 'react-native-ionicons' {
1010
android?: string,
1111
ios?: string,
1212
color?: string,
13-
size?: number
13+
size?: number,
1414
}
1515

1616
declare type Icon = React.ComponentType<IconProps>

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"prepublishOnly": "npm test",
99
"generate": "node generate",
10-
"prettier": "prettier --write '**/*.{js,json,ts,md}'",
10+
"prettier": "prettier --write '**/*.{js,json,flow,ts,md}'",
1111
"pretest": "npm run generate; npm run prettier",
1212
"test": "jest"
1313
},
@@ -18,9 +18,8 @@
1818
}
1919
},
2020
"lint-staged": {
21-
"*.{js,json,ts,md}": [
22-
"prettier --write",
23-
"git add"
21+
"*.{js,json,flow,ts,md}": [
22+
"prettier --write"
2423
]
2524
},
2625
"prettier": {
@@ -48,14 +47,14 @@
4847
"react-native": "*"
4948
},
5049
"devDependencies": {
51-
"@babel/core": "^7.7.7",
52-
"@babel/preset-env": "^7.7.7",
53-
"babel-jest": "^24.9.0",
54-
"husky": "^3.0.9",
50+
"@babel/core": "^7.10.0",
51+
"@babel/preset-env": "^7.10.0",
52+
"babel-jest": "^26.0.1",
53+
"husky": "^4.2.5",
5554
"ionicons": "^4.6.3",
56-
"jest": "^24.9.0",
57-
"lint-staged": "^9.4.2",
58-
"prettier": "^1.18.2"
55+
"jest": "^26.0.1",
56+
"lint-staged": "^10.2.6",
57+
"prettier": "^2.0.5"
5958
},
6059
"rnpm": {
6160
"assets": [

react-native.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
dependency: {
3-
assets: ['fonts']
4-
}
3+
assets: ['fonts'],
4+
},
55
}

test/glyph.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { UNKNOWN_ICON, tryGlyph } from '../glyph'
22

33
describe('should work on ios devices', () => {
4-
const mapper = x => `ios-${x}`
4+
const mapper = (x) => `ios-${x}`
55

66
it('should have `add` icon', () => {
77
const icon = tryGlyph(['add', null], mapper)
@@ -10,7 +10,7 @@ describe('should work on ios devices', () => {
1010
})
1111

1212
describe('should work on android devices', () => {
13-
const mapper = x => `md-${x}`
13+
const mapper = (x) => `md-${x}`
1414

1515
it('should have `add` icon', () => {
1616
const icon = tryGlyph(['add', null], mapper)

0 commit comments

Comments
 (0)