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

Setting up GitHub Action for CSS and future linting #1957

Merged
merged 4 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint Code Base
averdin2 marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
branches: [gh-pages]

jobs:
build:
name: Lint Code Base
averdin2 marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
averdin2 marked this conversation as resolved.
Show resolved Hide resolved
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


LINTER_RULES_PATH: /
CSS_FILE_NAME: .stylelintrc.json
VALIDATE_CSS: true
21 changes: 21 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"rules": {
"color-no-invalid-hex": true,
"unit-no-unknown": true,
"property-no-unknown": true,
macho-catt marked this conversation as resolved.
Show resolved Hide resolved
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": ["consecutive-duplicates-with-different-values"]
}
],
"declaration-block-no-shorthand-property-overrides": true,
"block-no-empty": true,
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-element-no-unknown": true,
"selector-type-no-unknown": true,
"comment-no-empty": true,
"no-duplicate-selectors": true,
"no-extra-semicolons": true
}
}