Skip to content

Commit

Permalink
feat: renaming things
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 29, 2024
1 parent 6c54534 commit 2968dab
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<img src="./public/favicon.svg" width="100" height="100"><br>

# ESLint Flat Config Viewer
# ESLint Config Inspector

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

A visual tool to help you view and understand your [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new).
A visual tool to help you view and understand your [ESLint Flat configs](https://eslint.org/docs/latest/use/configure/configuration-files-new).

<img width="1199" alt="Screenshot" src="https://github.com/antfu/eslint-flat-config-viewer/assets/11247099/f386563a-c655-458e-a2c3-0af19ebec958">
<img width="1199" alt="Screenshot" src="https://github.com/antfu/eslint-flat-config-viewer/assets/11247099/44edeb05-02b3-4bca-8da6-768984e8d829">

## Usage

Change directory to your project root that contains `eslint.config.js` and run:
Change the directory to your project root that contains `eslint.config.js` and run:

```bash
npx eslint-flat-config-viewer
npx @eslint/config-inspector
```

Goto http://localhost:7777/ to view your ESLint config. Whenever you update your ESLint config, the page will be updated automatically.
Expand All @@ -24,19 +24,11 @@ Goto http://localhost:7777/ to view your ESLint config. Whenever you update your

Or play it in your browser:

[![](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/~/github.com/antfu/eslint-flat-config-viewer)

## Sponsors

<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
</a>
</p>
[![](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/~/github.com/eslint/config-inspector)

## License

[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)
[Apache-2.0](./LICENSE) License

<!-- Badges -->

Expand Down
10 changes: 5 additions & 5 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { version } from './package.json'
import { ensureDataFetch } from '~/composables/payload'
useHead({
title: 'ESLint Flat Config Viewer',
title: 'ESLint Config Inspector',
})
await ensureDataFetch()
Expand All @@ -18,11 +18,11 @@ await ensureDataFetch()
<div v-if="errorInfo" grid h-full w-full place-content-center whitespace-pre-line>
<div font-200 text-xl mb6>
<a
href="https://github.com/antfu/eslint-flat-config-viewer" target="_blank"
href="https://github.com/eslint/config-inspector" target="_blank"
flex="inline gap-2 items-center" mr1
>
<img src="/favicon.svg" inline-block h-1em>
<span op75>ESLint Config Viewer</span>
<span op75>ESLint Config Inspector</span>
</a>
<sup op50>v{{ version }}</sup>
</div>
Expand All @@ -37,8 +37,8 @@ await ensureDataFetch()

<div op50 mt6>
Note that
<a href="https://github.com/antfu/eslint-flat-config-viewer" target="_blank" hover:underline>config viewer</a>
only works with the <a href="https://eslint.org/docs/latest/use/configure/configuration-files-new" target="_blank" font-bold hover:underline>new flat config format</a>.
<a href="https://github.com/eslint/config-inspector" target="_blank" hover:underline>config inspector</a>
only works with the <a href="https://eslint.org/docs/latest/use/configure/configuration-files-new" target="_blank" font-bold hover:underline>flat config format</a>.
</div>
</div>
<div v-else px14 py10>
Expand Down
6 changes: 3 additions & 3 deletions components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ function toggleRuleView() {
<template>
<div text-3xl font-200>
<a
href="https://github.com/antfu/eslint-flat-config-viewer" target="_blank"
href="https://github.com/eslint/config-inspector" target="_blank"
flex="inline gap-2 items-center" mr1
>
<img src="/favicon.svg" inline-block h-1em> ESLint Flat Config Viewer
<img src="/favicon.svg" inline-block h-1em> ESLint Config Inspector
</a>
<div op50 font-mono text-base inline-block translate-y--5 ml1>
v{{ version }}
Expand Down Expand Up @@ -79,7 +79,7 @@ function toggleRuleView() {
@click="toggleRuleView()"
/>
<NuxtLink
href="https://github.com/antfu/eslint-flat-config-viewer" target="_blank"
href="https://github.com/eslint/config-inspector" target="_blank"
i-carbon-logo-github text-lg op50 hover:op75
/>
<template v-if="deprecatedUsing.length">
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"name": "eslint-flat-config-viewer",
"name": "@eslint/config-inspector",
"type": "module",
"version": "0.1.20",
"version": "0.0.1",
"packageManager": "[email protected]",
"description": "A visual tool to help you view and understand your ESLint Flat config",
"author": "Anthony Fu <[email protected]>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu/eslint-flat-config-viewer#readme",
"license": "Apache-2.0",
"funding": "https://opencollective.com/eslint",
"homepage": "https://github.com/eslint/config-inspector#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/antfu/eslint-flat-config-viewer.git"
"url": "git+https://github.com/eslint/config-inspector.git"
},
"bugs": "https://github.com/antfu/eslint-flat-config-viewer/issues",
"bugs": "https://github.com/eslint/config-inspector/issues",
"bin": "./bin.mjs",
"files": [
"*.mjs",
Expand Down
2 changes: 1 addition & 1 deletion server/api/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const configs = [
]

const readErrorWarning = `Failed to load \`eslint.config.js\`.
Note that \`eslint-flat-config-viewer\` only works with the flat config format:
Note that \`@eslint/config-inspector\` only works with the flat config format:
https://eslint.org/docs/latest/use/configure/configuration-files-new`

export default lazyEventHandler(async () => {
Expand Down

0 comments on commit 2968dab

Please sign in to comment.