Skip to content

Commit

Permalink
CSS linting integrated into pre-commit (apache#8218)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanahamilton committed Apr 9, 2020
1 parent 08c9b0a commit 6aa4f53
Show file tree
Hide file tree
Showing 11 changed files with 2,190 additions and 862 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -348,3 +348,10 @@ repos:
entry: "./scripts/ci/pre_commit_bat_tests.sh"
files: ^breeze$|^breeze-complete$|\.sh$|\.bash$
pass_filenames: false
- id: stylelint
name: stylelint
entry: "stylelint"
language: node
files: ^airflow/www/.*\.(css|scss|sass)$
# Keep dependency versions in sync w/ airflow/www/package.json
additional_dependencies: ['stylelint@13.3.1', 'stylelint-config-standard@20.0.0']
2 changes: 2 additions & 0 deletions .rat-excludes
Expand Up @@ -13,6 +13,8 @@
.eslintignore
.flake8
.rat-excludes
.stylelintignore
.stylelintrc
requirements
requirements.txt
.*log
Expand Down
2 changes: 2 additions & 0 deletions STATIC_CODE_CHECKS.rst
Expand Up @@ -98,6 +98,8 @@ require Breeze Docker images to be installed locally:
----------------------------------- ---------------------------------------------------------------- ------------
``shellcheck`` Checks shell files with shellcheck.
----------------------------------- ---------------------------------------------------------------- ------------
``stylelint`` Checks CSS files with stylelint.
----------------------------------- ---------------------------------------------------------------- ------------
``update-breeze-file`` Update output of breeze command in BREEZE.rst.
----------------------------------- ---------------------------------------------------------------- ------------
``yamllint`` Checks yaml files with yamllint.
Expand Down
2 changes: 2 additions & 0 deletions airflow/www/.stylelintignore
@@ -0,0 +1,2 @@
node_modules
static/dist/
3 changes: 3 additions & 0 deletions airflow/www/.stylelintrc
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-standard"
}
2 changes: 2 additions & 0 deletions airflow/www/package.json
Expand Up @@ -51,6 +51,8 @@
"mini-css-extract-plugin": "^0.4.1",
"moment-locales-webpack-plugin": "^1.2.0",
"style-loader": "^0.21.0",
"stylelint": "^13.3.1",
"stylelint-config-standard": "^20.0.0",
"url-loader": "^1.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
Expand Down

0 comments on commit 6aa4f53

Please sign in to comment.