diff --git a/web/.husky/pre-commit b/web/.husky/pre-commit index 70d516da0..5ac6827e9 100755 --- a/web/.husky/pre-commit +++ b/web/.husky/pre-commit @@ -1,5 +1,13 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -cd web -npx lint-staged +# Check for changes in specific folders +CHANGED_FILES=$(git diff --cached --name-only) + +if echo "$CHANGED_FILES" | grep -E '^(web/src/ar/)' > /dev/null; then + echo "Running checks for changes in src/ar" + cd web + npx lint-staged +else + echo "No changes in src/ar, skipping checks" +fi \ No newline at end of file diff --git a/web/.lintstagedrc.yml b/web/.lintstagedrc.yml index d15c9b92f..b6cc696b5 100644 --- a/web/.lintstagedrc.yml +++ b/web/.lintstagedrc.yml @@ -1,5 +1,5 @@ # Apply checks for artifact registry (ar) code -'*': 'sh src/ar/scripts/license/stamp.sh' +'src/ar/**/*': 'sh src/ar/scripts/license/stamp.sh' 'src/ar/**/*.{ts,tsx,p1}': 'prettier --check' 'src/ar/**/*.{ts,tsx,p2}': 'eslint --rulesdir src/ar/scripts/eslint-rules' 'src/ar/**/*.{ts,tsx,p3}': 'sh src/ar/scripts/typecheck-staged.sh' diff --git a/web/src/framework/strings/stringTypes.ts b/web/src/framework/strings/stringTypes.ts index 0e58f5711..be894bab0 100644 --- a/web/src/framework/strings/stringTypes.ts +++ b/web/src/framework/strings/stringTypes.ts @@ -1,19 +1,3 @@ -/* - * Copyright 2024 Harness, Inc. - * - * 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. - */ - /** * This file is auto-generated. Please do not modify this file manually. * Use the command `yarn strings` to regenerate this file.