From 64eaaec8e1af8bf200fc24ef1f49f43ae276572c Mon Sep 17 00:00:00 2001
From: Gareth Jones <gareth.jones@ackama.com>
Date: Mon, 25 Nov 2024 09:02:09 +1300
Subject: [PATCH] feat: rename `@typescript-eslint` config to `typescript`

BREAKING CHANGE: you must now use `typescript` instead of `@typescript-eslint`
---
 README.md                              | 12 ++++++------
 configs.d.ts                           | 12 ++++++------
 eslint.config.js                       |  2 +-
 eslint.config.old.js                   |  2 +-
 package.json                           |  2 +-
 @typescript-eslint.js => typescript.js |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
 rename @typescript-eslint.js => typescript.js (99%)

diff --git a/README.md b/README.md
index d9408815..e4a8e96a 100644
--- a/README.md
+++ b/README.md
@@ -93,11 +93,6 @@ Below is a complete list of the configs provided, and their dependencies:
   - `eslint-plugin-prettier`
   - `eslint-plugin-import`
   - `eslint-plugin-n`
-- `ackama/@typescript-eslint`
-  - `@typescript-eslint/parser`
-  - `@typescript-eslint/eslint-plugin`
-  - `@stylistic/eslint-plugin-ts`
-  - `eslint-plugin-prettier`
 - `ackama/jest`
   - `eslint-plugin-jest`
 - `ackama/react`
@@ -105,6 +100,11 @@ Below is a complete list of the configs provided, and their dependencies:
   - `eslint-plugin-react`
   - `eslint-plugin-react-hooks`
   - `eslint-plugin-jsx-a11y`
+- `ackama/typescript`
+  - `@typescript-eslint/parser`
+  - `@typescript-eslint/eslint-plugin`
+  - `@stylistic/eslint-plugin-ts`
+  - `eslint-plugin-prettier`
 
 <!-- end configs list -->
 
@@ -140,9 +140,9 @@ project that uses `jest` & `react`:
 
 ```js
 const configAckamaBase = require('eslint-config-ackama');
-const configAckamaTypeScript = require('eslint-config-ackama/@typescript-eslint');
 const configAckamaJest = require('eslint-config-ackama/jest');
 const configAckamaReact = require('eslint-config-ackama/react');
+const configAckamaTypeScript = require('eslint-config-ackama/typescript');
 const globals = require('globals');
 
 /** @type {import('eslint').Linter.FlatConfig[]} */
diff --git a/configs.d.ts b/configs.d.ts
index 098e98e5..aa96e9d5 100644
--- a/configs.d.ts
+++ b/configs.d.ts
@@ -6,7 +6,7 @@ declare module 'eslint-config-ackama' {
   export = config;
 }
 
-declare module 'eslint-config-ackama/@typescript-eslint' {
+declare module 'eslint-config-ackama/jest' {
   import type { Linter } from 'eslint';
 
   const config: Linter.LegacyConfig | Linter.FlatConfig[];
@@ -14,7 +14,7 @@ declare module 'eslint-config-ackama/@typescript-eslint' {
   export = config;
 }
 
-declare module 'eslint-config-ackama/@typescript-eslint.js' {
+declare module 'eslint-config-ackama/jest.js' {
   import type { Linter } from 'eslint';
 
   const config: Linter.LegacyConfig | Linter.FlatConfig[];
@@ -22,7 +22,7 @@ declare module 'eslint-config-ackama/@typescript-eslint.js' {
   export = config;
 }
 
-declare module 'eslint-config-ackama/jest' {
+declare module 'eslint-config-ackama/react' {
   import type { Linter } from 'eslint';
 
   const config: Linter.LegacyConfig | Linter.FlatConfig[];
@@ -30,7 +30,7 @@ declare module 'eslint-config-ackama/jest' {
   export = config;
 }
 
-declare module 'eslint-config-ackama/jest.js' {
+declare module 'eslint-config-ackama/react.js' {
   import type { Linter } from 'eslint';
 
   const config: Linter.LegacyConfig | Linter.FlatConfig[];
@@ -38,7 +38,7 @@ declare module 'eslint-config-ackama/jest.js' {
   export = config;
 }
 
-declare module 'eslint-config-ackama/react' {
+declare module 'eslint-config-ackama/typescript' {
   import type { Linter } from 'eslint';
 
   const config: Linter.LegacyConfig | Linter.FlatConfig[];
@@ -46,7 +46,7 @@ declare module 'eslint-config-ackama/react' {
   export = config;
 }
 
-declare module 'eslint-config-ackama/react.js' {
+declare module 'eslint-config-ackama/typescript.js' {
   import type { Linter } from 'eslint';
 
   const config: Linter.LegacyConfig | Linter.FlatConfig[];
diff --git a/eslint.config.js b/eslint.config.js
index 780045a4..3dc75384 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,7 +1,7 @@
 const globals = require('globals');
-const configAckamaTypeScript = require('./@typescript-eslint');
 const configAckamaBase = require('./index');
 const configAckamaJest = require('./jest');
+const configAckamaTypeScript = require('./typescript');
 
 /** @type {import('eslint').Linter.FlatConfig[]} */
 const config = [
diff --git a/eslint.config.old.js b/eslint.config.old.js
index f141f963..a0cfc9b2 100644
--- a/eslint.config.old.js
+++ b/eslint.config.old.js
@@ -8,7 +8,7 @@ const config = {
     ecmaVersion: 2019
   },
   plugins: ['@typescript-eslint/eslint-plugin'],
-  extends: ['./index.js', './@typescript-eslint.js'],
+  extends: ['./index.js', './typescript.js'],
   ignorePatterns: ['!.eslintplugin/'],
   overrides: [
     { files: ['*.spec.*'], extends: ['./jest.js'] },
diff --git a/package.json b/package.json
index 3136e7d5..83c246de 100644
--- a/package.json
+++ b/package.json
@@ -11,10 +11,10 @@
   "author": "Gareth Jones",
   "types": "configs.d.ts",
   "files": [
-    "@typescript-eslint.js",
     "index.js",
     "jest.js",
     "react.js",
+    "typescript.js",
     "configs.d.ts"
   ],
   "scripts": {
diff --git a/@typescript-eslint.js b/typescript.js
similarity index 99%
rename from @typescript-eslint.js
rename to typescript.js
index 423fd248..e945ffe8 100644
--- a/@typescript-eslint.js
+++ b/typescript.js
@@ -167,7 +167,7 @@ const generateConfig = () => {
     /** @type {import('eslint').Linter.FlatConfig[]} */
     const config = [
       {
-        name: 'ackama/@typescript-eslint',
+        name: 'ackama/typescript',
         languageOptions: { parser: parserTypeScriptESLint },
         plugins: {
           '@typescript-eslint': pluginTypeScriptESLint,