Skip to content

Commit c83a129

Browse files
authored
Merge pull request #564 from rahuldkjain/hotfix/icons
fix: linting errors
2 parents c919601 + 3461a5b commit c83a129

25 files changed

+1163
-227
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
"plugins": ["react"],
1515
"rules": {
1616
"react/forbid-prop-types": 0
17-
}
17+
},
18+
"ignorePatterns": ["**/*.test.js"]
1819
}

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"singleQuote": true,
33
"jsxSingleQuote": false,
44
"tabWidth": 2,
5-
"printWidth": 480,
5+
"printWidth": 120,
66
"trailingComma": "all",
77
"semi": true,
88
"exclude": ["node_modules", "codepipeline"]

CODE_STYLE_GUIDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
## Spacing
1717

1818
1. **JS:**
19+
1920
- Use a space after `if`, `for`, `while`, `switch`.
2021
- Do not use a space after the opening `(` and before the closing `)`.
2122
- Use a space before and after destructuring objects.
23+
2224
```js
2325
//good
2426
const { apple, mangoes } = fruits;

__mocks__/gatsby.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
/* eslint-disable no-undef */
12
const React = require('react');
3+
24
const gatsby = jest.requireActual('gatsby');
35

46
module.exports = {
@@ -10,7 +12,7 @@ module.exports = {
1012
React.createElement('a', {
1113
...rest,
1214
href: to,
13-
})
15+
}),
1416
),
1517
StaticQuery: jest.fn(),
1618
useStaticQuery: jest.fn(),

src/components/__tests__/addons.test.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('Addons', () => {
9191
social={socialInput}
9292
handleCheckChange={mockHandleCheckChange}
9393
handleDataChange={mockHandleDataChange}
94-
/>
94+
/>,
9595
);
9696

9797
expect(toJson(addOnComponent)).toMatchSnapshot();
@@ -113,7 +113,7 @@ describe('Addons', () => {
113113
social={newSocialInput}
114114
handleCheckChange={mockHandleCheckChange}
115115
handleDataChange={mockHandleDataChange}
116-
/>
116+
/>,
117117
);
118118

119119
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
@@ -147,7 +147,7 @@ describe('Addons', () => {
147147
social={newSocialInput}
148148
handleCheckChange={mockHandleCheckChange}
149149
handleDataChange={mockHandleDataChange}
150-
/>
150+
/>,
151151
);
152152

153153
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
@@ -176,7 +176,7 @@ describe('Addons', () => {
176176
social={newSocialInput}
177177
handleCheckChange={mockHandleCheckChange}
178178
handleDataChange={mockHandleDataChange}
179-
/>
179+
/>,
180180
);
181181

182182
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
@@ -205,7 +205,7 @@ describe('Addons', () => {
205205
social={newSocialInput}
206206
handleCheckChange={mockHandleCheckChange}
207207
handleDataChange={mockHandleDataChange}
208-
/>
208+
/>,
209209
);
210210

211211
addOnComponent.find('#visitors-count-open-btn').simulate('click', {});
@@ -233,7 +233,7 @@ describe('Addons', () => {
233233
social={newSocialInput}
234234
handleCheckChange={mockHandleCheckChange}
235235
handleDataChange={mockHandleDataChange}
236-
/>
236+
/>,
237237
);
238238

239239
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -267,7 +267,7 @@ describe('Addons', () => {
267267
social={newSocialInput}
268268
handleCheckChange={mockHandleCheckChange}
269269
handleDataChange={mockHandleDataChange}
270-
/>
270+
/>,
271271
);
272272

273273
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -318,7 +318,7 @@ describe('Addons', () => {
318318
social={newSocialInput}
319319
handleCheckChange={mockHandleCheckChange}
320320
handleDataChange={mockHandleDataChange}
321-
/>
321+
/>,
322322
);
323323

324324
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -369,7 +369,7 @@ describe('Addons', () => {
369369
social={newSocialInput}
370370
handleCheckChange={mockHandleCheckChange}
371371
handleDataChange={mockHandleDataChange}
372-
/>
372+
/>,
373373
);
374374

375375
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -421,7 +421,7 @@ describe('Addons', () => {
421421
social={newSocialInput}
422422
handleCheckChange={mockHandleCheckChange}
423423
handleDataChange={mockHandleDataChange}
424-
/>
424+
/>,
425425
);
426426

427427
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -472,7 +472,7 @@ describe('Addons', () => {
472472
social={newSocialInput}
473473
handleCheckChange={mockHandleCheckChange}
474474
handleDataChange={mockHandleDataChange}
475-
/>
475+
/>,
476476
);
477477

478478
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -524,7 +524,7 @@ describe('Addons', () => {
524524
social={newSocialInput}
525525
handleCheckChange={mockHandleCheckChange}
526526
handleDataChange={mockHandleDataChange}
527-
/>
527+
/>,
528528
);
529529

530530
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -576,7 +576,7 @@ describe('Addons', () => {
576576
social={newSocialInput}
577577
handleCheckChange={mockHandleCheckChange}
578578
handleDataChange={mockHandleDataChange}
579-
/>
579+
/>,
580580
);
581581

582582
addOnComponent.find('#github-stats-open-btn').simulate('click', {});
@@ -617,7 +617,7 @@ describe('Addons', () => {
617617
social={newSocialInput}
618618
handleCheckChange={mockHandleCheckChange}
619619
handleDataChange={mockHandleDataChange}
620-
/>
620+
/>,
621621
);
622622

623623
addOnComponent.find('#top-languages-open-btn').simulate('click', {});
@@ -652,7 +652,7 @@ describe('Addons', () => {
652652
social={newSocialInput}
653653
handleCheckChange={mockHandleCheckChange}
654654
handleDataChange={mockHandleDataChange}
655-
/>
655+
/>,
656656
);
657657

658658
addOnComponent.find('#top-languages-open-btn').simulate('click', {});
@@ -686,7 +686,7 @@ describe('Addons', () => {
686686
social={socialInput}
687687
handleCheckChange={mockHandleCheckChange}
688688
handleDataChange={mockHandleDataChange}
689-
/>
689+
/>,
690690
);
691691

692692
addOnComponent.find('#visitors-count').simulate('change', mockEvent);
@@ -725,7 +725,7 @@ describe('Addons', () => {
725725
social={newSocialInput}
726726
handleCheckChange={mockHandleCheckChange}
727727
handleDataChange={mockHandleDataChange}
728-
/>
728+
/>,
729729
);
730730

731731
const workflowElement = addOnComponent.find('.workflow');
@@ -748,7 +748,7 @@ describe('Addons', () => {
748748
social={newSocialInput}
749749
handleCheckChange={mockHandleCheckChange}
750750
handleDataChange={mockHandleDataChange}
751-
/>
751+
/>,
752752
);
753753

754754
const workflowElement = addOnComponent.find('.workflow');
@@ -771,7 +771,7 @@ describe('Addons', () => {
771771
social={newSocialInput}
772772
handleCheckChange={mockHandleCheckChange}
773773
handleDataChange={mockHandleDataChange}
774-
/>
774+
/>,
775775
);
776776

777777
const workflowElement = addOnComponent.find('.workflow');
@@ -797,7 +797,7 @@ describe('Addons', () => {
797797
social={newSocialInput}
798798
handleCheckChange={mockHandleCheckChange}
799799
handleDataChange={mockHandleDataChange}
800-
/>
800+
/>,
801801
);
802802

803803
addOnComponent.find('#blog-post-worklow-span').simulate('click', {});

src/components/__tests__/donate.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import toJson from 'enzyme-to-json';
33
import { shallow } from 'enzyme';
4-
54
import Donate from '../donate';
65

76
describe('Donate', () => {

src/components/__tests__/markdown.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe('Markdown', () => {
8585
...props.data,
8686
subtitle: '',
8787
}}
88-
/>
88+
/>,
8989
);
9090
expect(toJson(component)).toMatchSnapshot();
9191
});
@@ -102,7 +102,7 @@ describe('Markdown', () => {
102102
...props.prefix,
103103
title: '',
104104
}}
105-
/>
105+
/>,
106106
);
107107
expect(toJson(component)).toMatchSnapshot();
108108
});
@@ -115,7 +115,7 @@ describe('Markdown', () => {
115115
...props.data,
116116
topLanguages: true,
117117
}}
118-
/>
118+
/>,
119119
);
120120
expect(toJson(component)).toMatchSnapshot();
121121
});
@@ -129,7 +129,7 @@ describe('Markdown', () => {
129129
topLanguages: true,
130130
githubStats: true,
131131
}}
132-
/>
132+
/>,
133133
);
134134
expect(toJson(component)).toMatchSnapshot();
135135
});
@@ -142,7 +142,7 @@ describe('Markdown', () => {
142142
...props.data,
143143
devDynamicBlogs: true,
144144
}}
145-
/>
145+
/>,
146146
);
147147
expect(toJson(component)).toMatchSnapshot();
148148
});
@@ -155,7 +155,7 @@ describe('Markdown', () => {
155155
...props.data,
156156
currentWork: '',
157157
}}
158-
/>
158+
/>,
159159
);
160160
expect(toJson(component)).toMatchSnapshot();
161161
});
@@ -168,7 +168,7 @@ describe('Markdown', () => {
168168
...props.data,
169169
visitorsBadge: true,
170170
}}
171-
/>
171+
/>,
172172
);
173173
expect(toJson(component)).toMatchSnapshot();
174174
});
@@ -181,7 +181,7 @@ describe('Markdown', () => {
181181
...props.data,
182182
twitterBadge: true,
183183
}}
184-
/>
184+
/>,
185185
);
186186
expect(toJson(component)).toMatchSnapshot();
187187
});
@@ -194,7 +194,7 @@ describe('Markdown', () => {
194194
...props.data,
195195
githubProfileTrophy: true,
196196
}}
197-
/>
197+
/>,
198198
);
199199
expect(toJson(component)).toMatchSnapshot();
200200
});
@@ -207,7 +207,7 @@ describe('Markdown', () => {
207207
...props.data,
208208
githubProfileTrophy: true,
209209
}}
210-
/>
210+
/>,
211211
);
212212
expect(toJson(component)).toMatchSnapshot();
213213
});

src/components/__tests__/markdownPreview.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ describe('DisplaySocial Preview', () => {
248248
base="https://codepen.io"
249249
icon="https://cdn.jsdelivr.net/npm/[email protected]/icons/codepen.svg"
250250
username={social.codepen}
251-
/>
251+
/>,
252252
);
253253

254254
expect(tree).toMatchSnapshot();
@@ -259,7 +259,7 @@ describe('DisplaySocial Preview', () => {
259259
base="https://codepen.io"
260260
icon="https://cdn.jsdelivr.net/npm/[email protected]/icons/codepen.svg"
261261
username={''}
262-
/>
262+
/>,
263263
);
264264

265265
expect(tree).toMatchSnapshot();
@@ -278,7 +278,7 @@ describe('VisitorsBadge Preview', () => {
278278
badgeColor: data.badgeColor,
279279
badgeStyle: data.badgeStyle,
280280
}}
281-
/>
281+
/>,
282282
);
283283

284284
expect(tree).toMatchSnapshot();
@@ -295,7 +295,7 @@ describe('VisitorsBadge Preview', () => {
295295
badgeColor: data.badgeColor,
296296
badgeStyle: data.badgeStyle,
297297
}}
298-
/>
298+
/>,
299299
);
300300

301301
expect(tree).toMatchSnapshot();
@@ -371,7 +371,7 @@ describe('TopLanguages Preview', () => {
371371
let data = DEFAULT_DATA;
372372
let social = DEFAULT_SOCIAL;
373373
const tree = shallow(
374-
<TopLanguagesPreview show={data.topLanguages} github={social.github} options={data.topLanguagesOptions} />
374+
<TopLanguagesPreview show={data.topLanguages} github={social.github} options={data.topLanguagesOptions} />,
375375
);
376376

377377
expect(tree).toMatchSnapshot();
@@ -389,7 +389,7 @@ describe('GitHubStats Preview', () => {
389389
let data = DEFAULT_DATA;
390390
let social = DEFAULT_SOCIAL;
391391
const tree = shallow(
392-
<GitHubStatsPreview show={data.githubStats} github={social.github} options={data.githubStatsOptions} />
392+
<GitHubStatsPreview show={data.githubStats} github={social.github} options={data.githubStatsOptions} />,
393393
);
394394

395395
expect(tree).toMatchSnapshot();

0 commit comments

Comments
 (0)