diff --git a/lint/eslint.yml b/lint/eslint.yml new file mode 100644 index 0000000..644180d --- /dev/null +++ b/lint/eslint.yml @@ -0,0 +1,21 @@ +eslint: + stage: lint + image: node:17.9.0 + before_script: + - npm install + cache: + paths: + - node_modules/ + script: + - npm run eslint-ci --silent > eslint-report.xml + artifacts: + when: on_failure + expose_as: 'eslint' + paths: + - eslint-report.xml + reports: + junit: eslint-report.xml + allow_failure: false + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "develop" diff --git a/lint/lint.yml b/lint/lint.yml index c83d729..56fb7df 100644 --- a/lint/lint.yml +++ b/lint/lint.yml @@ -1,4 +1,10 @@ include: - project: 'ldc-web/shared-ci' ref: 'main' - file: 'lint/phpcs.yml' \ No newline at end of file + file: 'lint/phpcs.yml' + - project: 'ldc-web/shared-ci' + ref: 'main' + file: 'lint/eslint.yml' + - project: 'ldc-web/shared-ci' + ref: 'main' + file: 'lint/stylelint.yml' \ No newline at end of file diff --git a/lint/lint7.3.yml b/lint/lint7.3.yml index 2fc2277..39606b2 100644 --- a/lint/lint7.3.yml +++ b/lint/lint7.3.yml @@ -1,4 +1,10 @@ include: - project: 'ldc-web/shared-ci' ref: 'main' - file: 'lint/phpcs7.3.yml' \ No newline at end of file + file: 'lint/phpcs7.3.yml' + - project: 'ldc-web/shared-ci' + ref: 'main' + file: 'lint/eslint.yml' + - project: 'ldc-web/shared-ci' + ref: 'main' + file: 'lint/stylelint.yml' \ No newline at end of file diff --git a/lint/stylelint.yml b/lint/stylelint.yml new file mode 100644 index 0000000..a5de0e1 --- /dev/null +++ b/lint/stylelint.yml @@ -0,0 +1,19 @@ +stylelint: + stage: lint + image: node:17.9.0 + before_script: + - npm install + cache: + paths: + - node_modules/ + script: + - npm run stylelint-ci --silent > stylelint-report.json + artifacts: + when: on_failure + expose_as: 'stylelint' + paths: + - stylelint-report.json + allow_failure: false + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "develop" \ No newline at end of file