@putout/cli-match
convert "rules" section to "match" in .putout.json
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/cli-match 
SYNC missed versions from official npm registry.

@putout/cli-match NPM version

Read .putout.json and convert rules into match.

Install

npm i @putout/cli-match
{
-   "rules": {
-       "remove-debugger": "on"
+   "match": {
+       "*.md": {
+           "remove-debugger": "on"
+       }
    }
}

Example

import {cwd} from 'node:process';
import {
    readFile,
    writeFile,
} from 'node:fs/promises';
import match from '@putout/cli-match';

const {code, message} = await match({
    pattern,
    cwd: cwd(),
    readFile, // optional
    writeFile, // optional
});

console.log(message); process.exit(code);

License

MIT

Current Tags

  • 2.2.0                                ...           latest (a year ago)

4 Versions

  • 2.2.0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 4
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (9)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE