Skip to content

style(examples): enabled eslint prefer-on-push rule (#DS-2920) #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 16, 2025
Merged
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
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const config = {
'experimental',
'schematics',
'dev',
'examples',

// data-grid
'ag-grid',
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ const componentsExamplesRules = {
files: ['packages/docs-examples/**/*.ts'],
rules: {
'@angular-eslint/prefer-standalone': 1,
'@angular-eslint/use-component-selector': 1
'@angular-eslint/use-component-selector': 1,
'@angular-eslint/prefer-on-push-component-change-detection': 1
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';
import { KbqCheckboxModule } from '@koobiq/components/checkbox';

/**
* @title Accordion content
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-content-example',
templateUrl: 'accordion-content-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';
import { KbqBadgeModule } from '@koobiq/components/badge';
import { KbqCheckboxModule } from '@koobiq/components/checkbox';
Expand All @@ -8,6 +8,7 @@ import { KbqIcon, KbqIconButton } from '@koobiq/components/icon';
* @title Accordion header
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-header-example',
templateUrl: 'accordion-header-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, TemplateRef, ViewChild } from '@angular/core';
import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';
import { KbqButtonModule } from '@koobiq/components/button';
import {
Expand All @@ -12,6 +12,7 @@ import {
* @title Accordion in panel
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-in-panel-example',
templateUrl: 'accordion-in-panel-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';

/**
* @title Accordion in section
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-in-section-example',
templateUrl: 'accordion-in-section-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';

/**
* @title Accordion inactive section
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-inactive-section-example',
templateUrl: 'accordion-inactive-section-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';

/**
* @title Accordion
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-overview-example',
templateUrl: 'accordion-overview-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule } from '@koobiq/components/accordion';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';

/**
* @title Accordion sections
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-sections-example',
templateUrl: 'accordion-sections-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAccordionModule, KbqAccordionVariant } from '@koobiq/components/accordion';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';

/**
* @title Accordion states
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'accordion-states-example',
templateUrl: 'accordion-states-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAlertModule } from '@koobiq/components/alert';
import { KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
Expand All @@ -9,6 +9,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Alert close
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'alert-close-example',
animations: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAlertColors, KbqAlertModule, KbqAlertStyles } from '@koobiq/components/alert';
import { KbqButtonModule, KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
Expand All @@ -10,6 +10,7 @@ import { KbqLinkModule } from '@koobiq/components/link';
* @title Alert content
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'alert-content-example',
templateUrl: 'alert-content-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAlertModule } from '@koobiq/components/alert';
import { KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
Expand All @@ -9,6 +9,7 @@ import { KbqLinkModule } from '@koobiq/components/link';
* @title Alert size
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'alert-size-example',
templateUrl: 'alert-size-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAlertColors, KbqAlertModule, KbqAlertStyles } from '@koobiq/components/alert';
import { KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
Expand All @@ -9,6 +9,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Alert status
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'alert-status-example',
templateUrl: 'alert-status-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { animate, state, style, transition, trigger } from '@angular/animations';
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqAlertColors, KbqAlertModule, KbqAlertStyles } from '@koobiq/components/alert';
import { KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
Expand All @@ -9,6 +9,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Alert variants
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'alert-variants-example',
styleUrls: ['alert-variants-example.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AsyncPipe } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { KbqAutocompleteModule } from '@koobiq/components/autocomplete';
import { KbqFormsModule } from '@koobiq/components/core';
Expand All @@ -12,6 +12,7 @@ import { map, startWith } from 'rxjs/operators';
* @title Autocomplete
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'autocomplete-overview-example',
imports: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqBadgeColors, KbqBadgeModule } from '@koobiq/components/badge';
import { KbqIconModule } from '@koobiq/components/icon';

/**
* @title Badge content
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'badge-content-example',
imports: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqBadgeColors, KbqBadgeModule } from '@koobiq/components/badge';

/**
* @title Badge fill and style
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'badge-fill-and-style-example',
templateUrl: 'badge-fill-and-style-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqBadgeColors, KbqBadgeModule } from '@koobiq/components/badge';

/**
* @title Badge list
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'badge-list-example',
styleUrls: ['badge-list-example.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqBadgeColors, KbqBadgeModule } from '@koobiq/components/badge';

/**
* @title Badge size
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'badge-size-example',
imports: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqBadgeColors, KbqBadgeModule } from '@koobiq/components/badge';
import { KbqLinkModule } from '@koobiq/components/link';
import { KbqTableModule } from '@koobiq/components/table';
Expand All @@ -7,6 +7,7 @@ import { KbqTableModule } from '@koobiq/components/table';
* @title Badge table
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'badge-table-example',
templateUrl: 'badge-table-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqBadgeColors, KbqBadgeModule } from '@koobiq/components/badge';
import { PopUpPlacements } from '@koobiq/components/core';
import { KbqToolTipModule } from '@koobiq/components/tooltip';
Expand All @@ -7,6 +7,7 @@ import { KbqToolTipModule } from '@koobiq/components/tooltip';
* @title Badge tooltip
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'badge-tooltip-example',
styleUrls: ['badge-tooltip-example.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';
import { KbqIconModule } from '@koobiq/components/icon';
Expand All @@ -7,6 +7,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Button toggle alignment
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-toggle-alignment-overview-example',
templateUrl: 'button-toggle-alignment-overview-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';
import { KbqIconModule } from '@koobiq/components/icon';
Expand All @@ -7,6 +7,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Button toggle disabled all
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-toggle-disabled-all-overview-example',
templateUrl: 'button-toggle-disabled-all-overview-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';
import { KbqIconModule } from '@koobiq/components/icon';

/**
* @title Button toggle disabled partial
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-toggle-disabled-partial-overview-example',
templateUrl: 'button-toggle-disabled-partial-overview-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';
import { KbqIconModule } from '@koobiq/components/icon';

/**
* @title Button toggle
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-toggle-overview-example',
templateUrl: 'button-toggle-overview-example.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { KbqButtonToggleModule } from '@koobiq/components/button-toggle';
import { KbqIconModule } from '@koobiq/components/icon';
Expand All @@ -7,6 +7,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Button toggle tooltip
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-toggle-tooltip-overview-example',
styleUrls: ['button-toggle-tooltip-overview-example.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqButtonModule } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
import { KbqIconModule } from '@koobiq/components/icon';
Expand All @@ -7,6 +7,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title Button content
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-content-example',
styleUrls: ['button-content-example.css'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { KbqButtonModule, KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors } from '@koobiq/components/core';
import { KbqIconModule } from '@koobiq/components/icon';
Expand All @@ -7,6 +7,7 @@ import { KbqIconModule } from '@koobiq/components/icon';
* @title button-fill-and-style-only-icon
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
selector: 'button-fill-and-style-only-icon-example',
templateUrl: 'button-fill-and-style-only-icon-example.html',
Expand Down
Loading