Opinionated, zero-config linter for JavaScript monorepos
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.8.1...v0.8.4
Published by QuiiBz 9 months ago
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.8.0...v0.8.1
Published by QuiiBz 9 months ago
If you're using a formatter (e.g. Prettier) for your package.json
files, you might have noticed that Sherif ignores the indentation and always uses two spaces. This is no longer the case and Sherif will automatically detect and use the correct indentation (2 spaces, 4 spaces, tabs) when autofixing issues!
We now support the Yarn nohoist workspaces configuration, where the root package.json
's workspaces
field looks like:
"workspaces": {
"packages": ["packages/*"],
"nohoist": []
}
multiple-dependency-versions
will now also report duplicated versions in peerDependencies
peerDependencies
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/50
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.7.0...v0.8.0
Published by QuiiBz 10 months ago
multiple-dependency-versions
ruleWhen running Sherif with --fix
, the multiple-dependency-versions
asks to choose a version to use across the monorepo. If you're not sure yet which version you need, you can now choose to skip it by pressing "Escape":
--ignore-package
optionIt's now even easier to ignore a specific package, either by its name or path, or all packages matching a specific name or path:
# Ignore all issues in the `@repo/tools` package
sherif -p @repo/tools
# Ignore all issues for packages name matching `@repo-internal/*`
sherif -p @repo-internal/*
# Ignore all issues in the package inside `./integrations/react`
sherif -p ./integrations/react
# Ignore all issues for packages inside `./integrations/*`
sherif -p ./integrations/*
--ignore-package
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/47
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.6.1...v0.7.0
Published by QuiiBz 11 months ago
multiple-dependency-versions
When running Sherif with --fix
, the multiple-dependency-versions
rule will ask you which version to use by showing all the ones currently declared in the monorepo. The selected version will then automatically be updated in every package using this dependency:
root-package-manager-field
The check to show this rule was checking the presence of the private field instead of the packageManager field of the root package.
multiple-dependency-versions
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/33
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.5.0...v0.6.0
Published by QuiiBz 11 months ago
Add support for excluded paths in the workspace, starting with a !. In this example, all packages under packages will be registered, plus the docs package, but excluding the packages/abc package and any package matching packages/d*:
packages:
- 'packages/*'
- 'docs'
- '!packages/abc'
- '!packages/d*'
non-existant-packages
ruleAll paths defined in the workspace (the root package.json
' workspaces
field or pnpm-workspace.yaml
) should match at least one package.
--fix
now supports the non-existant-packages
and packages-without-package-json
rules, and fixes a bug in types-in-dependencies
. See https://github.com/QuiiBz/sherif/issues/6 for more information.
non-existant-packages
rule by @QuiiBz in https://github.com/QuiiBz/sherif/pull/27
devDependencies
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/28
non-existant-packages
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/30
packages-without-package-json
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/31
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.4.2...v0.5.0
Published by QuiiBz 12 months ago
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.4.1...v0.4.2
Published by QuiiBz 12 months ago
--fix
option to autofix fixable issuesSome issues can now be fixed automatically when appending the --fix
option:
empty-dependencies
will remove any empty dependency (dependencies
, devDependencies
...) fieldroot-package-private-field
will add/set the private
field to true
inside the root package.json
types-in-dependencies
will move any @types/*
package declared in dependencies
to devDependencies
More issues will be autofixable in the future: https://github.com/QuiiBz/sherif/issues/6
empty-dependencies
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/14
root-package-private-field
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/17
types-in-dependencies
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/18
println
by @QuiiBz in https://github.com/QuiiBz/sherif/pull/19
--fix
to footer by @QuiiBz in https://github.com/QuiiBz/sherif/pull/20
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.3.1...v0.4.1
Published by QuiiBz about 1 year ago
Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.2.0...v0.3.0