Skip to content

Commit

Permalink
Chore/adjust cypress lint rules (#1832)
Browse files Browse the repository at this point in the history
* chore: update dependencies and add Cypress ESLint configuration

- Update various dependencies to latest versions
- Add dedicated Cypress ESLint configuration file
- Add Cypress ESLint plugin to dev dependencies
- Reorganize npm scripts to include Cypress linting

* chore: adjust linting from cypress files

* chore: run lint for files after eslint upgrade

* chore: run lint for files after eslint upgrade

* chore: remove Cypress lint step from GitHub Actions workflow

* chore: update Cypress import paths and ESLint configuration

* chore: remove separate eslint file for cypress

---------

Co-authored-by: Olavo Parno <[email protected]>
  • Loading branch information
olavoparno and Olavo Parno authored Feb 10, 2025
1 parent 8a12c1d commit 56cc017
Show file tree
Hide file tree
Showing 33 changed files with 2,732 additions and 1,135 deletions.
32 changes: 19 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module.exports = {
'react/no-unescaped-entities': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{
Expand All @@ -57,18 +58,6 @@ module.exports = {
],
'@typescript-eslint/no-namespace': 'off',
'no-relative-import-paths/no-relative-import-paths': ['error', { allowSameFolder: true }],
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: 'useLoadingCallback',
},
],
'simple-import-sort/imports': ['warn', sortImports],
'simple-import-sort/exports': 'warn',
'import/first': 'warn',
'import/newline-after-import': 'warn',
curly: ['error', 'multi-line'],
'import/no-duplicates': 'error',
'no-restricted-imports': [
'error',
{
Expand All @@ -85,6 +74,23 @@ module.exports = {
],
},
],
'@typescript-eslint/no-floating-promises': 'error',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: 'useLoadingCallback',
},
],
'simple-import-sort/imports': ['warn', sortImports],
'simple-import-sort/exports': 'warn',
'import/first': 'warn',
'import/newline-after-import': 'warn',
curly: ['error', 'multi-line'],
'import/no-duplicates': 'error',
'import/no-restricted-paths': [
'error',
{
zones: [{ target: './cypress', from: './src' }],
},
],
},
}
2 changes: 1 addition & 1 deletion cypress/e2e/08-action-call-your-congressperson.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="cypress" />

import { GoogleCivicInfoOfficial, GoogleCivicInfoResponse } from '@/utils/shared/googleCivicInfo'
import { GoogleCivicInfoOfficial, GoogleCivicInfoResponse } from 'cypress/utils/googleCivicInfo'

it.skip('action - call your congressperson', () => {
cy.viewport('iphone-6')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/11-action-mint-your-supporter-nft.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="cypress" />

import { mockRandomUser } from 'cypress/fixture/mocks'
import { mockRandomUser } from 'cypress/mocks'

describe('action - mint your supporter NFT', () => {
it.skip('should go through signing in and nft minting', () => {
Expand Down
Loading

0 comments on commit 56cc017

Please sign in to comment.