Skip to content

Commit a027231

Browse files
authored
Merge pull request #1216 from erikaperugachi/lint
Update @criptext/criptext-js-tools
2 parents 4cf578d + ac271ba commit a027231

File tree

79 files changed

+2658
-1781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2658
-1781
lines changed

.circleci/config.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
build:
88
docker:
99
# specify the version you desire here
10-
- image: circleci/node:8.15
10+
- image: circleci/node:10.17.0
1111

1212
# Specify service dependencies here if necessary
1313
# CircleCI maintains a library of pre-built images
@@ -53,9 +53,13 @@ jobs:
5353

5454
# run tests!
5555
- checkout
56+
- run:
57+
name: Composer Build
58+
command: cd email_composer/ && echo 'SKIP_PREFLIGHT_CHECK=true' >> .env && yarn build
59+
5660
- run:
5761
name: Composer Unit test
58-
command: cd email_composer/ && echo 'SKIP_PREFLIGHT_CHECK=true' >> .env && yarn test
62+
command: cd email_composer/ && yarn test
5963

6064
- run:
6165
name: Composer Lint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ We use Lokalise for translations. If you are interested in helping please write
2323

2424
To build Criptext on your machine you'll need:
2525

26-
* Node.js (Recommended 12.12+)
26+
* Node.js (Recommended 10.17.0+)
2727
* Yarn (Recommended 1.19.1+)
2828

2929
## Run locally

electron_app/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
}
135135
},
136136
"devDependencies": {
137-
"criptext-js-tools": "0.5.0",
137+
"@criptext/criptext-js-tools": "^0.5.2",
138138
"electron": "6.1.4",
139139
"electron-builder": "21.2.0",
140140
"electron-notarize": "^0.1.1"
@@ -162,5 +162,9 @@
162162
"sqlite3": "^4.1.0",
163163
"unused-filename": "^2.1.0",
164164
"websocket": "^1.0.28"
165+
},
166+
"jest": {
167+
"verbose": true,
168+
"testURL": "http://localhost/"
165169
}
166170
}

electron_app/src/socketClient.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ const disconnect = () => {
2020

2121
const start = ({ jwt }) => {
2222
client = new WebSocketClient();
23-
client.connect(
24-
`${SOCKET_URL}?token=${jwt}`,
25-
'criptext-protocol'
26-
);
23+
client.connect(`${SOCKET_URL}?token=${jwt}`, 'criptext-protocol');
2724

2825
client.on('connectFailed', error => {
2926
if (shouldReconnect) {

electron_app/yarn.lock

Lines changed: 938 additions & 690 deletions
Large diffs are not rendered by default.

email_composer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"lint": "criptext-js-tools lint"
3030
},
3131
"devDependencies": {
32+
"@criptext/criptext-js-tools": "^0.5.2",
3233
"@criptext/react-scripts": "^2.0.6-rc1",
33-
"criptext-js-tools": "0.5.0",
3434
"node-sass": "^4.13.0"
3535
},
3636
"homepage": "./",

email_composer/src/components/TagRecipient.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ const TagRecipient = props => {
5454
/>
5555
)}
5656

57-
{!disabled && !isEditable && (
58-
<a className={classNameIconRemove} onClick={() => onRemove(key)} />
59-
)}
57+
{!disabled &&
58+
!isEditable && (
59+
<a className={classNameIconRemove} onClick={() => onRemove(key)} />
60+
)}
6061
</span>
6162
);
6263
};

email_composer/src/utils/EmailUtils.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const myEmailAddress = myAccount.recipientId.includes('@')
2424
const enterpriseDomain = myAccount.recipientId.split('@')[1];
2525

2626
const formAppSign = () => {
27-
return `<br/><i style="font-size: 12px;">${string.criptextSignature.sent_with} <span style="color: #0091ff; text-decoration: none;">Criptext</span> ${string.criptextSignature.secure_email}</i>`;
27+
return `<br/><i style="font-size: 12px;">${
28+
string.criptextSignature.sent_with
29+
} <span style="color: #0091ff; text-decoration: none;">Criptext</span> ${
30+
string.criptextSignature.secure_email
31+
}</i>`;
2832
};
2933

3034
const getRecipientsWithDomain = (recipients, type) => {
@@ -254,8 +258,8 @@ export const formDataToReply = async (emailKeyToEdit, replyType) => {
254258
const from = emailData.replyTo
255259
? parseContactRow(emailData.replyTo)
256260
: emailFrom.name
257-
? emailFrom
258-
: contacts.from[0];
261+
? emailFrom
262+
: contacts.from[0];
259263

260264
const content = formReplyForwardContent(
261265
replyType,
@@ -292,10 +296,11 @@ export const formDataToReply = async (emailKeyToEdit, replyType) => {
292296
};
293297

294298
const formToEmails = (from, to, replyType, myEmailAddress) => {
295-
const [isFromMe] = from.map(contact =>
296-
contact.email
297-
? contact.email === myEmailAddress
298-
: contact === myEmailAddress
299+
const [isFromMe] = from.map(
300+
contact =>
301+
contact.email
302+
? contact.email === myEmailAddress
303+
: contact === myEmailAddress
299304
);
300305
if (
301306
replyType === composerEvents.REPLY ||

0 commit comments

Comments
 (0)