Skip to content

Commit

Permalink
Add stylelint config file with specific rule adjustments (#316)
Browse files Browse the repository at this point in the history
* build: configure stylelint for CSS and SCSS

* config: add stylelint config file with specific rule adjustments

* install: packages

* fix: spaces

* add: autofix to css/scss files

* fix: fix current stylelint issues

---------

Co-authored-by: fruneen <fruneen@gmail.com>
  • Loading branch information
enhorme and fruneen authored Jul 17, 2024
1 parent 4c11c90 commit b466d98
Show file tree
Hide file tree
Showing 5 changed files with 521 additions and 545 deletions.
26 changes: 26 additions & 0 deletions template/apps/web/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extends": ["stylelint-config-standard-scss"],
"rules": {
"scss/no-duplicate-mixins": null,
"declaration-empty-line-before": null,
"declaration-block-no-redundant-longhand-properties": null,
"alpha-value-notation": null,
"custom-property-empty-line-before": null,
"property-no-vendor-prefix": null,
"color-function-notation": null,
"length-zero-no-unit": null,
"selector-not-notation": null,
"no-descending-specificity": null,
"comment-empty-line-before": null,
"scss/at-mixin-pattern": null,
"scss/at-rule-no-unknown": null,
"value-keyword-case": null,
"media-feature-range-notation": null,
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["global"]
}
]
}
}
6 changes: 6 additions & 0 deletions template/apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@
"prettier-config-custom": "workspace:*",
"storybook": "8.2.0",
"storybook-dark-mode": "4.0.2",
"stylelint": "16.7.0",
"stylelint-config-standard-scss": "13.1.0",
"tsconfig": "workspace:*",
"typescript": "5.2.2"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix"
],
"*.{css,scss}": [
"stylelint --fix",
"prettier --write"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.headerButton {
.header-button {
width: 100%;
display: flex;
line-height: 16px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
.dropzoneRoot {
.dropzone-root {
border: none;
border-radius: 0;
padding: 0;
background-color: transparent;

&:hover .addIcon {
&:hover .add-icon {
color: var(--mantine-color-gray-5);
}

&:hover .browseButton {
&:hover .browse-button {
border: 1px dashed var(--mantine-color-gray-5);
}

&:hover .innerAvatar {
&:hover .inner-avatar {
opacity: 1;
}
}

.browseButton {
.browse-button {
width: 88px;
height: 88px;
border-radius: 50%;
Expand All @@ -33,12 +33,12 @@
border: 1px dashed var(--mantine-color-red-5);
}

.addIcon {
.add-icon {
color: var(--mantine-primary-color-filled);
transition: all 200ms ease-in-out;
}

.innerAvatar {
.inner-avatar {
border-radius: 50%;

opacity: 0;
Expand All @@ -52,12 +52,12 @@
word-wrap: break-word;
}

.buttonContainer {
.button-container {
display: flex;
align-items: center;
}

.errorMessage {
.error-message {
margin-top: 4px;
font-size: 14px;
line-height: 17px;
Expand Down
Loading

0 comments on commit b466d98

Please sign in to comment.