diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..0ea551c9 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,13 @@ +name: Test +on: [push] + +jobs: + linters: + name: stylelint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Run stylelint + run: + make run_linter \ No newline at end of file diff --git a/Makefile b/Makefile index 3d90ef16..83afc576 100644 --- a/Makefile +++ b/Makefile @@ -29,3 +29,8 @@ update_translations: ## update strings to be translated compile_translations: ## compile .mo files into .po files pybabel compile -f -D django -d $(theme)/conf/locale/; \ pybabel compile -f -D djangojs -d $(theme)/conf/locale/ + + +run_linter: + npm install --save-dev stylelint @edx/stylelint-config-edx + npx stylelint "**/*.scss" \ No newline at end of file diff --git a/stylelint.config.js b/stylelint.config.js new file mode 100644 index 00000000..833dbc15 --- /dev/null +++ b/stylelint.config.js @@ -0,0 +1,4 @@ +module.exports = { + extends: '@edx/stylelint-config-edx' + }; + \ No newline at end of file