Skip to content

Commit bb82fd0

Browse files
committed
fix formatting
1 parent 19e0415 commit bb82fd0

File tree

6 files changed

+39
-57
lines changed

6 files changed

+39
-57
lines changed

typescript/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"bracketSpacing": false,
5+
"arrowParens": "avoid"
6+
}

typescript/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ This workspace is configured for solving LeetCode problems in TypeScript.
44

55
## Setup
66
- **Vitest** for testing and test runner
7-
- **Biome** for fast linting and formatting
7+
- **ESLint** with TypeScript support for code quality
8+
- **Prettier** for consistent code formatting
89
- **TypeScript** for type safety and modern JavaScript features
910

1011
## Prerequisites
@@ -73,6 +74,8 @@ npx vitest
7374
npx tsc --noEmit
7475

7576
# Lint and format code
76-
npm run lint
77-
npm run format
77+
npm run lint # Check for linting issues
78+
npm run lint:fix # Fix linting issues automatically
79+
npm run format # Format code with Prettier
80+
npm run format:check # Check if code is formatted
7881
```

typescript/biome.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

typescript/package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@
55
"type": "module",
66
"scripts": {
77
"test": "vitest run",
8-
"lint": "biome check .",
9-
"format": "biome format --write ."
8+
"lint": "eslint . --ext .ts",
9+
"lint:fix": "eslint . --ext .ts --fix",
10+
"format": "prettier --write .",
11+
"format:check": "prettier --check ."
1012
},
1113
"devDependencies": {
1214
"@types/node": "^24.1.0",
15+
"@typescript-eslint/eslint-plugin": "^8.0.0",
16+
"@typescript-eslint/parser": "^8.0.0",
17+
"eslint": "^9.0.0",
18+
"eslint-config-prettier": "^9.0.0",
19+
"eslint-plugin-prettier": "^5.0.0",
20+
"prettier": "^3.0.0",
1321
"typescript": "^5.8.3",
14-
"@biomejs/biome": "^1.9.4",
1522
"vitest": "^1.0.0"
1623
}
1724
}

typescript/problem_0015/3Sum.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,4 @@ const threeSum = (nums: number[]) => {
4747
};
4848

4949
const testInput = [-2, 0, 0, 2, 2];
50-
// const input = [-1,0,1,2,-1,-4];
5150
threeSum(testInput);

typescript/tsconfig.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
2-
"compilerOptions": {
3-
"target": "ES2022",
4-
"module": "ES2022",
5-
"moduleResolution": "node",
6-
"allowImportingTsExtensions": true,
7-
"noEmit": true,
8-
"esModuleInterop": true,
9-
"strict": true,
10-
"skipLibCheck": true,
11-
"forceConsistentCasingInFileNames": true
12-
},
13-
"include": ["**/*.ts"],
14-
"exclude": ["node_modules"]
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ES2022",
5+
"moduleResolution": "node",
6+
"allowImportingTsExtensions": true,
7+
"noEmit": true,
8+
"esModuleInterop": true,
9+
"strict": true,
10+
"skipLibCheck": true,
11+
"forceConsistentCasingInFileNames": true
12+
},
13+
"include": [
14+
"**/*.ts"
15+
],
16+
"exclude": [
17+
"node_modules"
18+
]
1519
}

0 commit comments

Comments
 (0)