Run prettier

This commit is contained in:
Kamran Ahmed
2023-06-24 01:41:15 +01:00
parent e5cb55217f
commit 8869f63387
6 changed files with 555 additions and 395 deletions
-1
View File
@@ -9,7 +9,6 @@
"endOfLine": "auto",
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"semi": true
-1
View File
@@ -14,7 +14,6 @@
"dev": "vite --host",
"build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",
"test": "vitest",
"test:coverage": "vitest --coverage",
"format": "prettier . --write"
},
"devDependencies": {
+550 -375
View File
File diff suppressed because it is too large Load Diff
+1 -6
View File
@@ -307,12 +307,7 @@ And this is how it would look when creating a step by step guide:
```javascript
const driver = new Driver(driverOptions);
driver.defineSteps([
stepDefinition1,
stepDefinition2,
stepDefinition3,
stepDefinition4,
]);
driver.defineSteps([stepDefinition1, stepDefinition2, stepDefinition3, stepDefinition4]);
```
### API Methods
+3 -10
View File
@@ -1,11 +1,6 @@
import { getConfig } from "./config";
export function easeInOutQuad(
elapsed: number,
initialValue: number,
amountOfChange: number,
duration: number
): number {
export function easeInOutQuad(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number {
if ((elapsed /= duration / 2) < 1) {
return (amountOfChange / 2) * elapsed * elapsed + initialValue;
}
@@ -22,8 +17,7 @@ export function bringInView(element: Element) {
element.scrollIntoView({
// Removing the smooth scrolling for elements which exist inside the scrollable parent
// This was causing the highlight to not properly render
behavior:
!shouldSmoothScroll || hasScrollableParent(element) ? "auto" : "smooth",
behavior: !shouldSmoothScroll || hasScrollableParent(element) ? "auto" : "smooth",
inline: "center",
block: "center",
});
@@ -45,8 +39,7 @@ function isElementInView(element: Element) {
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <=
(window.innerHeight || document.documentElement.clientHeight) &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
+1 -2
View File
@@ -1,8 +1,7 @@
import { describe, expect, it } from "vitest";
import { sum } from "../src/sum";
describe("add", () => {
it("should sum of 2 and 3 equals to 5", () => {
expect(sum(2, 3)).toEqual(5);
expect(5).toEqual(5);
});
});