Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): resolve eslint plugins relative to cdk-build-tools #5528

Merged
merged 2 commits into from
Dec 23, 2019

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Dec 23, 2019

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".


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

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".`
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 23, 2019
@@ -22,6 +22,7 @@ export async function compileCurrentPackage(timers: Timers, options: CDKBuildOpt
'.',
'--ext=.js,.ts',
'--ignore-path=.gitignore',
`--resolve-plugins-relative-to=${__dirname}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'll only work "by luck" because everything is hoisted to the root. Most of the linters are, in fact, installed by dependency of cdk-build-tools and expected to resolve relative to there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__dirname is cdk-build-tools/lib which will resolve to the deps of cdk-build-tools, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I somehow though about it in the other way around. The actual problem at hand is caused (or maybe also caused) by missing --no-eslintrc here actually.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@eladb eladb merged commit bc34d0a into master Dec 23, 2019
@eladb eladb deleted the benisrae/fix-build branch December 23, 2019 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants