Skip to content

Commit

Permalink
chore: add eslint config for demo file (#9002)
Browse files Browse the repository at this point in the history
  • Loading branch information
WwwHhhYran authored Feb 13, 2025
1 parent d70a768 commit 1f8f4da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion components/cascader/demo/custom-template.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';

Expand Down
3 changes: 1 addition & 2 deletions components/cron-expression/demo/semantic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { FormsModule } from '@angular/forms';

import { parseExpression } from 'cron-parser';

import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzCronExpressionModule } from 'ng-zorro-antd/cron-expression';

@Component({
Expand All @@ -27,7 +26,7 @@ export class NzDemoCronExpressionSemanticComponent {
try {
const interval = parseExpression(value);
this.semantic = interval.next().toDate();
} catch (err: NzSafeAny) {
} catch {
return;
}
}
Expand Down
9 changes: 7 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export default tseslint.config(
'dist/',
'scripts/site/{_site,template}/**/*',
'junit/',
'coverage-report/',
'components/**/demo/**/*'
'coverage-report/'
]
},
{
Expand Down Expand Up @@ -187,6 +186,12 @@ export default tseslint.config(
yoda: 'error'
}
},
{
files: ['components/**/demo/*.ts'],
rules: {
'header/header': 'off'
}
},
{
files: ['**/*.html'],
extends: [
Expand Down

0 comments on commit 1f8f4da

Please sign in to comment.