Skip to content

Commit e6162c8

Browse files
Merge pull request #22 from BregornOriginal/update-gh-jobs
update gh actions and fix linter errors
2 parents 69e5ea9 + 100adb1 commit e6162c8

File tree

8 files changed

+62
-27
lines changed

8 files changed

+62
-27
lines changed

.github/workflows/linters.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,37 @@ env:
88
jobs:
99
webhint:
1010
name: Webhint
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v1
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
16-
node-version: '12.x'
16+
node-version: '20'
1717
- name: Setup Webhint
1818
run: |
1919
npm install --save-dev hint@6.x
2020
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
2121
- name: Webhint Report
2222
run: npx hint .
23-
# stylelint:
24-
# name: Stylelint
25-
# runs-on: ubuntu-18.04
26-
# steps:
27-
# - uses: actions/checkout@v2
28-
# - uses: actions/setup-node@v1
29-
# with:
30-
# node-version: '12.x'
31-
# - name: Setup Stylelint
32-
# run: |
33-
# npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
34-
# [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
35-
# - name: Stylelint Report
36-
# run: npx stylelint "**/*.{css,scss}"
23+
stylelint:
24+
name: Stylelint
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
- name: Setup Stylelint
32+
run: |
33+
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
34+
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
35+
- name: Stylelint Report
36+
run: npm run lint:css
3737
nodechecker:
3838
name: node_modules checker
39-
runs-on: ubuntu-18.04
39+
runs-on: ubuntu-latest
4040
steps:
41-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v4
4242
- name: Check node_modules existence
4343
run: |
4444
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi

.hintrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"connector": {
3+
"name": "local",
4+
"options": {
5+
"pattern": ["**/*.html", "**/*.css", "!.git/**", "!node_modules/**", "!.next/**", "!sanity-portfolio/**"]
6+
}
7+
},
8+
"extends": ["development"],
9+
"formatters": ["stylish"],
10+
"hints": {
11+
"button-type": "error",
12+
"disown-opener": "error",
13+
"html-checker": "error",
14+
"meta-charset-utf-8": "error",
15+
"meta-viewport": "error",
16+
"no-inline-styles": "error",
17+
"compat-api/css": ["error", { "ignore": ["scrollbar-width", "scrollbar-color"] }],
18+
"typescript-config/strict": "off",
19+
"typescript-config/consistent-casing": "off",
20+
"detect-css-reflows/paint": "off",
21+
"detect-css-reflows/composite": "off"
22+
},
23+
"browserslist": ["last 2 Chrome versions", "last 2 Firefox versions", "last 2 Safari versions", "last 2 Edge versions"]
24+
}

.stylelintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
],
1717
"csstree/validator": true
1818
},
19-
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"]
19+
"ignoreFiles": ["build/**", "dist/**", "**/dist/**", "node_modules/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx", ".next/**", "sanity-portfolio/**"]
2020
}

components/Profile.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ export default function Profile({ pageInfo }: Props) {
6868

6969
<div className="pt-5">
7070
<Link href="#about">
71-
<button className="profileButton">About</button>
71+
<button type="button" className="profileButton">About</button>
7272
</Link>
7373
<Link href="#experience">
74-
<button className="profileButton">Experience</button>
74+
<button type="button" className="profileButton">Experience</button>
7575
</Link>
7676
<Link href="#skills">
77-
<button className="profileButton">Skills</button>
77+
<button type="button" className="profileButton">Skills</button>
7878
</Link>
7979
<Link href="#projects">
80-
<button className="profileButton">Projects</button>
80+
<button type="button" className="profileButton">Projects</button>
8181
</Link>
8282
</div>
8383
</div>

components/Projects.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const Projects = ({ projects }: Props) => {
6262
{/* Left Arrow */}
6363
{canScrollLeft && isHovering && (
6464
<button
65+
type="button"
6566
onClick={() => scroll('left')}
6667
className="absolute left-2 sm:left-5 z-50 bg-[#F7AB0A]/80 hover:bg-[#F7AB0A] transition-all duration-200 rounded-full p-2 sm:p-3 shadow-lg"
6768
aria-label="Scroll left"
@@ -137,6 +138,7 @@ const Projects = ({ projects }: Props) => {
137138
{/* Right Arrow */}
138139
{canScrollRight && isHovering && (
139140
<button
141+
type="button"
140142
onClick={() => scroll('right')}
141143
className="absolute right-2 sm:right-5 z-50 bg-[#F7AB0A]/80 hover:bg-[#F7AB0A] transition-all duration-200 rounded-full p-2 sm:p-3 shadow-lg"
142144
aria-label="Scroll right"

components/WorkExperience.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const WorkExperience = ({ experiences }: Props) => {
5959
{/* Left Arrow */}
6060
{canScrollLeft && isHovering && (
6161
<button
62+
type="button"
6263
onClick={() => scroll('left')}
6364
className="absolute left-2 sm:left-5 z-50 bg-[#F7AB0A]/80 hover:bg-[#F7AB0A] transition-all duration-200 rounded-full p-2 sm:p-3 shadow-lg"
6465
aria-label="Scroll left"
@@ -90,6 +91,7 @@ const WorkExperience = ({ experiences }: Props) => {
9091
{/* Right Arrow */}
9192
{canScrollRight && isHovering && (
9293
<button
94+
type="button"
9395
onClick={() => scroll('right')}
9496
className="absolute right-2 sm:right-5 z-50 bg-[#F7AB0A]/80 hover:bg-[#F7AB0A] transition-all duration-200 rounded-full p-2 sm:p-3 shadow-lg"
9597
aria-label="Scroll right"

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
"name": "next-portfolio",
33
"version": "0.1.0",
44
"private": true,
5+
"browserslist": [
6+
"last 2 Chrome versions",
7+
"last 2 Firefox versions",
8+
"last 2 Safari versions",
9+
"last 2 Edge versions"
10+
],
511
"engines": {
612
"node": "24.x"
713
},
814
"scripts": {
915
"dev": "next dev",
1016
"build": "next build",
1117
"start": "next start",
12-
"lint": "next lint"
18+
"lint": "next lint",
19+
"lint:css": "stylelint \"styles/**/*.css\" \"styles/**/*.scss\""
1320
},
1421
"dependencies": {
1522
"@heroicons/react": "^2.0.13",

styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
}
3232

3333
.headerTextButton:hover {
34-
color: #F7AB0A;
34+
color: #f7ab0a;
3535
}
3636
}

0 commit comments

Comments
 (0)