Skip to content

Commit

Permalink
Setup eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
MattyMay committed Oct 10, 2024
1 parent 1a8caeb commit e38cea2
Show file tree
Hide file tree
Showing 7 changed files with 4,891 additions and 3,459 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:vue/essential",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 12,
"parser": "@typescript-eslint/parser",
"sourceType": "module"
},
"plugins": [
"vue",
"@typescript-eslint"
],
"rules": {
"no-unused-vars": [ "off" ],
"@typescript-eslint/no-unused-vars": [ "off" ]
}
}
2 changes: 2 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
// }
//

/* eslint-disable @typescript-eslint/no-namespace */
declare namespace Cypress {
interface Chainable {
get_by_testid(selector: string, ...args): Chainable
}
}
/* eslint-enable @typescript-eslint/no-namespace */

Cypress.Commands.add('get_by_testid', (selector, ...args) => {
return cy.get(`[data-testid=${selector}]`, ...args)
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { mount } from 'cypress/vue2'
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
namespace Cypress {
namespace Cypress { //eslint-disable-line @typescript-eslint/no-namespace
interface Chainable {
mount: typeof mount
}
Expand All @@ -36,4 +36,4 @@ declare global {
Cypress.Commands.add('mount', mount)

// Example use:
// cy.mount(MyComponent)
// cy.mount(MyComponent)
2 changes: 1 addition & 1 deletion cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import './commands';
const { superuser, admin, staff, student } = Cypress.env();

declare global {
namespace Cypress {
namespace Cypress { //eslint-disable-line @typescript-eslint/no-namespace
interface Chainable {
/**
* Create a course by making a POST request to the API. Yields the primary
Expand Down
Loading

0 comments on commit e38cea2

Please sign in to comment.