Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
* Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved.
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
Expand Down Expand Up @@ -33,6 +33,48 @@ export default [
'**/test-output',
],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'],
ignores: [
'**/*.test.*',
'**/*.spec.*',
'**/vite.config.*',
'**/vitest.config.*',
'**/vitest.setup.*',
'**/eslint.config.*',
],
plugins: {
'local-rules': {
rules: {
'ping-copyright': {
meta: {
type: 'suggestion',
messages: { missing: 'Missing Ping Identity copyright header.' },
},
create(context) {
return {
Program(node) {
const src = context.getSourceCode();
const comments = src.getAllComments();
const first = comments[0];
if (
!first ||
first.range[0] > 0 ||
!/Copyright[\s\S]*Ping Identity/i.test(first.value)
) {
context.report({ node, messageId: 'missing' });
}
},
};
},
},
},
},
},
rules: {
'local-rules/ping-copyright': 'warn',
},
},
...compat.extends('plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'),
{
plugins: {
Expand Down
3 changes: 3 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ pre-commit:
commands:
nx-sync:
run: pnpm nx sync
copyright-sync:
run: node tools/copyright/sync-header-years.mjs --fix
stage_fixed: true
nx-check:
run: pnpm nx affected -t typecheck lint build api-report --tui=false
stage_fixed: true
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"circular-dep-check": "madge --circular .",
"clean": "shx rm -rf ./{coverage,dist,docs,node_modules,tmp}/ ./{packages,e2e}/*/{dist,node_modules}/ ./e2e/node_modules/ && git clean -fX -e \"!.env*,nx-cloud.env\" -e \"!**/GEMINI.md\"",
"commit": "git cz",
"copyright:check": "node tools/copyright/sync-header-years.mjs --check",
"copyright:sync": "node tools/copyright/sync-header-years.mjs --fix",
"commitlint": "commitlint --edit",
"create-package": "nx g @nx/js:library",
"format": "pnpm nx format:write",
Expand All @@ -45,7 +47,6 @@
"path": "./node_modules/cz-conventional-changelog"
}
},
"dependencies": {},
"devDependencies": {
"@changesets/changelog-github": "^0.6.0",
"@changesets/cli": "^2.27.9",
Expand Down
91 changes: 52 additions & 39 deletions pnpm-lock.yaml

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

Loading
Loading