Skip to content

Commit e504b83

Browse files
authored
Merge pull request webdevcody#653 from devhiko/main
Fix eslint errors and auth error
2 parents a43cad2 + 28daaea commit e504b83

File tree

30 files changed

+105
-102
lines changed

30 files changed

+105
-102
lines changed

packages/app/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
"jsx-a11y/anchor-is-valid": "off",
1818
"no-unused-vars": "warn",
1919
"@typescript-eslint/no-empty-interface": "warn",
20+
"@typescript-eslint/no-explicit-any": "warn",
2021

2122
"import/extensions": 0,
2223
"import/no-extraneous-dependencies": 0,
2324
"import/prefer-default-export": 0
2425
}
25-
}
26+
}

packages/app/cypress.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable @typescript-eslint/no-unused-vars */
2+
/* eslint-disable no-unused-vars */
13
import { defineConfig } from "cypress";
24

35
export default defineConfig({
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
describe('ComponentName.cy.tsx', () => {
2-
it('playground', () => {
1+
describe("ComponentName.cy.tsx", () => {
2+
it("playground", () => {
33
// cy.mount()
44
})
55
})

packages/app/cypress/e2e/business-layer/raceBL.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { RacePage } from "../page-objects/pages/RacePage";
22
export class RaceBL {
33

4+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
45
public static runTypingRace(spans: any): RacePage{
56
const NEW_LINE = "⏎\n";
67
let code = "";
@@ -23,7 +24,7 @@ export class RaceBL {
2324
isIndentWhiteSpace = true;
2425
}
2526
}
26-
cy.get('[data-cy="race-practice-input"]').type(code, {
27+
cy.get("[data-cy=\"race-practice-input\"]").type(code, {
2728
force: true,
2829
parseSpecialCharSequences: false,
2930
delay: 30,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './NavbarComponent'
1+
export * from "./NavbarComponent";
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export class ContributorsPage{
22

3-
contributorCard(): Cypress.Chainable{ return cy.get('[data-cy="contributor-card"]') }
4-
contributorName(): Cypress.Chainable{ return cy.get('[data-cy="contributor-name"]') }
5-
commitDisplay(): Cypress.Chainable{ return cy.get('[data-cy="github-commit-display"]') }
6-
commitLink(): Cypress.Chainable{ return cy.get('[data-cy="github-commit-link"]') }
3+
contributorCard(): Cypress.Chainable{ return cy.get("[data-cy=\"contributor-card\"]") }
4+
contributorName(): Cypress.Chainable{ return cy.get("[data-cy=\"contributor-name\"]") }
5+
commitDisplay(): Cypress.Chainable{ return cy.get("[data-cy=\"github-commit-display\"]") }
6+
commitLink(): Cypress.Chainable{ return cy.get("[data-cy=\"github-commit-link\"]") }
77

88
public contributorCardText(contributorCard: Cypress.Chainable): Cypress.Chainable{
9-
return contributorCard.find('[data-cy="contributor-name"]').invoke('text')
9+
return contributorCard.find("[data-cy=\"contributor-name\"]").invoke("text")
1010
}
1111
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export class LeaderboardPage{
22

3-
userRow(): Cypress.Chainable{ return cy.get('.table-row') }
4-
user(): Cypress.Chainable{ return cy.get('.flex.items-center.gap-2') }
5-
rowDropdown(): Cypress.Chainable{ return cy.get('[role="combobox"]') }
3+
userRow(): Cypress.Chainable{ return cy.get(".table-row") }
4+
user(): Cypress.Chainable{ return cy.get(".flex.items-center.gap-2") }
5+
rowDropdown(): Cypress.Chainable{ return cy.get("[role=\"combobox\"]") }
66

7-
rowDropdownElement(): Cypress.Chainable{ return cy.get('[role="option"]') }
7+
rowDropdownElement(): Cypress.Chainable{ return cy.get("[role=\"option\"]") }
88
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from './ContributorsPage'
2-
export * from './RacePage'
3-
export * from './LeaderboardPage'
1+
export * from "./ContributorsPage"
2+
export * from "./LeaderboardPage"
3+
export * from "./RacePage"

packages/app/cypress/e2e/tests/TestContributerPage.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ beforeEach(() => {
1515

1616
it("can hover on contributor card and display recent commits", () => {
1717
contributorsPage.contributorCard().first().focus();
18-
contributorsPage.commitDisplay().should('be.visible');
18+
contributorsPage.commitDisplay().should("be.visible");
1919
});
2020

2121
it("can click on contributor card and redirected to github profile page", () => {
@@ -25,8 +25,8 @@ it("can click on contributor card and redirected to github profile page", () =>
2525
contributorsPage.contributorCardText(cy.get("@contributor-card")).then((contributorName) => {
2626
// Check if contributor card's href contains contributor name
2727
cy.get("@contributor-card")
28-
.should('have.attr', 'href')
29-
.and('include', contributorName);
28+
.should("have.attr", "href")
29+
.and("include", contributorName);
3030

3131
// Cypress does not support multi tab
3232
cy.get("@contributor-card")

packages/app/prisma/seed.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { PrismaClient, type Notification, Achievement, AchievementType } from "@prisma/client";
1+
import { PrismaClient } from "@prisma/client";
22
import snippets from "./seed-data/snippets";
33
import usersSeed from "./seed-data/users.seed";
44

5-
65
const prisma = new PrismaClient();
76

87
async function main() {

0 commit comments

Comments
 (0)