mirror of
https://github.com/goharbor/harbor
synced 2025-04-22 15:28:15 +00:00
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:
parent
393db991dc
commit
3407776e38
@ -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"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
13
src/portal/copyright.tmpl.js
Normal file
13
src/portal/copyright.tmpl.js
Normal 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.
|
10
src/portal/package-lock.json
generated
10
src/portal/package-lock.json
generated
@ -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",
|
||||||
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user