File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 33[ ![ npm version] [ npm-version-src ]] [ npm-version-href ]
44[ ![ npm downloads] [ npm-downloads-src ]] [ npm-downloads-href ]
55
6- Support one-off comment-as-command to do code transformation with ESLint.
7-
8- Use ESLint as a codemod tool, on-demand.
9-
10- > [ !IMPORTANT]
11- > Experimental, feedbacks are welcome!
6+ Comment-as-command for one-off codemod with ESLint.
127
138## Install
149
1510``` bash
1611npm i eslint-plugin-command -D
1712```
1813
19- In your Flat config:
14+ In your flat config ` eslint.config.mjs ` :
2015
2116``` js
2217// eslint.config.mjs
Original file line number Diff line number Diff line change 33 "type" : " module" ,
44 "version" : " 0.1.1" ,
55 "packageManager" :
" [email protected] " ,
6- "description" : " Command in comment for one-off codemod with ESLint" ,
6+ "description" : " Comment-as-command for one-off codemod with ESLint" ,
77 "author" :
" Anthony Fu <[email protected] >" ,
88 "license" : " MIT" ,
99 "funding" : " https://github.com/sponsors/antfu" ,
Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ export function createRuleWithCommands(commands: Command[]) {
99 meta : {
1010 type : 'problem' ,
1111 docs : {
12- description : 'Enforce top-level functions to be declared with function keyword' ,
13- recommended : 'stylistic' ,
12+ description : 'Comment-as-command for one-off codemod with ESLint' ,
1413 } ,
1514 fixable : 'code' ,
1615 schema : [ ] ,
You can’t perform that action at this time.
0 commit comments