Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fauna/typescript

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fauna/typescript

A collection of lint, format, and build configs used at Fauna for TypeScript projects.

  • 0.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

TypeScript

A collection of lint, format, and build configs used at Fauna for TypeScript projects.

Included configs (./config/)

  • eslint.config.js, a minimal base eslint config.
    • js/eslint.config.js, an extension of the base config intended for raw javascript projects.
  • .gitignore, a minimal placeholder .gitignore file.
  • prettierrc.js, a base prettier config. this is a stand-alone prettier config; it's not integrated into eslint (by choice). Run it before running eslint. We use eslint-config-prettier to remove eslint rules that collide with prettier, so prettier is authoritative on the formatting it can do.

Included scripts (./script/)

  • eslint-formatter.js, a custom eslint output formatter intended for estimating the cost of adding new rules to an eslint config. From a consumer of @fauna/typescript, run it like npx eslint --format ./node_modules/@fauna/typescript/scripts/eslint-formatter.js ..
  • version-bump.js, a script intended for use in CI environments to automatically version bump a npm package. Useful for packages that should be versioned and deployed on every merge to main.

Usage

Install

I use npm
npm install --save-dev @fauna/typescript
I use yarn
yarn add -D @fauna/typescript

Configure

ES Lint Config

In eslint.config.js put:

import { config as defaultConfig } from "@fauna/typescript/config/js/eslint.config.js";

export default [
  ...defaultConfig,
   // ...any customizations you'd like
];

Prettier Config

In prettier.config.js

import basePrettierConfig from "@fauna/typescript/config/prettierrc.js";

/**
 * @type {import("prettier").Config}
 */
const config = {
  ...basePrettierConfig,
  // ...any customizations you'd like
};

export default config;

Script

You can then write scripts in your package.json such as:

  "scripts": {
    "lint": "eslint . --fix",
    "format": "prettier -w --log-level silent .",
    "format:check": "prettier -c ."
  }

FAQs

Package last updated on 20 Dec 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc