Skip to content

Commit

Permalink
fix: Configure new @typescript-eslint rules after updating package
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklafrance committed Dec 16, 2024
1 parent 66064a9 commit d69100e
Show file tree
Hide file tree
Showing 11 changed files with 302 additions and 304 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-adults-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@workleap/eslint-plugin": patch
---

Configure new recommended @typescript-eslint rules after updating the package.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"changeset": "changeset",
"publish-pkg": "changeset publish",
"publish-pr-pkg": "pkg-pr-new publish ./packages/* --packageManager=pnpm --pnpm",
"clean": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf dist .turbo .rslib node_modules/.cache",
"clean": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf dist .turbo .rslib public/mockServiceWorker.js node_modules/.cache",
"reset": "pnpm -r --parallel --include-workspace-root exec pnpm dlx rimraf dist node_modules",
"list-outdated-deps": "pnpm outdated -r --format list !eslint !@types/eslint !typescript",
"update-outdated-deps": "pnpm update -r --latest !eslint !@types/eslint !typescript"
Expand All @@ -46,8 +46,8 @@
"@workleap/eslint-plugin": "workspace:*",
"@workleap/typescript-configs": "workspace:*",
"eslint": "8.57.0",
"knip": "5.39.4",
"pkg-pr-new": "0.0.35",
"knip": "5.40.0",
"pkg-pr-new": "0.0.37",
"prettier": "3.4.2",
"retypeapp": "3.6.0",
"syncpack": "13.0.0",
Expand Down
14 changes: 1 addition & 13 deletions packages/eslint-plugin/lib/config/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const config: Linter.Config = {
rules: {
// @typescript-eslint/recommended disables
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends", allowObjectTypes: "never" }],

// additional rules we want
"@typescript-eslint/consistent-type-definitions": "warn",
Expand All @@ -43,7 +44,6 @@ const config: Linter.Config = {
"@typescript-eslint/no-useless-constructor":"warn",
"object-curly-spacing":"off",
"quotes":"off",
// "@typescript-eslint/quotes": ["warn", "double"],
"@stylistic/ts/quotes": ["warn", "double"],
"@typescript-eslint/no-import-type-side-effects": "warn",
"@typescript-eslint/consistent-type-imports": [
Expand All @@ -55,19 +55,9 @@ const config: Linter.Config = {
}
],

// "@typescript-eslint/member-delimiter-style": "warn",
"@stylistic/ts/member-delimiter-style": "warn",
// "@typescript-eslint/comma-dangle": ["warn", "never"],
"@stylistic/ts/comma-dangle": ["warn", "never"],
"indent":"off",
// "@typescript-eslint/indent": [
// "warn",
// 4,
// {
// SwitchCase: 1,
// CallExpression: { arguments: "first" }
// }
// ],
"@stylistic/ts/indent": [
"warn",
4,
Expand All @@ -76,10 +66,8 @@ const config: Linter.Config = {
CallExpression: { arguments: "first" }
}
],
// "@typescript-eslint/object-curly-spacing": ["warn", "always"],
"@stylistic/ts/object-curly-spacing": ["warn", "always"],
"semi":"off",
// "@typescript-eslint/semi": ["warn", "always"]
"@stylistic/ts/semi": ["warn", "always"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-configs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"postcss-load-config": "^6.0.1",
"postcss-preset-env": "^10.1.1"
"postcss-preset-env": "^10.1.2"
},
"devDependencies": {
"@swc/core": "1.10.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/rsbuild-configs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@rsbuild/plugin-svgr": "^1.0.6"
},
"devDependencies": {
"@rsbuild/core": "1.1.9",
"@rsbuild/core": "1.1.10",
"@rspack/core": "1.1.6",
"@swc/core": "1.10.1",
"@swc/jest": "0.2.37",
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-configs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"react-refresh": "^0.16.0",
"style-loader": "^4.0.0",
"swc-loader": "^0.2.6",
"terser-webpack-plugin": "^5.3.10"
"terser-webpack-plugin": "^5.3.11"
},
"devDependencies": {
"@svgr/core": "8.1.0",
Expand Down
Loading

0 comments on commit d69100e

Please sign in to comment.