1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-30 05:59:39 +02:00
sap-jenkins-library/resources/metadata/npmExecuteLint.yaml
Kevin Hudemann 60fa1d5bbf
Add Java-/Typescript linting capabilities (#1636)
This change adds linting support for Java-/TypeScript projects based on the checkDefaultLint and checkUserLint steps from Cloud SDK Pipeline.

Following options are supported:

1. Define a linting script named ci-lint in the package.json file(s) of the project
2. Provide a configuration for ESLint as part of the project
3. If none of the above: ESLint is executed with a general purpose configuration.

Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-06-22 10:12:28 +02:00

48 lines
1.5 KiB
YAML

metadata:
name: npmExecuteLint
aliases:
- name: executeNpm
description: Execute ci-lint script on all npm packages in a project or execute default linting
longDescription: |
Execute ci-lint script for all package json files, if they implement the script. If no ci-lint script is defined,
either use ESLint configurations present in the project or use the provided general purpose configuration to run ESLint.
spec:
inputs:
params:
- name: failOnError
type: bool
description: Defines the behavior in case linting errors are found.
scope:
- PARAMETERS
- STAGES
- STEPS
mandatory: false
default: false
- name: defaultNpmRegistry
type: string
description: URL of the npm registry to use. Defaults to https://registry.npmjs.org/
scope:
- PARAMETERS
- GENERAL
- STAGES
- STEPS
mandatory: false
aliases:
- name: npm/defaultNpmRegistry
- name: sapNpmRegistry
type: string
description: The default npm registry URL to be used as the remote mirror for the SAP npm packages.
scope:
- PARAMETERS
- GENERAL
- STAGES
- STEPS
mandatory: false
default: https://npm.sap.com
aliases:
- name: npm/sapNpmRegistry
containers:
- name: node
image: node:12-buster-slim
imagePullPolicy: Never