Socket
Socket
Sign inDemoInstall

@nbai/nudge

Package Overview
Dependencies
113
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nbai/nudge

The linter take an `input directory` and use it to find `package.json` within the input and its parents.


Version published
Maintainers
1
Created

Readme

Source

nudge linter

The linter take an input directory and use it to find package.json within the input and its parents.

If a package.json is located, nudge lint will check for:

  • type === "module"
  • standard is in dependencies or devDependencies

it will also use main attributes defined in package.json to find files for validation. for examples:

  • main === index.js nudge will scan project root directory, of course ignoring node_modules
  • main === src/index.js nudge will scan src directory

If everything is fine, nudge will perform the following:

  • invoke standard to lint the project and quit on error
  • analyse .js source code files into ASTs and cross check for cases where async functions are called without await as this is one most observed mistake programmers make.

can we beat the default async check?

Yes. nudge will only check for function imported or declared locally AS IS.

async function a1(){...}

async function main(){
  a1()//nudge will report error here
  let b = a1
  b()//nudge does not complain this.
}

FAQs

Last updated on 14 Oct 2023

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