diff --git a/README.md b/README.md index 59d29ba..032bb2f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +> [!WARNING] +> **⚠️ This package is deprecated.** TypeScript ESLint support is now built into [`@hs-web-team/eslint-config-node`](https://www.npmjs.com/package/@hs-web-team/eslint-config-node) for both Node.js and browser/React projects. Please migrate — see the [migration guide](#migrating-to-eslint-config-node) below. + +--- + # Hubspot Marketing WebTeam ESLint rules for TypeScript This is a list of TypeScript rules that are recommended for use with Hubspot Marketing WebTeam projects. @@ -11,6 +16,7 @@ https://www.npmjs.com/package/@hs-web-team/eslint-config-ts - [Setup](#setup) - [Migrating from an exisiting .eslint config](#migrating-from-an-existing-eslint-config) - [Where to use it](#where-to-use-it) +- [Migrating to eslint-config-node](#migrating-to-eslint-config-node) ## Introduction @@ -62,3 +68,47 @@ or when used with the browser/node rules: ## Where to use it This package is intended to be used in projects that use TypeScript, in conjunction with either the Node or Browser linting packages. + +--- + +## Migrating to eslint-config-node + +TypeScript ESLint support is now built directly into [`@hs-web-team/eslint-config-node`](https://www.npmjs.com/package/@hs-web-team/eslint-config-node) — you no longer need a separate TypeScript config package. + +> **Note:** If your project also uses `@hs-web-team/eslint-config-browser`, that package is also deprecated. The replacement is the `/browser` export from `@hs-web-team/eslint-config-node`. + +Follow these steps to migrate, or see [MIGRATION-V3.md](https://github.com/HubSpotWebTeam/wt-eslint-node/blob/main/docs/MIGRATION-V3.md) for the full guide: + +### For Node.js projects + +```sh +npm uninstall @hs-web-team/eslint-config-ts +npm install -D @hs-web-team/eslint-config-node@latest +``` + +```js +// eslint.config.mjs +import wtConfig from '@hs-web-team/eslint-config-node'; + +export default [ + ...wtConfig, +]; +``` + +### For browser/React projects + +```sh +npm uninstall @hs-web-team/eslint-config-browser @hs-web-team/eslint-config-ts +npm install -D @hs-web-team/eslint-config-node@latest +``` + +```js +// eslint.config.mjs +import wtBrowserConfig from '@hs-web-team/eslint-config-node/browser'; + +export default [ + ...wtBrowserConfig, +]; +``` + +See the [wt-eslint-node README](https://github.com/HubSpotWebTeam/wt-eslint-node) for full setup instructions. diff --git a/package.json b/package.json index b9dd027..4481ba7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@hs-web-team/eslint-config-ts", - "version": "2.1.2", - "description": "HubSpot Marketing WebTeam ESLint rules for Typescript", + "version": "2.1.3", + "description": "[DEPRECATED] Use @hs-web-team/eslint-config-node instead. HubSpot Marketing WebTeam ESLint rules for Typescript", "main": "index.js", "engines": { "node": ">=20.0.0"