Skip to content

Commit

Permalink
Add stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitahl committed Feb 28, 2025
1 parent f6d71be commit 6c4f6b4
Show file tree
Hide file tree
Showing 9 changed files with 937 additions and 62 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Lint Code Base
on: [push, pull_request]

jobs:
lint:
name: Run ESLint
codestyle:
name: Run Codestyle checks
runs-on: ubuntu-latest

steps:
Expand All @@ -23,3 +23,7 @@ jobs:
- name: Run ESLint
run: |
npm run lint
- name: Run Stylelint
run: |
npm run lint:css
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- 'v*.*.*' # Triggers the workflow on tag push like v1.0.0

jobs:
lint:
name: Run ESLint
codestyle:
name: Run Codestyle checks
runs-on: ubuntu-latest

steps:
Expand All @@ -26,6 +26,11 @@ jobs:
- name: Run ESLint
run: |
npm run lint
- name: Run Stylelint
run: |
npm run lint:css
create_release:
runs-on: ubuntu-latest

Expand Down
17 changes: 17 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "stylelint-config-standard",
"rules": {
"color-no-invalid-hex": true,
"font-family-no-duplicate-names": true,
"font-family-no-missing-generic-family-keyword": true,
"selector-type-no-unknown": true,
"no-duplicate-selectors": true,
"selector-class-pattern": null,
"selector-id-pattern": null,
"color-function-notation": "legacy",
"alpha-value-notation": "number",
"length-zero-no-unit": true,
"media-feature-range-notation": "prefix",
"rule-empty-line-before": "always"
}
}
4 changes: 2 additions & 2 deletions assets/css/sidebar-for-wpb-admin.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.sfw-label{
.sfw-label {
display: flex;
justify-content: space-between;
align-items: center;
Expand Down Expand Up @@ -31,7 +31,7 @@
width: 300px;
border-radius: 5px;
padding: 10px;
box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 6px;
box-shadow: rgba(0, 0, 0, 0.25) 0 4px 6px;
z-index: 1;
}

4 changes: 2 additions & 2 deletions assets/css/sidebar-for-wpb-admin.min.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.sfw-label{
.sfw-label {
display: flex;
justify-content: space-between;
align-items: center;
Expand Down Expand Up @@ -31,7 +31,7 @@
width: 300px;
border-radius: 5px;
padding: 10px;
box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 6px;
box-shadow: rgba(0, 0, 0, 0.25) 0 4px 6px;
z-index: 1;
}

1 change: 1 addition & 0 deletions assets/css/sidebar-for-wpb.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/css/sidebar-for-wpb.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6c4f6b4

Please sign in to comment.