Add Lint Check for Copyright Headers in UI (#21692)

add lint check for headers in UI

Signed-off-by: bupd <bupdprasanth@gmail.com>
This commit is contained in:
Prasanth Baskar 2025-03-14 18:09:18 +05:30 committed by GitHub
parent 393db991dc
commit 3407776e38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 0 deletions

View File

@ -42,6 +42,15 @@
"rules": { "rules": {
"prettier/prettier": ["error", { "parser": "angular" }] "prettier/prettier": ["error", { "parser": "angular" }]
} }
},
{
"files": ["src/**/*.ts"],
"plugins": [
"header"
],
"rules": {
"header/header": [2, "./copyright.tmpl.js"]
}
} }
] ]
} }

View File

@ -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.

View File

@ -52,6 +52,7 @@
"cypress": "13.1.0", "cypress": "13.1.0",
"eslint": "^8.57.1", "eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0", "eslint-config-prettier": "^8.10.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"express": "^4.21.0", "express": "^4.21.0",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",
@ -8544,6 +8545,15 @@
"eslint": ">=7.0.0" "eslint": ">=7.0.0"
} }
}, },
"node_modules/eslint-plugin-header": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz",
"integrity": "sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==",
"dev": true,
"peerDependencies": {
"eslint": ">=7.7.0"
}
},
"node_modules/eslint-plugin-prettier": { "node_modules/eslint-plugin-prettier": {
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz",

View File

@ -70,6 +70,7 @@
"cypress": "13.1.0", "cypress": "13.1.0",
"eslint": "^8.57.1", "eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0", "eslint-config-prettier": "^8.10.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"express": "^4.21.0", "express": "^4.21.0",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",