Conventional tests for your JS and TS.
There is only one rule so far and it's incomplete.
- Make sure AWS Lambda event handler input parameters don't escape the file they are defined in.
entente (known entrypoints only at the moment)
const createProject = ;;
ts-morph (find entrypoints in a source tree)
const compilerOptions =allowJs: truecheckJs: truenoEmit: trueresolveJsonModule: true;const project = compilerOptions ;project;project;
- Make it work with commonjs modules. ts-morph is having a hard time here.
- Make it work when someone hasn't annotated the function with JSDoc. There are few things we can do here around scoring the function based on name
handlerand whether it has 3 params (event, context, callback) or 1-2 params (event, [context]) for async functions.
- Make sure it doesn't escape through a renamed reference.