You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: deploy/ods-pipeline/charts/tasks/templates/task-ods-build-npm.yaml
+6-15Lines changed: 6 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,16 @@ spec:
12
12
The following steps are executed:
13
13
14
14
- checks that package.json and package-lock.json exists to require best practice of using lock files. See also link:https://github.com/opendevstack/ods-pipeline/discussions/411[discussion 411]
15
-
- linting using `eslint`
15
+
- linting using `npm run lint`
16
16
- build application, using `npm run build`
17
17
- test execution
18
18
- SonarQube quality scan
19
19
20
-
For `eslint` to work there needs to be a config file (`eslintrc.json` or similar) at the root of the working directory.
21
-
This can be done by running `eslint --init` or by following the link:https://eslint.org/docs/user-guide/getting-started[official documentation]
20
+
For linting to work there needs to be a `lint` task in the `package.json` file,
21
+
for example `npx eslint src --format compact`, together with a config file
22
+
(`eslintrc.json` or similar) at the root of the working directory. This can
23
+
be done by running `eslint --init` or by following the
For single build repos enabling build caching has limited benefits. For multi build repos enabling this is recommended unless the build is dependant on files outside of the working directory. See ADR caching-build-tasks for more details and workarounds.
69
72
type: string
70
73
default: "false"
71
-
- name: max-lint-warnings
72
-
description: >-
73
-
Maximum of allowed linting warnings after which eslint will exit with an error.
74
-
Set to "-1" to never exit with an error due to warnings.
75
-
type: string
76
-
default: "0"
77
-
- name: lint-file-ext
78
-
description: File extensions to lint separated by a comma.
Copy file name to clipboardExpand all lines: docs/design/software-design-specification.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -331,7 +331,7 @@ For traceability package.json and package-lock.json are copied into the `dist` d
331
331
332
332
Runs `npm run test`, creating code coverage and xUnit reports. The artifacts are placed in the working directory and in `.ods/artifacts/code-coverage` and `.ods/artifacts/xunit-reports`, respectively.
333
333
334
-
Runs `eslint` to lint the source code and fails if there are any errors or warnings. The files to lint default to all files with an `.js`, `.ts`, `.jsx`, `.tsx`, `.svelte` extension inside `src` and can be set by the `lint-file-ext` task parameter. The amount of allowed warnings defaults to 0 and can be set by the `max-lint-warnings` task parameter.
334
+
Runs `npm run lint` to lint the source code. If there are any errors or warnings, the script should exit with a non-zero exit code.
335
335
336
336
Supplies default SonarQube project properties file if required (SDS-SHARED-3).
Copy file name to clipboardExpand all lines: docs/tasks/ods-build-npm.adoc
+6-13Lines changed: 6 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,16 @@ Builds Node.js applications using NPM.
7
7
The following steps are executed:
8
8
9
9
- checks that package.json and package-lock.json exists to require best practice of using lock files. See also link:https://github.com/opendevstack/ods-pipeline/discussions/411[discussion 411]
10
-
- linting using `eslint`
10
+
- linting using `npm run lint`
11
11
- build application, using `npm run build`
12
12
- test execution
13
13
- SonarQube quality scan
14
14
15
-
For `eslint` to work there needs to be a config file (`eslintrc.json` or similar) at the root of the working directory.
16
-
This can be done by running `eslint --init` or by following the link:https://eslint.org/docs/user-guide/getting-started[official documentation]
15
+
For linting to work there needs to be a `lint` task in the `package.json` file,
16
+
for example `npx eslint src --format compact`, together with a config file
17
+
(`eslintrc.json` or similar) at the root of the working directory. This can
18
+
be done by running `eslint --init` or by following the
@@ -68,16 +71,6 @@ without leading `./` and trailing `/`.
68
71
| If enabled tasks uses or populates cache with the output dir contents (and artifacts) so that a build can be skipped if the `working-dir` contents did not change. For single build repos enabling build caching has limited benefits. For multi build repos enabling this is recommended unless the build is dependant on files outside of the working directory. See ADR caching-build-tasks for more details and workarounds.
69
72
70
73
71
-
| max-lint-warnings
72
-
| 0
73
-
| Maximum of allowed linting warnings after which eslint will exit with an error. Set to "-1" to never exit with an error due to warnings.
wantLintReportContent:="/workspace/source/src/index.ts: line 3, col 31, Warning - Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)\n\n1 problem"
0 commit comments