Skip to content

Commit

Permalink
add lint check for headers in UI
Browse files Browse the repository at this point in the history
Signed-off-by: bupd <[email protected]>
  • Loading branch information
bupd committed Mar 5, 2025
1 parent fef9524 commit f084ef7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/portal/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
"rules": {
"prettier/prettier": ["error", { "parser": "angular" }]
}
},
{
"files": ["src/**/*.ts"],
"plugins": [
"header"
],
"rules": {
"header/header": [2, "./copyright.tmpl.js"]
}
}
]
}
13 changes: 13 additions & 0 deletions src/portal/copyright.tmpl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright Project Harbor Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
11 changes: 11 additions & 0 deletions src/portal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"cypress": "13.1.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-prettier": "^4.2.1",
"express": "^4.21.0",
"https-proxy-agent": "^5.0.1",
Expand Down

0 comments on commit f084ef7

Please sign in to comment.