Skip to content

Commit

Permalink
docs: fix metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 25, 2024
1 parent b4a81e2 commit 794e84f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

Support one-off comment-as-command to do code transformation with ESLint.

Use ESLint as a codemod tool, on-demand.

> [!IMPORTANT]
> Experimental, feedbacks are welcome!
Comment-as-command for one-off codemod with ESLint.

## Install

```bash
npm i eslint-plugin-command -D
```

In your Flat config:
In your flat config `eslint.config.mjs`:

```js
// eslint.config.mjs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "0.1.1",
"packageManager": "[email protected]",
"description": "Command in comment for one-off codemod with ESLint",
"description": "Comment-as-command for one-off codemod with ESLint",
"author": "Anthony Fu <[email protected]>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
Expand Down
3 changes: 1 addition & 2 deletions src/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export function createRuleWithCommands(commands: Command[]) {
meta: {
type: 'problem',
docs: {
description: 'Enforce top-level functions to be declared with function keyword',
recommended: 'stylistic',
description: 'Comment-as-command for one-off codemod with ESLint',
},
fixable: 'code',
schema: [],
Expand Down

0 comments on commit 794e84f

Please sign in to comment.