-
Notifications
You must be signed in to change notification settings - Fork 1
remove biome, update eslint + ts configs #192
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
// This configuration only applies to the package manager root. | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: ["@repo/eslint-config/library.js"], | ||
extends: ["@repo/config-eslint/base.js"], | ||
ignorePatterns: ["apps/**", "packages/**"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
root: true, | ||
rules: { | ||
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], | ||
"no-unused-vars": "off", | ||
}, | ||
}; |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: ["@repo/config-eslint/web.js"], | ||
root: true, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": false, | ||
"allowSyntheticDefaultImports": true, | ||
"baseUrl": ".", | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"jsx": "react-jsx", | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"paths": { | ||
"@assets/*": [ | ||
"src/assets/*" | ||
], | ||
"@pages/*": [ | ||
"src/pages/*" | ||
], | ||
"@src/*": [ | ||
"src/*" | ||
] | ||
}, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "esnext", | ||
"types": [ | ||
"vite/client", | ||
"node", | ||
"chrome" | ||
] | ||
}, | ||
"extends": "@repo/config-typescript/web-app.json", | ||
"ignore": [ | ||
"public" | ||
], | ||
"include": [ | ||
"src", | ||
"utils", | ||
"vite.config.ts" | ||
], | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
{ | ||
"name": "harlighter", | ||
"private": true, | ||
"scripts": { | ||
"build": "turbo build", | ||
"dev": "turbo dev" | ||
"dependencies": { | ||
"@repo/reactor": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@repo/eslint-config": "workspace:*", | ||
"@repo/typescript-config": "workspace:*", | ||
"prettier": "^3.2.5", | ||
"turbo": "1.13.3" | ||
"@repo/config-eslint": "workspace:*", | ||
"@repo/config-prettier": "workspace:*", | ||
"@repo/config-typescript": "workspace:*", | ||
"turbo": "latest" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"dependencies": { | ||
"@repo/reactor": "workspace:*" | ||
"name": "harlighter", | ||
"packageManager": "[email protected]", | ||
"private": true, | ||
"scripts": { | ||
"build": "turbo build", | ||
"dev": "turbo dev", | ||
"format": "turbo format", | ||
"lint": "turbo lint" | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# `@turbo/eslint-config` | ||
# `@turbo/config-eslint` | ||
|
||
Collection of internal eslint configurations. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
const { resolve } = require("node:path"); | ||
|
||
const project = resolve(process.cwd(), "tsconfig.json"); | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: [ | ||
"eslint:recommended", | ||
"prettier", | ||
require.resolve("@vercel/style-guide/eslint/next"), | ||
"eslint-config-turbo", | ||
"eslint-config-prettier", | ||
"prettier", | ||
], | ||
ignorePatterns: [ | ||
// Ignore dotfiles | ||
".*.js", | ||
"node_modules/", | ||
"dist/", | ||
], | ||
globals: { | ||
React: true, | ||
JSX: true, | ||
overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
env: { | ||
node: true, | ||
browser: true, | ||
plugins: ["only-warn", "@typescript-eslint/eslint-plugin"], | ||
rules: { | ||
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], | ||
"no-unused-vars": "off", | ||
}, | ||
plugins: ["only-warn"], | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: ["•js", ".jsx,", ".ts", ".tsx"], | ||
}, | ||
typescript: { | ||
project, | ||
}, | ||
}, | ||
}, | ||
ignorePatterns: [ | ||
// Ignore dotfiles | ||
".*.js", | ||
"node_modules/", | ||
], | ||
overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"devDependencies": { | ||
"@eslint/js": "latest", | ||
"@typescript-eslint/eslint-plugin": "latest", | ||
"@typescript-eslint/parser": "latest", | ||
"eslint": "latest", | ||
"eslint-config-turbo": "^1.13.4", | ||
"eslint-plugin-only-warn": "^1.1.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
Comment on lines
+2
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider pinning dependency versions for better reproducibility. While using "latest" for dependencies allows you to always have the most recent updates, it can lead to unexpected breaking changes and make builds less reproducible. Consider pinning all dependency versions to specific numbers. Here's a suggested change: {
"devDependencies": {
- "@eslint/js": "latest",
- "@typescript-eslint/eslint-plugin": "latest",
- "@typescript-eslint/parser": "latest",
- "eslint": "latest",
+ "@eslint/js": "^8.56.0",
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
+ "@typescript-eslint/parser": "^6.21.0",
+ "eslint": "^8.56.0",
"eslint-config-turbo": "^1.13.4",
"eslint-plugin-only-warn": "^1.1.0",
"typescript": "^5.3.3"
},
...
} Note: The versions I've suggested are the latest as of my knowledge cutoff. Please verify and use the most recent stable versions when implementing this change.
|
||
"files": [ | ||
"web.js", | ||
"base.js" | ||
], | ||
Comment on lines
+11
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Duplicate Both Analysis chainVerify the existence of configuration files. The package includes "web.js" and "base.js" files. Please ensure these files exist in the repository and contain the appropriate ESLint configurations. Let's verify the existence of these files: Verify the contents of configuration files. Please ensure that "web.js" and "base.js" contain the correct ESLint configurations. Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if web.js and base.js exist in the packages/config-eslint directory
# Test: Check for the existence of web.js and base.js
fd -p "packages/config-eslint/(web|base).js"
Length of output: 107 Script: #!/bin/bash
# Description: Output the contents of web.js and base.js for verification
cat packages/config-eslint/web.js packages/config-eslint/base.js
Length of output: 1447 |
||
"name": "@repo/config-eslint", | ||
"private": true, | ||
"version": "1.0.0" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Biome configurations still present in the codebase.
Please ensure that all references to biome have been removed or are intentional:
biome.json
packages/reactor/utils.ts
packages/reactor/main.ts
packages/reactor/modifications.ts
packages/reactor/tests/main.test.ts
Analysis chain
Verify complete removal of biome.
The changes in this file align well with the PR objectives. However, to ensure a complete transition from biome to ESLint and updated TypeScript configs:
Run the following script to check for any remaining biome configurations:
If any results are found, ensure that these are intentional or remove them as part of this PR.
Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 759