Skip to content

Commit

Permalink
Updated Prettier to v3.0.0 (#2949)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Perez <[email protected]>
  • Loading branch information
bexsoft authored Jul 18, 2023
1 parent a062a59 commit 35907be
Show file tree
Hide file tree
Showing 225 changed files with 1,012 additions and 1,006 deletions.
2 changes: 1 addition & 1 deletion portal-ui/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ console.log("add babel plugin");

module.exports = override(
process.env.USE_BABEL_PLUGIN_ISTANBUL &&
addBabelPlugins("babel-plugin-istanbul")
addBabelPlugins("babel-plugin-istanbul"),
);
4 changes: 2 additions & 2 deletions portal-ui/e2e/buckets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test("invalid bucket name", async ({ page }) => {
await page.getByRole("button", { name: "View Bucket Naming Rules" }).click();
await expect(
page.getByText(
"Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphe"
)
"Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphe",
),
).toBeTruthy();
});
16 changes: 8 additions & 8 deletions portal-ui/e2e/fixtures/baseFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export const test = baseTest.extend({
await context.addInitScript(() =>
window.addEventListener("beforeunload", () =>
(window as any).collectIstanbulCoverage(
JSON.stringify((window as any).__coverage__)
)
)
JSON.stringify((window as any).__coverage__),
),
),
);
await fs.promises.mkdir(istanbulCLIOutput, { recursive: true });
await context.exposeFunction(
Expand All @@ -41,18 +41,18 @@ export const test = baseTest.extend({
fs.writeFileSync(
path.join(
istanbulCLIOutput,
`playwright_coverage_${generateUUID()}.json`
`playwright_coverage_${generateUUID()}.json`,
),
coverageJSON
coverageJSON,
);
}
},
);
await use(context);
for (const page of context.pages()) {
await page.evaluate(() =>
(window as any).collectIstanbulCoverage(
JSON.stringify((window as any).__coverage__)
)
JSON.stringify((window as any).__coverage__),
),
);
}
},
Expand Down
4 changes: 2 additions & 2 deletions portal-ui/e2e/lifecycle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test.describe("Add Lifecycle Rule Modal in bucket settings tests for object vers
await test.step("Clean up bucket and verify the clean up", async () => {
await bucketSummaryPage.confirmDeleteBucket();
const existBukCount = await bucketListPage.isBucketExist(
versionedBucketName
versionedBucketName,
);
await expect(existBukCount).toEqual(0);
});
Expand Down Expand Up @@ -105,7 +105,7 @@ test.describe("Add Lifecycle Rule Modal in bucket settings tests for object vers
await test.step("Clean up bucket and verify the clean up", async () => {
await bucketSummaryPage.confirmDeleteBucket();
const existBukCount = await bucketListPage.isBucketExist(
nonVersionedBucketName
nonVersionedBucketName,
);
await expect(existBukCount).toEqual(0);
});
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/e2e/policies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test("Can create a policy", async ({ page }) => {
await page
.locator("#code_wrapper")
.fill(
'{\n "Version": "2012-10-17",\n "Statement": [\n {\n "Effect": "Allow",\n "Action": [\n "s3:*"\n ],\n "Resource": [\n "arn:aws:s3:::bucket1/*",\n "arn:aws:s3:::bucket2/*",\n "arn:aws:s3:::bucket3/*",\n "arn:aws:s3:::bucket4/*"\n ]\n },\n {\n "Effect": "Deny",\n "Action": [\n "s3:DeleteBucket"\n ],\n "Resource": [\n "arn:aws:s3:::*"\n ]\n }\n ]\n}\n'
'{\n "Version": "2012-10-17",\n "Statement": [\n {\n "Effect": "Allow",\n "Action": [\n "s3:*"\n ],\n "Resource": [\n "arn:aws:s3:::bucket1/*",\n "arn:aws:s3:::bucket2/*",\n "arn:aws:s3:::bucket3/*",\n "arn:aws:s3:::bucket4/*"\n ]\n },\n {\n "Effect": "Deny",\n "Action": [\n "s3:DeleteBucket"\n ],\n "Resource": [\n "arn:aws:s3:::*"\n ]\n }\n ]\n}\n',
);
await page.getByRole("button", { name: "Save" }).click();
await expect(page.getByRole("gridcell", { name: policyName })).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/e2e/pom/BucketsListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class BucketsListPage {

locateBucket(bucketName: string): Locator {
const bucketRow = this.getLocator(
`${this.bucketListItemPrefix}${bucketName}`
`${this.bucketListItemPrefix}${bucketName}`,
);
return bucketRow;
}
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"customize-cra": "^1.0.0",
"minio": "^7.1.1",
"nyc": "^15.1.0",
"prettier": "2.8.8",
"prettier": "3.0.0",
"react-app-rewire-hot-loader": "^2.0.1",
"react-app-rewired": "^2.2.1",
"react-scripts": "5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/src/MainRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { baseUrl } from "./history";
const Login = React.lazy(() => import("./screens/LoginPage/Login"));
const Logout = React.lazy(() => import("./screens/LogoutPage/LogoutPage"));
const LoginCallback = React.lazy(
() => import("./screens/LoginPage/LoginCallback")
() => import("./screens/LoginPage/LoginCallback"),
);

const MainRouter = () => {
Expand Down
6 changes: 3 additions & 3 deletions portal-ui/src/ProtectedRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const ProtectedRoute = ({ Component }: ProtectedRouteProps) => {
const userLoggedIn = useSelector((state: AppState) => state.system.loggedIn);
const [componentLoading, setComponentLoading] = useState<boolean>(true);
const sessionLoadingState = useSelector(
(state: AppState) => state.console.sessionLoadingState
(state: AppState) => state.console.sessionLoadingState,
);
const anonymousMode = useSelector(
(state: AppState) => state.system.anonymousMode
(state: AppState) => state.system.anonymousMode,
);
const { pathname = "" } = useLocation();

Expand Down Expand Up @@ -87,7 +87,7 @@ const ProtectedRoute = ({ Component }: ProtectedRouteProps) => {
(err: ErrorResponseHandler) => {
// we will fail this call silently, but show it on the console
console.error(`Error loading site replication status`, err);
}
},
);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/src/StyleHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IStyleHandler {

const StyleHandler = ({ children }: IStyleHandler) => {
const colorVariants = useSelector(
(state: AppState) => state.system.overrideStyles
(state: AppState) => state.system.overrideStyles,
);

let thm = undefined;
Expand Down
Loading

0 comments on commit 35907be

Please sign in to comment.