This repository uses npm workspaces
and lerna
to maintain a monorepo.
All packages are located in the packages
directory, and the documentation can be found in the docs
directory.
-
Fork it.
-
Clone it to your local directory. (Git is required.)
git clone https://github.com/lumirlumir/npm-clang-format-node.git
-
Move to the
npm-clang-format-node
directory.cd npm-clang-format-node
-
Install npm packages. (Node.js is required.)
npm install
-
Edit codes.
-
Create
my-branch
branch.git switch -c my-branch
-
Commit your changes. (
husky
andlint-staged
will lint your changed files!)git commit -am "commit type: title"
-
Push them to your remote branch.
-
Submit a pull request.🙇♂️
The node:
namespace prefix for built-in modules was introduced in Node.js 14.18.0
and 16.0.0
. While using it is recommended for new projects, we use different approaches in this project:
-
For regular application code, use standard imports without the
node:
prefix for broader compatibility:// Standard import (works in all Node.js versions) const fs = require('fs');
-
For test files (
.test.js
) that use thenode:test
runner, you may use thenode:
prefix:// node: prefix allowed in test files const fs = require('node:fs');
This approach helps maintain compatibility across Node.js versions while allowing modern syntax in test environments where version constraints are less critical.