Skip to content

Commit

Permalink
feat: rename @typescript-eslint config to typescript
Browse files Browse the repository at this point in the history
BREAKING CHANGE: you must now use `typescript` instead of `@typescript-eslint`
  • Loading branch information
G-Rath committed Dec 6, 2024
1 parent 008b741 commit 64eaaec
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ 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`
- `eslint-plugin-prettier`
- `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 -->

Expand Down Expand Up @@ -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[]} */
Expand Down
12 changes: 6 additions & 6 deletions configs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,47 @@ 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[];

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[];

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[];

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[];

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[];

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[];
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'] },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion @typescript-eslint.js → typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 64eaaec

Please sign in to comment.