Skip to content

Commit fa994e4

Browse files
committed
chore(ci): add workflow file and cleanup lint errors
1 parent e00002b commit fa994e4

6 files changed

Lines changed: 44 additions & 10 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: lts/*
19+
- name: Install dependencies
20+
run: npm install
21+
- name: Run eslint
22+
run: npm run lint
23+
build:
24+
name: Build
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: lts/*
33+
- name: Install dependencies
34+
run: npm install
35+
- name: Attempt a build
36+
run: npm run build

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
},
1919
"devDependencies": {
2020
"@types/enzyme": "^3.10.8",
21-
"@types/jest": "^26.0.23",
2221
"@types/react-router-dom": "^5.1.7",
2322
"@types/victory": "^33.1.4",
2423
"@typescript-eslint/eslint-plugin": "^4.26.1",
@@ -36,7 +35,6 @@
3635
"file-loader": "^6.2.0",
3736
"html-webpack-plugin": "^5.5.0",
3837
"imagemin": "^8.0.0",
39-
"jest": "^27.0.4",
4038
"mini-css-extract-plugin": "^1.6.0",
4139
"postcss": "^8.3.1",
4240
"prettier": "^2.3.1",
@@ -50,7 +48,6 @@
5048
"style-loader": "^2.0.0",
5149
"svg-url-loader": "^7.1.1",
5250
"terser-webpack-plugin": "^5.3.1",
53-
"ts-jest": "^27.0.3",
5451
"ts-loader": "^9.2.3",
5552
"tsconfig-paths-webpack-plugin": "^3.5.2",
5653
"tslib": "^2.2.0",

src/app/AppLayout/SocialMediaContainer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class SocialMediaContainer extends React.Component<any, any> {
1111
<a
1212
href="https://www.github.com/aptmac/draftaid-react"
1313
target="_blank"
14+
rel="noreferrer"
1415
aria-label="github-button"
1516
className="social github"
1617
>

src/app/Draftboard/BeersheetUpload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
99

1010
interface BeersheetProps {
11-
getBeersheet: Function;
11+
getBeersheet: (beersheet: string) => void;
1212
}
1313

1414
interface readFile {

src/app/Draftboard/Draftboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DraftBoard extends Component<any, any> {
3333
}
3434

3535
searchPlayers(query) {
36-
let players = this.state.players.filter((player) => player.name.toUpperCase().includes(query.toUpperCase()));
36+
const players = this.state.players.filter((player) => player.name.toUpperCase().includes(query.toUpperCase()));
3737

3838
this.setState({
3939
filteredPlayers: players,

src/app/Draftboard/UndraftedAll.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import Undrafted from './Undrafted';
1414
ensure that the values are populated, we wait until the height is not undefined.
1515
*/
1616
function resizeUndraftedTable(): void {
17-
var gridHeight = document.getElementById('undrafted-positions')?.clientHeight;
18-
var undraftedHeaderHeight = document.getElementById('undrafted-header')?.clientHeight;
19-
var draftedHeaderHeight = document.getElementById('drafted-header')?.clientHeight;
20-
var undraftedTable = document.getElementsByClassName('undrafted-table')[0] as HTMLElement | null;
21-
var draftedTable = document.getElementsByClassName('drafted-table')[0] as HTMLElement | null;
17+
const gridHeight = document.getElementById('undrafted-positions')?.clientHeight;
18+
const undraftedHeaderHeight = document.getElementById('undrafted-header')?.clientHeight;
19+
const draftedHeaderHeight = document.getElementById('drafted-header')?.clientHeight;
20+
const undraftedTable = document.getElementsByClassName('undrafted-table')[0] as HTMLElement | null;
21+
const draftedTable = document.getElementsByClassName('drafted-table')[0] as HTMLElement | null;
2222
if (
2323
gridHeight != null &&
2424
undraftedTable != null &&

0 commit comments

Comments
 (0)