Skip to content

Commit

Permalink
fix linting issues, especially with Cypress directories (#5189)
Browse files Browse the repository at this point in the history
  • Loading branch information
gilluminate authored Aug 14, 2024
1 parent b269f01 commit 508aab9
Show file tree
Hide file tree
Showing 27 changed files with 1,387 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"eslint.workingDirectories": [
"./clients",
"./clients/admin-ui",
"./clients/admin-ui/cypress",
"./clients/fides-js",
"./clients/fidesui",
"./clients/privacy-center",
"./clients/privacy-center/cypress",
"./clients/cypress-e2e",
"./clients/sample-app"
],
Expand Down
1 change: 1 addition & 0 deletions clients/admin-ui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ public/**/*.js
next.config.js
jest.config.js
cypress.config.ts
.eslintrc*
1 change: 0 additions & 1 deletion clients/admin-ui/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig } from "cypress";

export default defineConfig({
Expand Down
1 change: 1 addition & 0 deletions clients/admin-ui/cypress/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.eslintrc.*
14 changes: 12 additions & 2 deletions clients/admin-ui/cypress/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
module.exports = {
extends: ["plugin:cypress/recommended"],
plugins: ["no-only-tests", "cypress"],
extends: ["plugin:cypress/recommended", "plugin:prettier/recommended"],
plugins: [
"no-only-tests",
"cypress",
"simple-import-sort",
"@typescript-eslint",
"import",
],
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
rules: {
"no-only-tests/no-only-tests": "error",
"cypress/unsafe-to-chain-command": "off",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"prettier/prettier": "warn",
},
};
2 changes: 1 addition & 1 deletion clients/admin-ui/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"~/*": ["src/*"]
}
},
"include": ["**/*.ts", "**/*.tsx", "../cypress.config.ts"]
"include": ["**/*.ts", "**/*.tsx"]
}
7 changes: 1 addition & 6 deletions clients/admin-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,5 @@
"**/*.d.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules",
"cypress/**/*.ts",
"cypress/**/*.tsx",
"cypress.config.ts"
]
"exclude": ["node_modules", "cypress", "./cypress.config.ts"]
}
1 change: 1 addition & 0 deletions clients/cypress-e2e/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.eslintrc.*
14 changes: 14 additions & 0 deletions clients/cypress-e2e/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
extends: ["plugin:cypress/recommended"],
plugins: ["no-only-tests", "cypress"],
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
rules: {
"no-only-tests/no-only-tests": "error",
"cypress/unsafe-to-chain-command": "off",
},
};
1 change: 0 additions & 1 deletion clients/cypress-e2e/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ declare global {
* @example cy.getToggle().should("be.checked");
*/
getToggle(
value?: string,
options?: Partial<
Cypress.Loggable &
Cypress.Timeoutable &
Expand Down
Loading

0 comments on commit 508aab9

Please sign in to comment.