[MGNLFE-350] Apply the same code format and linter for all Created: 13/Oct/22  Updated: 11/Jul/23  Resolved: 03/Mar/23

Status: Closed
Project: Magnolia Frontend Helpers
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4

Type: Improvement Priority: Neutral
Reporter: Phong Le Quoc Assignee: Phong Le Quoc
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 9d 3.75h Time Spent: 9d 3.75h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLFE-351 Strange Angular project structure Open
is related to MGNLFE-353 Remove redundant css in angular/react... Open
is related to MGNLFE-420 Run eslint and prettier for current A... Open
is related to MGNLFE-425 Run eslint and prettier for current R... Open
is related to MGNLFE-426 Run eslint and prettier for current V... Open
is related to MGNLFE-427 Add pre-commit for forcing code format Open
is related to MGNLFE-433 Run eslint and prettier for template-... Open
is related to MGNLFE-352 Upgrade Lerna Accepted
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLFE-416 Implement Sub-task Completed Phong Le Quoc  
MGNLFE-417 Review Sub-task Completed Robert Šiška  
MGNLFE-418 PiQA Sub-task Completed Robert Šiška  
MGNLFE-419 QA Sub-task Completed Milan Divilek  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: SPA Editor Backlog
Sprint: DevX 31, DevX 32
Story Points: 3
Team: DeveloperX
Work Started:

 Description   

Currently:

  • prettier are applied for vue projects
  • tslint are applied for angular projects
  • eslint are applied for vue, react, template-annotations projects
  • stylelint are not applied

 

Therefore, our code are not consistent. Therefore, we should make them consistent by applying prettier, eslint, stylelint for all projects.

 

Reference:
https://prettier.io/docs/en/integrating-with-linters.html
https://www.aiimi.com/insights/using-eslint-prettier-and-stylelint-for-insightmakers-front-end
https://github.com/angular-eslint/angular-eslint#notes-for-eslint-plugin-prettier-users (For Angular)

Note:
We should apply all default configs if possible.



 Comments   
Comment by Canh Nguyen [ 14/Oct/22 ]

We could use eslint with prettier with the same rules for all projects and config lint tasks when building projects.

Comment by Christopher Zimmermann [ 15/Feb/23 ]

Nice initiative!

Generated at Mon Feb 12 05:46:34 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.