Socket
Book a DemoInstallSign in
Socket

@tesseract-crypto/code-style

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tesseract-crypto/code-style

Our TypeScript Style that is based on the [google/gts](https://github.com/google/gts) project.

0.0.2
latest
npmnpm
Version published
Weekly downloads
18
500%
Maintainers
1
Weekly downloads
 
Created
Source

Code Style

Our TypeScript Style that is based on the google/gts project.

Usage

First, you need to install the package through Yarn:

$ yarn add -D @tesseract-crypto/code-style

Next add the following lint scripts:

"lint": "concurrently yarn:lint:*",
"lint:eslint": "eslint src",
"lint:prettier": "prettier --check src",
"lint:tsc": "tsc --noEmit",

Feel free to also add fix scripts:

"fix": "concurrently yarn:fix:*",
"fix:eslint": "eslint src --fix",
"fix:prettier": "prettier --write src",

Finally you need to create local configurations that extend the base configurations:

.eslintrc.json

{
  "extends": "./node_modules/@tesseract-crypto/code-style/.eslintrc.json"
}

.prettierrc.js

module.exports = {
  ...require('@tesseract-crypto/code-style/.prettierrc.json')
}

tsconfig.json

{
  "extends": "./node_modules/@tesseract-crypto/code-style/tsconfig.json"
}

Continous integration

You should also set up a GitHub Action to lint your code:

name: My project
on: push
jobs:
  lint:
    name: "Lint"
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v2
    - name: Setup Node.js
      uses: actions/setup-node@v2
      with:
        node-version: 16
    - name: Install dependencies
      run: yarn install
    - name: Lint code
      run: yarn lint

Publishing

You can publish a new version of the library using Yarn:

$ yarn publish --access public

FAQs

Package last updated on 21 Dec 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.