Skip to content

Commit

Permalink
chore(build): resolve eslint plugins relative to cdk-build-tools (#5528)
Browse files Browse the repository at this point in the history
plugins are installed centrally under cdk-build-tools and therefore resolution should happen against that module instead of the current module. otherwise, we get an error `ESLint couldn't find the plugin "eslint-plugin-node".`

Furthermore, we also ignore any local .eslintrc files
  • Loading branch information
Elad Ben-Israel authored Dec 23, 2019
1 parent f10b3e6 commit bc34d0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/cdk-build-tools/lib/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export async function compileCurrentPackage(timers: Timers, options: CDKBuildOpt
'.',
'--ext=.js,.ts',
'--ignore-path=.gitignore',
'--no-eslintrc', // ignore local .eslintrc files
`--resolve-plugins-relative-to=${__dirname}`,
...options.eslint?.["ignore-pattern"]?.map(pattern => `--ignore-pattern=${pattern}`) || []
], { timers });
await shell([compilers.tslint || require.resolve('tslint/bin/tslint'), '--project', '.'], { timers });
Expand Down

0 comments on commit bc34d0a

Please sign in to comment.