Skip to content

Commit

Permalink
Add cypress settings to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrosen14 committed Nov 21, 2024
1 parent da4514c commit f8297be
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"browser": true,
"node": true,
"es2021": true,
"jest/globals": true
"jest/globals": true,
"cypress/globals": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"react-app",
"plugin:jsx-a11y/recommended"
"plugin:jsx-a11y/recommended",
"plugin:cypress/recommended"
],
"globals": {
"process": true
Expand All @@ -30,7 +32,7 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "jest", "jsx-a11y"],
"plugins": ["react", "react-hooks", "jest", "jsx-a11y", "cypress"],
"rules": {
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/us/home.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('PolicyEngine Homepage', () => {
checkCountryRedirect('us', regexArg)
})

it('should redirect from root to US homepage by if browser language is en-US', () => {
it('should redirect from root to US homepage if browser language is en-US', () => {
Object.defineProperty(window.navigator, 'language', {
value: 'en-US',
configurable: true
Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"cypress": "^13.16.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-plugin-cypress": "^4.1.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function Section({
alignItems: centeredTitle ? "center" : "baseline",
}}
>
<h2 id={id}style={{ color: "inherit", ...titleStyle }}>
<h2 id={id} style={{ color: "inherit", ...titleStyle }}>
{title}
</h2>
</div>
Expand Down

0 comments on commit f8297be

Please sign in to comment.