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

feat: Add autoformat and lint for ts/tsx files #26453

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Palid
Copy link
Contributor

@Palid Palid commented Oct 26, 2023

Implementation of autoformatting&autolinting on precommit hook.

Solves #18230 (2/3)


This change is marked as an internal change (Task), so will not be included in the changelog.

@Palid Palid requested review from a team as code owners October 26, 2023 12:54
@Palid Palid requested review from t3chguy and richvdh October 26, 2023 12:54
@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Oct 26, 2023
@richvdh richvdh removed their request for review November 1, 2023 09:08
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Would be good to run prettier on all [compatible?] files, and stylelint on styles too

.lintstagedrc Outdated Show resolved Hide resolved
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Would be good to run prettier on all [compatible?] files, and stylelint on styles too

@Palid Palid force-pushed the feat/lint-staged branch 3 times, most recently from 7dc6971 to 1f86a2b Compare November 22, 2023 12:11
@t3chguy t3chguy added the T-Task Tasks for the team like planning label Nov 22, 2023
@Palid
Copy link
Contributor Author

Palid commented Nov 22, 2023

@t3chguy what about now?

{
"src/**/*.(ts|tsx)": ["eslint --fix"],
"module_system/**/*.(ts|tsx)": ["eslint --fix --config .eslintrc-module_system.js module_system"],
"**/*.(ts|tsx)": ["prettier --write"],
Copy link
Member

Choose a reason for hiding this comment

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

Seems like prettier isn't running on pcss, md, json, etc

Comment on lines +2 to +4
"src/**/*.(ts|tsx)": ["eslint --fix"],
"module_system/**/*.(ts|tsx)": ["eslint --fix --config .eslintrc-module_system.js module_system"],
"**/*.(ts|tsx)": ["prettier --write"],
Copy link
Member

Choose a reason for hiding this comment

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

Won't these possibly conflict/race with each other as they are run in parallel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants