🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@harperdb/code-guidelines

Package Overview
Dependencies
Maintainers
10
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harperdb/code-guidelines

Coding Guidelines for Harper repositories. Includes types, linting, and formatting.

npmnpm
Version
0.0.3
Version published
Weekly downloads
391
-1.26%
Maintainers
10
Weekly downloads
 
Created
Source

@harperdb/code-guidelines

This repository contains code guideline tools and configurations for the HarperDB organization.

Currently this only exports a shared Prettier configuration. More tools will be added soon.

Quick Start

  • npm i --save-dev @harperdb/code-guidelines

  • Add "prettier": "@harperdb/code-guidelines/prettier" to package.json.

  • Run npx prettier .

Formatting

We use Prettier for formatting. The default config is exported under the /prettier path (i.e. @harperdb/code-guidelines/prettier).

Review the Sharing Configurations documentation for more information how to use or extend the base config.

Linting

Coming soon!

Type Checking

TypeScript configuration files are available under the /tsconfig export path and can be used with the extends property in your own tsconfig.json files.

For example, to use the base Node.js configuration (supporting Node.js v20 or later):

  • Start by installing necessary dev dependencies:
    npm i --save-dev typescript @types/node@20 @harperdb/code-guidelines
    
  • Then create a tsconfig.json file in your project with the following content:
    {
    	"extends": "@harperdb/code-guidelines/tsconfig.node.json",
    	"compilerOptions": {
    		// Your custom options here
    	}
    }
    
  • Finally, use TypeScript or Node.js Type Stripping!
    npx tsc
    # or
    node src/index.ts
    

Configurations are based off of the popular tsconfig bases project.

The following list outlines the available configurations:

  • tsconfig.node.json - Node.js v20 or later with Node.js Type Stripping support
  • More coming soon!

Adding new configurations

To add a new TypeScript configuration:

  • Create a new file in this repository starting with tsconfig. and ending with .json. The name in between should be descriptive of the environment or relevant version (e.g. tsconfig.react.json or tsconfig.node-24.json).
  • Update the exports field in package.json to include the new configuration file using the same name as the file.
  • Add it to the list above with a brief description.
  • Ship it 🚀

FAQs

Package last updated on 11 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts