1.0.3 • Published 1 year ago

@nbai/nudge v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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.
}
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago