Skip to content

Commit fc2e6e0

Browse files
committed
feat!: rename @next/next to next
1 parent aa97582 commit fc2e6e0

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,16 @@ Check out the [configs](https://github.com/antfu/eslint-config/blob/main/src/con
382382

383383
Since flat config requires us to explicitly provide the plugin names (instead of the mandatory convention from npm package name), we renamed some plugins to make the overall scope more consistent and easier to write.
384384

385-
| New Prefix | Original Prefix | Source Plugin |
386-
| ---------- | ---------------------- | ------------------------------------------------------------------------------------------ |
387-
| `import/*` | `import-lite/*` | [eslint-plugin-import-lite](https://github.com/9romise/eslint-plugin-import-lite) |
388-
| `node/*` | `n/*` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) |
389-
| `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
390-
| `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
391-
| `style/*` | `@stylistic/*` | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) |
392-
| `test/*` | `vitest/*` | [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) |
393-
| `test/*` | `no-only-tests/*` | [eslint-plugin-no-only-tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests) |
385+
| New Prefix | Original Prefix | Source Plugin |
386+
| ---------- | ---------------------- | ----------------------------------------------------------------------------------------------------- |
387+
| `import/*` | `import-lite/*` | [eslint-plugin-import-lite](https://github.com/9romise/eslint-plugin-import-lite) |
388+
| `node/*` | `n/*` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) |
389+
| `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
390+
| `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
391+
| `style/*` | `@stylistic/*` | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic) |
392+
| `test/*` | `vitest/*` | [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) |
393+
| `test/*` | `no-only-tests/*` | [eslint-plugin-no-only-tests](https://github.com/levibuzolic/eslint-plugin-no-only-tests) |
394+
| `next/*` | `@next/next` | [@next/eslint-plugin-next](https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next) |
394395

395396
When you want to override rules, or disable them inline, you need to update to the new prefix:
396397

src/configs/command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import createCommand from 'eslint-plugin-command/config'
55
export async function command(): Promise<TypedFlatConfigItem[]> {
66
return [
77
{
8-
...createCommand(),
8+
...createCommand() as any,
99
name: 'antfu/command/rules',
1010
},
1111
]

src/configs/nextjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function nextjs(
2828
{
2929
name: 'antfu/nextjs/setup',
3030
plugins: {
31-
'@next/next': pluginNextJS,
31+
next: pluginNextJS,
3232
},
3333
},
3434
{

src/factory.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ export const defaultPluginRenaming = {
6161
'@eslint-react/hooks-extra': 'react-hooks-extra',
6262
'@eslint-react/naming-convention': 'react-naming-convention',
6363

64+
'@next/next': 'next',
6465
'@stylistic': 'style',
6566
'@typescript-eslint': 'ts',
6667
'import-lite': 'import',
6768
'n': 'node',
6869
'vitest': 'test',
70+
6971
'yml': 'yaml',
7072
}
7173

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy