repo-check
v1.39.0
Published
Repo cleaning made easy
Downloads
1,168
Readme
Repo Checker
Usage
Choose your favorite method :
- Via npx :
npx repo-check
- Via npm locally :
pnpm install repo-check
then runnpx repo-check
or use it in yourpackage.json
scripts - Via local installation : clone this repository, cd into the folder and use
pnpm start
,pnpm start --target=../my-other-project
for single run orpnpm dev
,pnpm dev --target=../my-other-project
Pro tip : init repo-checker before fixing files.
Parameters
target
--target=path/to/folder
tells repo-checker which directory it should scan.
If no target is specified, repo-checker will scan current directory.
Target can be a relative or absolute path, can contain one project or more.
fix
--fix
kindly ask repo-checker to try to create missing files or update problematic ones.
For example, repo-checker will check for a README.md
, if it does not exists, the file will be created and filled with data accordingly to the README.md template (templates/README.md
).
Repo-checker will try to grab as much info as possible from the project folder to create this file.
If it's not enough, you'll be prompt to init.
If you want to fix already existing files, use --force
to overwrite it.
init
--init
ask repo-checker to initialize a data config file in the current directory.
If file already exists, use --force
to overwrite it.
quiet
--quiet
repo-checker will works silently without output-ing to console, will only output to log file.
Todo
- [ ] if website : check static folder : should have "_headers" & "favicon.ico" and "manifest.json" files inside
- [ ] compute build/dist/folder/public size for maxSize compliance
- [ ] check
rel="noopener"
orrel="noreferrer"
to any<a
external links to improve performance and prevent security vulnerabilities - [ ] check
width
andheight
attributes to any<img
or<video
to ensures that the browser can allocate the correct amount of space in the document - [ ] add nbFixes to the report
- [ ] check last tag, suggest to tag if last one is old
- [ ] extends unit tests to src/files (remove
c8 ignore start
temporary exclusions) - [ ] prepare a json schema for .repo-checker.json
- [ ] try to avoid using class in this project and remove
eslint-disable-next-line no-restricted-syntax
- [ ] check if lint/performance/useTopLevelRegex worth fixing everywhere
Thanks
- Arg : un-opinionated, no-frills CLI argument parser
- Dependency-cruiser : handy tool to validate and visualize dependencies
- Esbuild : an extremely fast JavaScript bundler and minifier
- Eslint : super tool to find & fix problems
- Github : for all their great work year after year, pushing OSS forward
- Repo-checker : eslint cover /src code and this tool the rest ^^
- Shields.io : for the nice badges on top of this readme
- Shuutils : collection of pure JS utils
- V8 : simple & effective cli for code coverage
- Vitest : super fast vite-native testing framework
- Watchlist : recursively watch a list of directories & run a command on any file system