-
Notifications
You must be signed in to change notification settings - Fork 41
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
feature: otter create brings eslint and version harmonize #2809
base: main
Are you sure you want to change the base?
Conversation
View your CI Pipeline Execution ↗ for commit a4405f0.
☁️ Nx Cloud last updated this comment at |
fa0e262
to
4ee2482
Compare
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files☔ View full report in Codecov by Sentry. |
4ee2482
to
e073464
Compare
e073464
to
94dad11
Compare
const postInstall = rootPackageJsonObject.scripts?.postinstall; | ||
rootPackageJsonObject.scripts = { | ||
...rootPackageJsonObject.scripts, | ||
harmonize: `eslint '**/package.json*' ${isYarnPackageManager ? '.yarnrc.yml' : ''} --quiet --fix`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how, but we need to find a way to trigger another install after a successful harmonize
currently we have to run the install twice which is not ideal
*/ | ||
const addHarmonizeScript = (): Rule => { | ||
return (tree: Tree) => { | ||
const rootPackageJsonPath = '/package.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not need to be defined in the function
} | ||
|
||
return useOtterLinter; | ||
return !!tree.root.subfiles.some((file) => /\.eslintrc(\.json|\.js|\.yaml|\.yml)?$/.test(file)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return !!tree.root.subfiles.some((file) => /\.eslintrc(\.json|\.js|\.yaml|\.yml)?$/.test(file)); | |
return !!tree.root.subfiles.some((file) => /\.eslintrc\.(?:json|js|ya?ml)?$/.test(file)); |
94dad11
to
71a6f31
Compare
71a6f31
to
a4405f0
Compare
Related issues