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

Add Prettier as a script to help enforcing code style #861

Closed
Rodrigoplp-work opened this issue Oct 25, 2022 · 1 comment · Fixed by #973
Closed

Add Prettier as a script to help enforcing code style #861

Rodrigoplp-work opened this issue Oct 25, 2022 · 1 comment · Fixed by #973
Assignees
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed

Comments

@Rodrigoplp-work
Copy link
Contributor

Prettier allows the definition of code style for the project.

Install Prettier, define the rules and setup a script in ./package.json so that it can be used by everyone, regardless of the IDE / code editor of preference.

Also, once the script is ready, it can be added to the build workflow to automatically check the code on every commit.

@marco-miller marco-miller added help wanted Extra attention is needed dependencies Pull requests that update a dependency file labels Oct 25, 2022
@Rodrigoplp-work Rodrigoplp-work self-assigned this Nov 2, 2022
@marco-miller
Copy link
Contributor

A teammate is about to push a PR as work just restarted on this internally.

EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 19, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 19, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 19, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 19, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 19, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 20, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 20, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 20, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 21, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 24, 2023
EstFoisy pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 24, 2023
hoangphamEclipse pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 24, 2023
hoangphamEclipse pushed a commit to EstFoisy/theia-trace-extension that referenced this issue Apr 24, 2023
This commit adds Prettier to the trace extension. Prettier allows the
extension to define rules for code style and formatting. This helps keep
the format of the code consistent and allow quick formatting of new code.

Fix eclipse-cdt-cloud#861.
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 9, 2023
This commit adds Prettier to enforce code style for the trace
extension.

Contributors can run yarn format to automatically run Prettier
to format the source code of the  three packages 	raceviewer-base,
	raceviewer-react-components, and 	heia-traceviewer. Alternatively,
they can run Prettier on a single file using the command
yarn prettier --write <file-name>.

This commit also configures CI to run yarn prettier --check to ensure
that any new code follows the pre-defined code style rules.

Replaces eclipse-cdt-cloud#968 and resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 9, 2023
This commit adds Prettier to enforce code style for the trace
extension.

Contributors can run yarn format to automatically run Prettier
to format the source code of the  three packages 	raceviewer-base,
	raceviewer-react-components, and 	heia-traceviewer. Alternatively,
they can run Prettier on a single file using the command
yarn prettier --write <file-name>.

This commit also configures CI to run yarn prettier --check to ensure
that any new code follows the pre-defined code style rules.

Replaces eclipse-cdt-cloud#968 and resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 9, 2023
This commit adds Prettier to enforce code style for the trace
extension.

Contributors can run yarn format to automatically run Prettier
to format the source code of the  three packages 	raceviewer-base,
	raceviewer-react-components, and 	heia-traceviewer. Alternatively,
they can run Prettier on a single file using the command
yarn prettier --write <file-name>.

This commit also configures CI to run yarn prettier --check to ensure
that any new code follows the pre-defined code style rules.

Replaces eclipse-cdt-cloud#968 and resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 9, 2023
This commit adds Prettier to enforce code style for the trace
extension.

Contributors can run yarn format to automatically run Prettier
to format the source code of the  three packages traceviewer-base,
traceviewer-react-components, and theia-traceviewer. Alternatively,
they can run Prettier on a single file using the command
yarn prettier --write <file-name>.

This commit also configures CI to run yarn prettier --check to ensure
that any new code follows the pre-defined code style rules.

Replaces eclipse-cdt-cloud#968 and resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 10, 2023
This commit adds Prettier to enforce code style for the trace
extension.

Contributors can run yarn format to automatically run Prettier
to format the source code of the  three packages traceviewer-base,
traceviewer-react-components, and theia-traceviewer. Alternatively,
they can run Prettier on a single file using the command
yarn prettier --write <file-name>.

This commit also configures CI to run yarn prettier --check to ensure
that any new code follows the pre-defined code style rules.

Replaces eclipse-cdt-cloud#968 and resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 10, 2023
This commit applies the changes made by running yarn format:write to
format the source code of the three the three packages 	raceviewer-base,
	raceviewer-react-components, and 	heia-traceviewer using Prettier.

Resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 10, 2023
This commit applies the changes made by running yarn format:write to
format the source code of the three the three packages traceviewer-base,
traceviewer-react-components, and theia-traceviewer using Prettier.

Resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 10, 2023
This commit adds a .git-blame-ignore-revs file to ignore linting/
formatting commits while using git blame. It also documents its usage
in CONTRIBUTING.md for future references.

Resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit to hoangphamEclipse/theia-trace-extension that referenced this issue May 10, 2023
This commit adds documentation on how to run Prettier to check and format
code for contributors of the Trace Extension.

Resolves eclipse-cdt-cloud#861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit that referenced this issue May 15, 2023
This commit adds Prettier to enforce code style for the trace
extension.

Contributors can run yarn format to automatically run Prettier
to format the source code of the  three packages traceviewer-base,
traceviewer-react-components, and theia-traceviewer. Alternatively,
they can run Prettier on a single file using the command
yarn prettier --write <file-name>.

This commit also configures CI to run yarn prettier --check to ensure
that any new code follows the pre-defined code style rules.

Replaces #968 and resolves #861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit that referenced this issue May 15, 2023
This commit applies the changes made by running yarn format:write to
format the source code of the three the three packages traceviewer-base,
traceviewer-react-components, and theia-traceviewer using Prettier.

Resolves #861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit that referenced this issue May 15, 2023
This commit adds a .git-blame-ignore-revs file to ignore linting/
formatting commits while using git blame. It also documents its usage
in CONTRIBUTING.md for future references.

Resolves #861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
hoangphamEclipse added a commit that referenced this issue May 15, 2023
This commit adds documentation on how to run Prettier to check and format
code for contributors of the Trace Extension.

Resolves #861.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed
Projects
None yet
3 participants