Socket
Socket
Sign inDemoInstall

@tesseract-crypto/code-style

Package Overview
Dependencies
8
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

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.


Version published
Maintainers
1
Created

Readme

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

Last updated on 21 Dec 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc