Skip to content

Commit 3395fa9

Browse files
authored
Deprecate deps command (#149)
1 parent 8368d28 commit 3395fa9

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

.changeset/gentle-parks-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'publint': patch
3+
---
4+
5+
Deprecate the `deps` command. The command has been tricky to maintain and incomplete (e.g. doesn't lint recursively). A separate tool can be used to run publint on dependencies instead, e.g. `npx renoma --filter-rules "publint"`.

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
2323
## Usage
2424

2525
```bash
26-
# Lint your library project
26+
# Lint a library project
2727
$ npx publint
2828

29-
# Lint a dependency
30-
$ npx publint ./node_modules/some-lib
31-
32-
# Lint your project's dependencies based on package.json
33-
$ npx publint deps
29+
# Lint a given path
30+
$ npx publint ./packages/my-library
3431
```
3532

3633
Or try it online at https://publint.dev. For JavaScript usage, see [packages/publint/README.md](./packages/publint/README.md).

packages/publint/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,11 @@ This package contains a CLI and API to lint packages locally. The package to be
2727
### CLI
2828

2929
```bash
30-
# Lint your library project
30+
# Lint a library project
3131
$ npx publint
3232

33-
# Lint a dependency
34-
$ npx publint ./node_modules/some-lib
35-
36-
# Lint your project's dependencies based on package.json
37-
$ npx publint deps
33+
# Lint a given path
34+
$ npx publint ./packages/my-library
3835
```
3936

4037
Use `npx publint --help` for more information.

packages/publint/src/cli.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ cli
6464
.option('-P, --prod', 'Only check dependencies')
6565
.option('-D, --dev', 'Only check devDependencies')
6666
.action(async (dir, opts) => {
67+
console.log(
68+
c.bold(
69+
c.yellow(
70+
'The `publint deps` command is deprecated. You can use a different tool to run `publint` in dependencies instead. ' +
71+
'e.g. `npx renoma --filter-rules "publint"`',
72+
),
73+
),
74+
)
75+
6776
opts = normalizeOpts(opts)
6877

6978
const pkgDir = dir ? path.resolve(dir) : process.cwd()

site/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ <h2>Use locally</h2>
6666
Run <code>npx publint</code> in your library directory to lint
6767
locally.
6868
</li>
69-
<li>Run <code>npx publint deps</code> to lint dependencies.</li>
7069
<li>
7170
Run <code>npx publint --help</code> for the full list of options.
7271
</li>

site/src/components/Footer.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<li>
4141
Run <code>npx publint</code> in your library directory to lint locally.
4242
</li>
43-
<li>Run <code>npx publint deps</code> to lint dependencies.</li>
4443
<li>
4544
Run <code>npx publint --help</code> for the full list of options.
4645
</li>

0 commit comments

Comments
 (0)