github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/resources/metadata/npmExecuteLint.yaml (about)

     1  metadata:
     2    name: npmExecuteLint
     3    aliases:
     4      - name: executeNpm
     5    description: Execute ci-lint script on all npm packages in a project or execute default linting
     6    longDescription: |
     7      Execute ci-lint script for all package json files, if they implement the script. If no ci-lint script is defined,
     8      either use ESLint configurations present in the project or use the provided general purpose configuration to run ESLint.
     9  spec:
    10    inputs:
    11      params:
    12        - name: install
    13          type: bool
    14          description: Run npm install or similar commands depending on the project structure.
    15          scope:
    16            - PARAMETERS
    17            - STAGES
    18            - STEPS
    19          default: false
    20        - name: runScript
    21          type: string
    22          description: List of additional run scripts to execute from package.json.
    23          scope:
    24            - PARAMETERS
    25            - STAGES
    26            - STEPS
    27          default: "ci-lint"
    28        - name: failOnError
    29          type: bool
    30          description: Defines the behavior in case linting errors are found.
    31          scope:
    32            - PARAMETERS
    33            - STAGES
    34            - STEPS
    35          mandatory: false
    36          default: false
    37        - name: defaultNpmRegistry
    38          type: string
    39          description: URL of the npm registry to use. Defaults to https://registry.npmjs.org/
    40          scope:
    41            - PARAMETERS
    42            - GENERAL
    43            - STAGES
    44            - STEPS
    45          mandatory: false
    46          aliases:
    47            - name: npm/defaultNpmRegistry
    48        - name: outputFormat
    49          type: string
    50          description: eslint output format, e.g. stylish, checkstyle
    51          scope:
    52            - PARAMETERS
    53            - GENERAL
    54            - STAGES
    55            - STEPS
    56          mandatory: false
    57          default: checkstyle
    58          aliases:
    59            - name: npm/outputFormat
    60        - name: outputFileName
    61          type: string
    62          description: name of the output file. There might be a 'N_' prefix where 'N' is a number. When the empty string is provided, we will print to console
    63          scope:
    64            - PARAMETERS
    65            - GENERAL
    66            - STAGES
    67            - STEPS
    68          mandatory: false
    69          default: defaultlint.xml
    70          aliases:
    71            - name: npm/outputFormat
    72    containers:
    73      - name: node
    74        image: node:lts-buster