Skip to content

Commit

Permalink
refactor(eslint-config): replace eslint-plugin-deprecation with `@t…
Browse files Browse the repository at this point in the history
…ypescript-eslint/no-deprecated`
  • Loading branch information
zanminkian committed Nov 23, 2024
1 parent 7b93dbd commit 85d9acb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-dodos-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fenge/eslint-config": patch
---

refactor(eslint-config): replace `eslint-plugin-deprecation` with `@typescript-eslint/no-deprecated`
1 change: 0 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@typescript-eslint/eslint-plugin": "8.15.0",
"@typescript-eslint/parser": "8.15.0",
"confusing-browser-globals": "1.0.11",
"eslint-plugin-deprecation": "3.0.0",
"eslint-plugin-es-x": "8.4.1",
"eslint-plugin-esm": "workspace:*",
"eslint-plugin-fp": "2.3.0",
Expand Down
5 changes: 1 addition & 4 deletions packages/eslint-config/src/config/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import process from "node:process";
import * as fengeTsPlugin from "@fenge/eslint-plugin-ts";
import tsParser from "@typescript-eslint/parser";
import deprecationPlugin from "eslint-plugin-deprecation"; // TODO: Remove this plugin and use `@typescript-eslint/no-deprecated` when eslint upgraded to 9.
import { javascript } from "./javascript.js";

export function typescript(project?: string) {
Expand Down Expand Up @@ -89,15 +88,12 @@ export function typescript(project?: string) {
},
plugins: {
...jsConfig.plugins,
deprecation: deprecationPlugin,
"@fenge-ts": fengeTsPlugin,
},
rules: {
...jsConfig.rules,
...getTsExtensionRules(),

// deprecation
"deprecation/deprecation": "error",
// fenge
"@fenge-ts/exact-map-set-type": "error",
"@fenge-ts/no-const-enum": "error",
Expand Down Expand Up @@ -160,6 +156,7 @@ export function typescript(project?: string) {
{ ignoredTypeNames: [] },
],
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-empty-object-type": "error",
Expand Down

0 comments on commit 85d9acb

Please sign in to comment.