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

feature: otter create brings eslint and version harmonize #2809

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vscaiceanu-1a
Copy link
Member

@vscaiceanu-1a vscaiceanu-1a requested a review from a team as a code owner February 6, 2025 07:28
Copy link

nx-cloud bot commented Feb 6, 2025

View your CI Pipeline Execution ↗ for commit a4405f0.

Command Status Duration Result
nx run-many --target=test-int ❌ Failed 1h 53m 58s View ↗
nx run-many --target=test-e2e ✅ Succeeded 9m 31s View ↗
nx run-many --target=build --projects=eslint-pl... ✅ Succeeded <1s View ↗
nx run-many --target=publish --nx-bail --userco... ✅ Succeeded 29s View ↗
nx run-many --target=prepare-publish --exclude-... ✅ Succeeded 1m 19s View ↗
nx run-many --target=documentation ✅ Succeeded 1m 12s View ↗
nx affected --target=test --collectCoverage ✅ Succeeded 1m 31s View ↗
nx run ama-sdk-schematics:build-swagger ✅ Succeeded 4s View ↗
Additional runs (3) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-02-24 17:47:32 UTC

@vscaiceanu-1a vscaiceanu-1a marked this pull request as draft February 6, 2025 07:29
@vscaiceanu-1a vscaiceanu-1a force-pushed the feature/schematics-version-harmonize branch 2 times, most recently from fa0e262 to 4ee2482 Compare February 6, 2025 16:31
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 66.78%. Comparing base (a026fc1) to head (a4405f0).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ages/@o3r/eslint-config/schematics/ng-add/index.ts 83.33% 2 Missing ⚠️
...@o3r/workspace/schematics/rule-factories/linter.ts 66.66% 1 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vscaiceanu-1a vscaiceanu-1a force-pushed the feature/schematics-version-harmonize branch from 4ee2482 to e073464 Compare February 7, 2025 17:24
@vscaiceanu-1a vscaiceanu-1a force-pushed the feature/schematics-version-harmonize branch from e073464 to 94dad11 Compare February 13, 2025 15:36
const postInstall = rootPackageJsonObject.scripts?.postinstall;
rootPackageJsonObject.scripts = {
...rootPackageJsonObject.scripts,
harmonize: `eslint '**/package.json*' ${isYarnPackageManager ? '.yarnrc.yml' : ''} --quiet --fix`,
Copy link
Contributor

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';
Copy link
Contributor

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));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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));

@vscaiceanu-1a vscaiceanu-1a force-pushed the feature/schematics-version-harmonize branch from 94dad11 to 71a6f31 Compare February 21, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants