add eslint & stylelint
This commit is contained in:
parent
54801f5794
commit
8304f549f4
4 changed files with 54 additions and 2 deletions
21
lint/eslint.yml
Normal file
21
lint/eslint.yml
Normal file
|
|
@ -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"
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
include:
|
||||
- project: 'ldc-web/shared-ci'
|
||||
ref: 'main'
|
||||
file: 'lint/phpcs.yml'
|
||||
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'
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
include:
|
||||
- project: 'ldc-web/shared-ci'
|
||||
ref: 'main'
|
||||
file: 'lint/phpcs7.3.yml'
|
||||
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'
|
||||
19
lint/stylelint.yml
Normal file
19
lint/stylelint.yml
Normal file
|
|
@ -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"
|
||||
Loading…
Add table
Reference in a new issue