Skip to content

Commit c9cf6a0

Browse files
authored
fixed eslint issues. (#18)
1 parent fbf9d40 commit c9cf6a0

File tree

9 files changed

+87
-134
lines changed

9 files changed

+87
-134
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/src/serviceWorker.ts

.eslintrc.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
11
{
2-
"extends": "eslint:recommended"
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:react/recommended"
5+
],
6+
"parser": "@babel/eslint-parser",
7+
"parserOptions": {
8+
"requireConfigFile": false,
9+
"ecmaFeatures": {
10+
"jsx": true
11+
},
12+
"babelOptions": {
13+
"babelrc": false,
14+
"configFile": false,
15+
"presets": [
16+
"@babel/preset-env",
17+
"@babel/preset-react",
18+
"@babel/preset-typescript"
19+
]
20+
}
21+
},
22+
"settings": {
23+
"react": {
24+
"version": "detect"
25+
}
26+
},
27+
"env": {
28+
"browser": true,
29+
"node": true
30+
}
331
}

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"@types/node": "^17.0.9",
1717
"@types/react": "^17.0.38",
1818
"@types/react-dom": "^17.0.11",
19-
"eslint": "8.10.0",
2019
"node-sass": "^7.0.1",
2120
"react": "^17.0.2",
2221
"react-dom": "^17.0.2",
@@ -48,6 +47,14 @@
4847
]
4948
},
5049
"devDependencies": {
50+
"@babel/core": "^7.22.1",
51+
"@babel/eslint-parser": "^7.21.8",
52+
"@babel/preset-env": "^7.22.4",
53+
"@babel/preset-react": "^7.22.3",
54+
"@babel/preset-typescript": "^7.21.5",
55+
"babel-eslint": "^10.1.0",
56+
"eslint": "^8.42.0",
57+
"eslint-plugin-react": "^7.32.2",
5158
"gh-pages": "^3.2.3",
5259
"prettier": "2.5.1"
5360
}

src/Components/Certificates/Certificates.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import * as React from 'react';
22
import credlyDashboard from './credlyDashboard.png';
33
import './_Certificates.scss';
44

5-
interface IProps {
6-
}
75

8-
export const Certificates: React.FC<IProps> = () => {
6+
export const Certificates: React.FC = () => {
97
return (
108
<section className="tile tile-certificates">
119
<h3 className="tile-certificates-title">My AWS Certificates</h3>

src/Components/Education/Education.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import * as React from 'react'
22
import './_Education.scss'
33

4-
interface EducationState {
5-
iconCls: string
6-
year: string
7-
institute: string
8-
stream: string
9-
}
10-
11-
interface IProps {
12-
educations: Array<EducationState>
13-
}
14-
15-
export const Education: React.FC<IProps> = ({ educations }) => {
4+
export const Education = ({ educations }: {
5+
educations: Array<{
6+
iconCls: string
7+
year: string
8+
institute: string
9+
stream: string
10+
}>
11+
}) => {
1612
return (
1713
<section className="tile tile-education">
1814
<div className="tile-content">

src/Components/Profile/Profile.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import './_Profile.scss'
33

4-
interface IProps {
4+
export const Profile = ({ name, designation, company, aboutMe, emailAddress, mobileNumber, avatarUrl, location }: {
55
name: string
66
company: string
77
designation: string
@@ -10,9 +10,7 @@ interface IProps {
1010
emailAddress: string
1111
mobileNumber: string
1212
location: string
13-
}
14-
15-
export const Profile: React.FC<IProps> = ({ name, designation, company, aboutMe, emailAddress, mobileNumber, avatarUrl, location }) => {
13+
}) => {
1614
return (
1715
<section className="tile tile-profile">
1816
<img className="avatar" alt={name} title={name} src={avatarUrl} />

src/Components/Skills/Skills.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import * as React from 'react';
22
import './_Skills.scss';
33

4-
interface IProps {
5-
skills: Array<string>
6-
}
7-
8-
export const Skills: React.FC<IProps> = ({ skills }) => {
4+
export const Skills = ({ skills }: { skills: Array<string> }) => {
95
return (
106
<section className="tile tile-skills">
11-
<h3>Skills & Expertise</h3>
7+
<h3>Skills & Expertise</h3>
128
<div className="tags">
139
{
1410
skills.map((skill, idx) => {

src/Components/Timeline/Timeline.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import * as React from "react";
22
import "./_Timeline.scss";
33

4-
interface IProps {
4+
5+
export const Timeline = (tile: {
56
title: string
67
bgColor: string
78
timelines: Array<{ year?: number; designation: string, projects: Array<{ name: string, techStack: string, description: string }> }>;
8-
}
9-
10-
export const Timeline: React.FC<IProps> = tile => {
9+
}) => {
1110
// var randomColor = Math.floor(Math.random()*16777215).toString(16); // style={{ backgroundColor: `#${randomColor}` }}
1211

1312
return (

0 commit comments

Comments
 (0)