New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@privyid/eslint-config-ts

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@privyid/eslint-config-ts

Eslint shareable config for Typescript

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90%
Maintainers
3
Weekly downloads
 
Created
Source

@privyid/eslint-config-ts

Eslint shareable config for Typescript

Usage

First, install all dependencies

NPM

npm install --save-dev \
  eslint \
  babel-eslint \
  eslint-config-standard \
  eslint-plugin-import \
  eslint-plugin-node \
  eslint-plugin-promise \
  eslint-plugin-standard \
  eslint-plugin-unicorn \
  eslint-plugin-varspacing \
  eslint-plugin-vue \
  @privyid/eslint-config-js \
  @privyid/eslint-config-ts \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser

Yarn

yarn add --dev \
  eslint \
  babel-eslint \
  eslint-config-standard \
  eslint-plugin-import \
  eslint-plugin-node \
  eslint-plugin-promise \
  eslint-plugin-standard \
  eslint-plugin-unicorn \
  eslint-plugin-varspacing \
  eslint-plugin-vue \
  @privyid/eslint-config-js \
  @privyid/eslint-config-ts \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser

Then, add this to your .eslintrc file (create one if doesn't exist):

{
  "extends": "@privyid/eslint-config-ts"
}

Optional, add this to package.json script's

{
  // ...
  "scripts": {
    // ...
    "lint:js": "eslint --ext .ts,.js,.vue --ignore-path .gitignore .",
    "fix:js": "eslint --fix --ext .ts,.js,.vue --ignore-path .gitignore .",
    // ...
  }
  // ...
}

Lint on commit

If you run linting every commit, you can use pre-commit and lint-staged

# NPM
npm install --save-dev pre-commit lint-staged

# Yarn
yarn add --dev pre-commit lint-staged

and this to your package.json

{
  // ...
  "scripts": {
    // ...
    "precommit": "lint-staged",
    // ...
  },
  // ...
  "precommit": ["precommit"],
  "lint-staged": {
    "*.(js|ts|vue)": [
      "eslint --fix"
    ],
    // ...
  },
  // ...
}

License

This project is licensed under the MIT License - see the LICENSE file for details

Keywords

FAQs

Package last updated on 13 Aug 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

  • 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