Skip to content

Formatting for scss - #2758

Open
geromequa wants to merge 4 commits into
e-valuation:mainfrom
geromequa:scss-formatter
Open

Formatting for scss#2758
geromequa wants to merge 4 commits into
e-valuation:mainfrom
geromequa:scss-formatter

Conversation

@geromequa

Copy link
Copy Markdown
Collaborator

Adds formatting for .scss using prettier.

@niklasmohrin niklasmohrin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tests failing

Comment on lines +44 to +47
$print: index(map-keys($breakpoints), $lower) <=
$print-index and
$print-index <=
index(map-keys($breakpoints), $upper);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is weird -- why can't we format it as

index(map-keys($breakpoints), $lower) <= $print-index
and $print-index <= index(map-keys($breakpoints), $upper);

? This should fit within 120 columns with ease

Comment thread evap/static/scss/.prettierrc.json Outdated
@geromequa
geromequa requested a review from niklasmohrin July 20, 2026 15:43

@niklasmohrin niklasmohrin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we even have this? can't we just use the same file as for typescript? and if not, we should just use a symlink

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

without this file prettier does not work properly for scss. symlink could work, but by now the scss config does not have the arrowPens option anymore, which we want in the ts config. See #2758 (comment).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

symlinking one file is also fine for me (I just don't want a full separate copy of the file that includes attributes that don't make sense)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would expect that we can just have some global config for prettier. And a simple Google search reveals: yes, we can. according to https://prettier.io/docs/configuration, we can just specify everything in package.json and this config applies to all target files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants