mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 16:40:36 +00:00
c77e5a1a90
Divides the css into sub-files and normalizes how colors are defined. Co-authored-by: Joachim <joachim.robert@protonmail.com>
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
|
name: Lint Frontend (run `./bw-dev stylelint` to fix css errors)
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, ci, frontend ]
|
|
paths:
|
|
- '.github/workflows/**'
|
|
- 'static/**'
|
|
- '.eslintrc'
|
|
- '.stylelintrc.js'
|
|
pull_request:
|
|
branches: [ main, ci, frontend ]
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint with stylelint and ESLint.
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install modules
|
|
run: npm install stylelint stylelint-config-recommended stylelint-config-standard stylelint-order eslint
|
|
|
|
# See .stylelintignore for files that are not linted.
|
|
- name: Run stylelint
|
|
run: >
|
|
npx stylelint bookwyrm/static/css/*.scss bookwyrm/static/css/bookwyrm/**/*.scss \
|
|
--config dev-tools/.stylelintrc.js
|
|
|
|
# See .eslintignore for files that are not linted.
|
|
- name: Run ESLint
|
|
run: >
|
|
npx eslint bookwyrm/static \
|
|
--ext .js,.jsx,.ts,.tsx
|