Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

Commit e697acd

Browse files
committed
Update prettier to version 2.
1 parent ff70ab1 commit e697acd

File tree

5 files changed

+24
-22
lines changed

5 files changed

+24
-22
lines changed

js/demo/demo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
/* eslint-disable strict */
1515

16-
;(function() {
16+
;(function () {
1717
'use strict'
1818

1919
var input = document.getElementById('input')
2020
document
2121
.getElementById('calculate')
22-
.addEventListener('click', function(event) {
22+
.addEventListener('click', function (event) {
2323
event.preventDefault()
2424
document.getElementById('result').value = md5(input.value)
2525
})

js/md5.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/* eslint-disable strict */
2323

24-
;(function($) {
24+
;(function ($) {
2525
'use strict'
2626

2727
/**
@@ -391,7 +391,7 @@
391391
}
392392

393393
if (typeof define === 'function' && define.amd) {
394-
define(function() {
394+
define(function () {
395395
return md5
396396
})
397397
} else if (typeof module === 'object' && module.exports) {

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"eslint-plugin-jsdoc": "22",
3232
"eslint-plugin-prettier": "3",
3333
"mocha": "7",
34-
"prettier": "1",
34+
"prettier": "2",
3535
"uglify-js": "3"
3636
},
3737
"eslintConfig": {
@@ -50,9 +50,11 @@
5050
"test/vendor"
5151
],
5252
"prettier": {
53+
"arrowParens": "avoid",
5354
"proseWrap": "always",
5455
"semi": false,
55-
"singleQuote": true
56+
"singleQuote": true,
57+
"trailingComma": "none"
5658
},
5759
"scripts": {
5860
"lint": "eslint .",

test/test.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,51 +13,51 @@
1313

1414
/* eslint-disable strict */
1515

16-
;(function(expect, md5) {
16+
;(function (expect, md5) {
1717
'use strict'
1818

19-
describe('MD5 Hex-encoding', function() {
20-
it('should create a hex-encoded MD5 hash of an ASCII value', function() {
19+
describe('MD5 Hex-encoding', function () {
20+
it('should create a hex-encoded MD5 hash of an ASCII value', function () {
2121
expect(md5('value')).to.equal('2063c1608d6e0baf80249c42e2be5804')
2222
})
2323

24-
it('should create a hex-encoded MD5 hash of an UTF-8 value', function() {
24+
it('should create a hex-encoded MD5 hash of an UTF-8 value', function () {
2525
expect(md5('日本')).to.equal('4dbed2e657457884e67137d3514119b3')
2626
})
2727
})
2828

29-
describe('HMAC-MD5 Hex-encoding', function() {
30-
it('should create a hex-encoded HMAC-MD5 hash of an ASCII value and key', function() {
29+
describe('HMAC-MD5 Hex-encoding', function () {
30+
it('should create a hex-encoded HMAC-MD5 hash of an ASCII value and key', function () {
3131
expect(md5('value', 'key')).to.equal('01433efd5f16327ea4b31144572c67f6')
3232
})
3333

34-
it('should create a hex-encoded HMAC-MD5 hash of an UTF-8 value and key', function() {
34+
it('should create a hex-encoded HMAC-MD5 hash of an UTF-8 value and key', function () {
3535
expect(md5('日本', '日本')).to.equal('c78b8c7357926981cc04740bd3e9d015')
3636
})
3737
})
3838

39-
describe('MD5 raw encoding', function() {
40-
it('should create a raw MD5 hash of an ASCII value', function() {
39+
describe('MD5 raw encoding', function () {
40+
it('should create a raw MD5 hash of an ASCII value', function () {
4141
expect(md5('value', null, true)).to.equal(
4242
' c\xc1`\x8dn\x0b\xaf\x80$\x9cB\xe2\xbeX\x04'
4343
)
4444
})
4545

46-
it('should create a raw MD5 hash of an UTF-8 value', function() {
46+
it('should create a raw MD5 hash of an UTF-8 value', function () {
4747
expect(md5('日本', null, true)).to.equal(
4848
'M\xbe\xd2\xe6WEx\x84\xe6q7\xd3QA\x19\xb3'
4949
)
5050
})
5151
})
5252

53-
describe('HMAC-MD5 raw encoding', function() {
54-
it('should create a raw HMAC-MD5 hash of an ASCII value and key', function() {
53+
describe('HMAC-MD5 raw encoding', function () {
54+
it('should create a raw HMAC-MD5 hash of an ASCII value and key', function () {
5555
expect(md5('value', 'key', true)).to.equal(
5656
'\x01C>\xfd_\x162~\xa4\xb3\x11DW,g\xf6'
5757
)
5858
})
5959

60-
it('should create a raw HMAC-MD5 hash of an UTF-8 value and key', function() {
60+
it('should create a raw HMAC-MD5 hash of an UTF-8 value and key', function () {
6161
expect(md5('日本', '日本', true)).to.equal(
6262
'\xc7\x8b\x8csW\x92i\x81\xcc\x04t\x0b\xd3\xe9\xd0\x15'
6363
)

0 commit comments

Comments
 (0)