sherif

Opinionated, zero-config linter for JavaScript monorepos

MIT License

Downloads
616.7K
Stars
403
Committers
4

Bot releases are hidden (Show)

sherif - v0.8.4 Latest Release

Published by QuiiBz 6 months ago

What's Changed

  • Revert "feat(multiple-dependency-versions): report peerDependencies (#50) by @QuiiBz

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.8.1...v0.8.4

sherif - v0.8.1

Published by QuiiBz 9 months ago

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.8.0...v0.8.1

sherif - v0.8.0

Published by QuiiBz 9 months ago

Preserve the JSON indentation on autofix

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!

Yarn nohoist workspaces

We now support the Yarn nohoist workspaces configuration, where the root package.json's workspaces field looks like:

"workspaces": {
  "packages": ["packages/*"],
  "nohoist": []
}

Misc

  • The multiple-dependency-versions will now also report duplicated versions in peerDependencies
  • Reduce the binary size by half

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.7.0...v0.8.0

sherif - v0.7.0

Published by QuiiBz 10 months ago

Skipping autofix for multiple-dependency-versions rule

When 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":

Allow folder path and globs for --ignore-package option

It'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/*

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.6.1...v0.7.0

sherif - v0.6.0

Published by QuiiBz 11 months ago

Autofix for 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:

Fix 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.

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.5.0...v0.6.0

sherif - v0.5.0

Published by QuiiBz 11 months ago

Support excluded paths

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*'

New non-existant-packages rule

All paths defined in the workspace (the root package.json' workspaces field or pnpm-workspace.yaml) should match at least one package.

More rules autofixable

--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.

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.4.2...v0.5.0

sherif - v0.4.2

Published by QuiiBz 12 months ago

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.4.1...v0.4.2

sherif - v0.4.1

Published by QuiiBz 12 months ago

New --fix option to autofix fixable issues

Some issues can now be fixed automatically when appending the --fix option:

  • empty-dependencies will remove any empty dependency (dependencies, devDependencies...) field
  • root-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

What's Changed

New Contributors

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.3.1...v0.4.1

sherif - v0.3.0

Published by QuiiBz about 1 year ago

What's Changed

Full Changelog: https://github.com/QuiiBz/sherif/compare/v0.2.0...v0.3.0