Skip to content

Commit

Permalink
feat(module): migrate to @eslint/config-inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 29, 2024
1 parent 5715ea2 commit 07bc1da
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions docs/content/1.packages/0.module.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Source code on GitHub

- [ESLint flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), future-proof.
- Project-aware Nuxt-specific settings, also supports [layers](https://nuxt.com/docs/getting-started/layers).
- [Nuxt DevTools](https://github.com/nuxt/devtools) integration powered by [`eslint-flat-config-viewer`](https://github.com/antfu/eslint-flat-config-viewer).
- [Nuxt DevTools](https://github.com/nuxt/devtools) integration powered by [`@eslint/config-inspector`](https://github.com/eslint/config-inspector).
- Optional [dev server checker](#dev-server-checker) integration.

## Quick Setup
Expand Down Expand Up @@ -72,7 +72,7 @@ export default withNuxt(
)
```

`withNuxt` will take the rest arguments of flat configs and append them after Nuxt flat config items. You can either use the [Nuxt DevTools](https://github.com/nuxt/devtools) panel to inspect the resolved ESLint flat config, or manually run [`npx eslint-flat-config-viewer`](https://github.com/antfu/eslint-flat-config-viewer).
`withNuxt` will take the rest arguments of flat configs and append them after Nuxt flat config items. You can either use the [Nuxt DevTools](https://github.com/nuxt/devtools) panel to inspect the resolved ESLint flat config, or manually run [`npx @eslint/config-inspector`](https://github.com/eslint/config-inspector).

## Recipes

Expand Down
2 changes: 1 addition & 1 deletion packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
}
},
"dependencies": {
"@eslint/config-inspector": "^0.1.0",
"@nuxt/devtools-kit": "^1.1.5",
"@nuxt/eslint-config": "workspace:*",
"@nuxt/eslint-plugin": "workspace:*",
"@nuxt/kit": "^3.11.1",
"chokidar": "^3.6.0",
"eslint-flat-config-utils": "^0.1.2",
"eslint-flat-config-viewer": "^0.1.20",
"eslint-typegen": "^0.1.6",
"get-port-please": "^3.1.2",
"pathe": "^1.1.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/module/src/modules/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ function setupDevToolsIntegration(nuxt: Nuxt) {
tabs.push({
name: 'eslint-config',
title: 'ESLint Config',
icon: 'https://raw.githubusercontent.com/antfu/eslint-flat-config-viewer/main/public/favicon.svg',
icon: 'https://raw.githubusercontent.com/eslint/config-inspector/main/public/favicon.svg',
view: viewerUrl
? {
type: 'iframe',
src: viewerUrl,
}
: {
type: 'launch',
description: 'Start ESLint config viewer to inspect the local ESLint config',
description: 'Start ESLint config inspector to analyze the local ESLint configs',
actions: [
{
label: 'Launch',
Expand All @@ -161,15 +161,15 @@ function setupDevToolsIntegration(nuxt: Nuxt) {
viewerProcess = startSubprocess(
{
command: 'npx',
args: ['eslint-flat-config-viewer'],
args: ['@eslint/config-inspector'],
cwd: nuxt.options.rootDir,
env: {
PORT: viewerPort.toString(),
NO_OPEN: 'true',
},
},
{
id: 'eslint-flat-config-viewer',
id: 'eslint-config-inspector',
name: 'ESLint Config Viewer',
},
nuxt,
Expand Down
70 changes: 35 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 07bc1da

Please sign in to comment.