diff --git a/.babelrc.js b/.babelrc.js
deleted file mode 100644
index 70cd65128..000000000
--- a/.babelrc.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = (api) => {
- // This caches the Babel config
- api.cache.using(() => process.env.NODE_ENV)
- return {
- presets: ['@babel/preset-env', ['@babel/preset-react', { runtime: 'automatic' }]],
- plugins: [
- '@babel/plugin-syntax-dynamic-import',
- ['babel-plugin-styled-components', { displayName: true }],
- [
- 'prismjs',
- {
- languages: ['javascript', 'bash'],
- plugins: ['line-numbers'],
- theme: 'default',
- css: true,
- },
- ],
- ...(api.env('development') && ['react-refresh/babel']),
- ].filter(Boolean),
- }
-}
diff --git a/.gitignore b/.gitignore
index ff6621b4a..343bdbee6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@ dist
.env
yarn-error.log
coverage
-cypress/downloads
\ No newline at end of file
+cypress/downloads
+.swc/
diff --git a/__mocks__/styleMock.js b/__mocks__/styleMock.cjs
similarity index 100%
rename from __mocks__/styleMock.js
rename to __mocks__/styleMock.cjs
diff --git a/__mocks__/svgMock.js b/__mocks__/svgMock.cjs
similarity index 100%
rename from __mocks__/svgMock.js
rename to __mocks__/svgMock.cjs
diff --git a/cypress/cypress.config.js b/cypress/cypress.config.js
index 4c75703ae..10f5ed71d 100644
--- a/cypress/cypress.config.js
+++ b/cypress/cypress.config.js
@@ -1,9 +1,10 @@
-const { defineConfig } = require('cypress')
-const fs = require('fs')
+import { defineConfig } from 'cypress'
+import dotenv from 'dotenv'
+import fs from 'node:fs'
-require('dotenv').config({ path: '../.env' })
+dotenv.config({ path: '../.env' })
-module.exports = defineConfig({
+export default defineConfig({
projectId: 'u863yi',
retries: 3,
e2e: {
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts
deleted file mode 100644
index 0bb1cacf8..000000000
--- a/cypress/support/commands.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-///
-import { userEmail, userPassword } from './reusableConstants'
-
-// ***********************************************
-// This example commands.ts shows you how to
-// create various custom commands and overwrite
-// existing commands.
-//
-// For more comprehensive examples of custom
-// commands please read more here:
-// https://on.cypress.io/custom-commands
-// ***********************************************
-//
-//
-// -- This is a parent command --
-// Cypress.Commands.add('login', (email, password) => { ... })
-//
-//
-// -- This is a child command --
-// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
-//
-//
-// -- This is a dual command --
-// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
-//
-//
-// -- This will overwrite an existing command --
-// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
-//
-// declare global {
-// namespace Cypress {
-// interface Chainable {
-// login(email: string, password: string): Chainable
-// drag(subject: string, options?: Partial): Chainable
-// dismiss(subject: string, options?: Partial): Chainable
-// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable
-// }
-// }
-// }
-
-Cypress.Commands.add('login', (email: string = userEmail, password: string = userPassword) => {
- cy.visit('/login')
- cy.get('input[name="email"]').type(email)
- cy.get('input[name="password"]').type(password)
- cy.get('[data-test="submit"]').click()
- cy.url().should('be.equal', Cypress.config().baseUrl + '/')
-})
-
-// https://docs.cypress.io/api/cypress-api/custom-commands#Overwrite-type-command
-// @ts-ignore
-Cypress.Commands.overwrite('type', (originalFn, element, text, options) => {
- // @ts-ignore
- return originalFn(element, text, { ...options, delay: 0 })
-})
diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts
index 565d1e21c..e5e65bfac 100644
--- a/cypress/support/e2e.ts
+++ b/cypress/support/e2e.ts
@@ -13,9 +13,23 @@
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
-import './commands'
import { userEmail, userPassword } from './reusableConstants'
+Cypress.Commands.add('login', (email = userEmail, password = userPassword) => {
+ cy.visit('/login')
+ cy.get('input[name="email"]').type(email)
+ cy.get('input[name="password"]').type(password)
+ cy.get('[data-test="submit"]').click()
+ cy.url().should('be.equal', Cypress.config().baseUrl + '/')
+})
+
+// https://docs.cypress.io/api/cypress-api/custom-commands#Overwrite-type-command
+// @ts-ignore
+Cypress.Commands.overwrite('type', (originalFn, element, text, options) => {
+ // @ts-ignore
+ return originalFn(element, text, { ...options, delay: 0 })
+})
+
beforeEach(() => {
// Allow access to broswer's clipboard api
Cypress.automation('remote:debugger:protocol', {
diff --git a/eslint.config.mjs b/eslint.config.mjs
index ea6c45b21..9169b2549 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -95,10 +95,16 @@ export default [
},
},
{
- files: ['**/*.js'],
+ files: ['**/*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
+ {
+ files: ['vite.config.ts', 'scripts/**/*.js'],
+ rules: {
+ 'import/order': 'off',
+ },
+ },
pluginPrettier,
]
diff --git a/src/index.html b/index.html
similarity index 81%
rename from src/index.html
rename to index.html
index 9ed7a82b5..24c8c4064 100644
--- a/src/index.html
+++ b/index.html
@@ -16,10 +16,12 @@
/>
- <%= htmlWebpackPlugin.options.title %>
+ <%- title %>
+
+