Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Pretty Quick #507

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kata/7 kyu/convert-a-linked-list-to-a-string/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
class Node {
constructor(public data: number, public next: Node | null = null) {
constructor(
public data: number,
public next: Node | null = null,
) {
this.data = data;
this.next = next;
}
Expand Down
5 changes: 4 additions & 1 deletion kata/7 kyu/fixme-get-full-name/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/* eslint-disable no-useless-constructor */

class Dinglemouse {
constructor(private firstName: string, private lastName: string) {}
constructor(
private firstName: string,
private lastName: string,
) {}

getFullName() {
return `${this.firstName} ${this.lastName}`.trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ class Cat extends Animal {
}

class Dog extends Animal {
constructor(name: string, age: number, status: string, private master: string) {
constructor(
name: string,
age: number,
status: string,
private master: string,
) {
super(name, age, 4, 'dog', status);

this.master = master;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class Point {
// eslint-disable-next-line no-useless-constructor
constructor(public x: number, public y: number) {}
constructor(
public x: number,
public y: number,
) {}
}

function distanceBetweenPoints(a: Point, b: Point): number {
Expand Down
5 changes: 4 additions & 1 deletion kata/8 kyu/object-oriented-piracy/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
class Ship {
constructor(private draft: number, private crew: number) {
constructor(
private draft: number,
private crew: number,
) {
this.draft = draft;
this.crew = crew;
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"lint:js": "eslint --cache --ignore-path .gitignore .",
"lint": "npm run lint:js",
"prepare": "husky",
"pretty-quick": "pretty-quick --staged",
"test": "vitest",
"test:ci": "vitest run --coverage",
"update": "npx npm-check-updates --format group --interactive"
Expand Down
Loading