Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
5ee9e58
Scheduler — Replace underscore-prefixed: Workspace group (agenda, tim…
aleksei-semikozov Mar 17, 2026
8fc6af8
Scheduler — Replace underscore-prefixed: m_tooltip_strategy_base.ts (…
aleksei-semikozov Mar 20, 2026
b741202
Scheduler — Replace underscore-prefixed: Remaining workspaces (strate…
aleksei-semikozov Mar 23, 2026
ec1061b
Scheduler — Replace underscore-prefixed: Long tail (popup, helpers, h…
aleksei-semikozov Mar 26, 2026
4c65042
Scheduler - Rename remaining underscore methods
aleksei-semikozov Apr 8, 2026
6649865
Scheduler - Drop underscore prefix from remaining methods in header a…
aleksei-semikozov Apr 9, 2026
6433aa5
Scheduler - Restore forbidden-underscore lint rule and add 26_1 allow…
aleksei-semikozov Apr 9, 2026
5836e2a
Scheduler - Drop underscore prefix from private class members
aleksei-semikozov Apr 9, 2026
7c2b50c
Scheduler - Drop underscore prefix in view_model generators and rende…
aleksei-semikozov Apr 9, 2026
bf4d379
Scheduler - Drop underscore prefix in workspaces, layout manager, fil…
aleksei-semikozov Apr 9, 2026
33f3ffe
Scheduler - Fix stale shader callsites and protected access for creat…
aleksei-semikozov Apr 9, 2026
d6b12c6
Scheduler - Update stale callsites in positioning strategies and stra…
aleksei-semikozov Apr 9, 2026
9112ce7
Scheduler - Update renamed method references in QUnit tests
aleksei-semikozov Apr 9, 2026
0202278
Scheduler - Remove non-rename code from tooltip strategy (del handler…
aleksei-semikozov Apr 10, 2026
231833a
Scheduler - Restore isDeletingAllowed (used by delete button), only d…
aleksei-semikozov Apr 10, 2026
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
140 changes: 140 additions & 0 deletions packages/devextreme/eslint-scheduler-allowlist.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
const schedulerDOMComponentOverrides = [
'_createActionByOption',
'_defaultOptionsRules',
'_dimensionChanged',
'_dispose',
'_disposed',
'_getDefaultOptions',
'_init',
'_initTemplates',
'_optionChanged',
'_setDeprecatedOptions',
'_setOptionsByReference',
'_useTemplates',
'_visibilityChanged',
];

const schedulerWidgetOverrides = [
'_activeStateUnit',
'_clean',
'_cleanFocusState',
'_eventBindingTarget',
'_fireContentReadyAction',
'_focusInHandler',
'_focusOutHandler',
'_focusTarget',
'_initMarkup',
'_keyboardHandler',
'_render',
'_renderContent',
'_renderFocusState',
'_renderFocusTarget',
'_supportedKeys',
'_toggleVisibility',
'_createAction',
'_createEventArgs',
'_dataSource',
'_dataSourceChangedHandler',
'_dataSourceOptions',
'_options',
];

const schedulerCollectionWidgetOverrides = [
'_cleanItemContainer',
'_clearDropDownItemsElements',
'_createItemByTemplate',
'_executeItemRenderAction',
'_filteredItems',
'_findItemElementByItem',
'_focusedItemIndexBeforeRender',
'_getItemContent',
'_itemClass',
'_itemClickHandler',
'_itemContainer',
'_moveFocus',
'_postprocessRenderItem',
'_processItemClick',
'_refreshActiveDescendant',
'_renderDirection',
'_renderItem',
'_sortedItems',
];

const schedulerR1Overrides = [
'_propsInfo',
'_value',
'_viewComponent',
];

const schedulerFrameworkOptions = [
'_swipeEnabled',
'_loopFocus',
];

const schedulerLegacyMembers = [
// workspaces/m_work_space.ts
'_$allDayPanel',
'_$dateTable',
'_$dateTableScrollableContent',
'_$flexContainer',
'_$groupTable',
'_$headerPanel',
'_$headerPanelContainer',
'_$thead',
'_dateTableScrollable',
'_getCellCount',
'_getGroupCount',
'_groupedStrategy',
'_isHorizontalGroupedWorkSpace',
'_shader',
'_sidebarScrollable',

// m_scheduler.ts
'_appointments',
'_compactAppointmentsHelper',
'_dataAccessors',
'_getDragBehavior',
'_isAppointmentBeingUpdated',
'_layoutManager',
'_workSpace',

// appointments/m_appointment_collection.ts
'_renderAppointmentTemplate',

// workspaces/view_model/m_view_data_generator.ts
'_getIntervalDuration',

// workspaces/m_virtual_scrolling.ts
'_renderGrid',

// appointment_popup/m_popup.ts
'_popup',

// appointment_popup/m_legacy_popup.ts
'_ignorePreventScrollEventsDeprecation',

// header/m_header.ts
'_useShortDateFormat',

// header/m_view_switcher.ts
'_wrapperClassExternal',

// utils/options/constants.ts, utils/options/types.ts
'_appointmentTooltipOffset',
'_draggingMode',
'_appointmentCountPerCell',
'_collectorOffset',
'_appointmentOffset',
];

const schedulerMemberAllowlist = [
...schedulerDOMComponentOverrides,
...schedulerWidgetOverrides,
...schedulerCollectionWidgetOverrides,
...schedulerR1Overrides,
...schedulerFrameworkOptions,
...schedulerLegacyMembers,
];

export const schedulerMemberAllowlistRegex =
`^(_|__esModule|${schedulerMemberAllowlist.map(s => s.replace(/\$/g, '\\$')).join('|')})$`;
30 changes: 29 additions & 1 deletion packages/devextreme/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import simpleImportSort from 'eslint-plugin-simple-import-sort';
import { changeRulesToStylistic } from 'eslint-migration-utils';
import unicorn from 'eslint-plugin-unicorn';
import customRules from './eslint_plugins/index.js';
import { schedulerMemberAllowlistRegex } from './eslint-scheduler-allowlist.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down Expand Up @@ -575,13 +576,40 @@ export default [
{
selector: 'memberLike',
format: null,
leadingUnderscore: 'allow',
leadingUnderscore: 'forbid',
filter: {
regex: schedulerMemberAllowlistRegex,
match: false,
},
},
],
'devextreme-custom/no-deferred': 'error',
'devextreme-custom/prefer-switch-true': ['error', { minBranches: 3 }],
},
},
// Temporarily allow underscore members in appointments/ (pending refactoring)
{
files: ['js/__internal/scheduler/appointments/**/*.ts?(x)'],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: ['variable', 'function', 'parameter'],
format: null,
leadingUnderscore: 'forbid',
filter: {
regex: '^_$',
match: false,
},
},
{
selector: 'memberLike',
format: null,
leadingUnderscore: 'allow',
},
],
},
},
// Allow Deferred in m_* scheduler files only
{
files: ['js/__internal/scheduler/**/m_*.ts?(x)'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const setupSchedulerTestEnvironment = ({
}: SetupSchedulerTestEnvironmentOptions = {}): void => {
jest.spyOn(logger, 'warn').mockImplementation(() => {});
DOMComponent.prototype._isVisible = jest.fn((): boolean => true);
SchedulerWorkSpace.prototype._createCrossScrollingConfig = (): {
(SchedulerWorkSpace.prototype as any).createCrossScrollingConfig = (): {
direction: string;
onScroll: jest.Mock;
onEnd: jest.Mock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ describe('scheduler workspace', () => {
expect(workspace.cache.clear).toHaveBeenCalledTimes(1);
});

it(`should clear cache on _cleanView call, view: ${currentView}`, () => {
it(`should clear cache on cleanView call, view: ${currentView}`, () => {
const workspace = createWorkspace(WorkSpace, currentView);
jest.spyOn(workspace.cache, 'clear');

workspace.cache.memo('test', () => 'value');
workspace._cleanView();
(workspace as any).cleanView();

expect(workspace.cache.clear).toHaveBeenCalledTimes(1);
expect(workspace.cache.size).toBe(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class AppointmentForm {
const colSpan = isRecurrence ? 1 : 2;

const mainItems = [
...this._createMainItems(expr, triggerResize, changeSize, allowTimeZoneEditing),
...this.createMainItems(expr, triggerResize, changeSize, allowTimeZoneEditing),
...this.scheduler.createResourceEditorModel(),
];

Expand All @@ -124,7 +124,7 @@ export class AppointmentForm {
name: APPOINTMENT_FORM_GROUP_NAMES.Recurrence,
visible: isRecurrence,
colSpan,
items: this._createRecurrenceEditor(expr),
items: this.createRecurrenceEditor(expr),
},
];

Expand Down Expand Up @@ -152,7 +152,7 @@ export class AppointmentForm {
});
}

_dateBoxValueChanged(args, dateExpr, isNeedCorrect) {
private dateBoxValueChanged(args, dateExpr, isNeedCorrect) {
validateAppointmentFormDate(args.component, args.value, args.previousValue);

const value = dateSerialization.deserializeDate(args.value);
Expand All @@ -166,7 +166,7 @@ export class AppointmentForm {
}
}

_createTimezoneEditor(timeZoneExpr, secondTimeZoneExpr, visibleIndex, colSpan, isMainTimeZone, cssClass, visible = false) {
private createTimezoneEditor(timeZoneExpr, secondTimeZoneExpr, visibleIndex, colSpan, isMainTimeZone, cssClass, visible = false) {
const noTzTitle = messageLocalization.format('dxScheduler-noTimezoneTitle');

return {
Expand Down Expand Up @@ -197,7 +197,7 @@ export class AppointmentForm {
};
}

_createDateBoxItems(dataExprs, allowTimeZoneEditing) {
private createDateBoxItems(dataExprs, allowTimeZoneEditing) {
const colSpan = allowTimeZoneEditing ? 2 : 1;
const firstDayOfWeek = this.scheduler.getFirstDayOfWeek();

Expand All @@ -209,11 +209,11 @@ export class AppointmentForm {
'dxScheduler-editorLabelStartDate',
E2E_TEST_CLASSES.startDateEditor,
(args) => {
this._dateBoxValueChanged(args, dataExprs.endDateExpr, (endValue, startValue) => endValue < startValue);
this.dateBoxValueChanged(args, dataExprs.endDateExpr, (endValue, startValue) => endValue < startValue);
},
),

this._createTimezoneEditor(
this.createTimezoneEditor(
dataExprs.startDateTimeZoneExpr,
dataExprs.endDateTimeZoneExpr,
1,
Expand All @@ -230,11 +230,11 @@ export class AppointmentForm {
'dxScheduler-editorLabelEndDate',
E2E_TEST_CLASSES.endDateEditor,
(args) => {
this._dateBoxValueChanged(args, dataExprs.startDateExpr, (startValue, endValue) => endValue < startValue);
this.dateBoxValueChanged(args, dataExprs.startDateExpr, (startValue, endValue) => endValue < startValue);
},
),

this._createTimezoneEditor(
this.createTimezoneEditor(
dataExprs.endDateTimeZoneExpr,
dataExprs.startDateTimeZoneExpr,
3,
Expand All @@ -246,7 +246,7 @@ export class AppointmentForm {
];
}

_changeFormItemDateType(name: string, groupName: string, isAllDay: boolean): void {
private changeFormItemDateType(name: string, groupName: string, isAllDay: boolean): void {
const editorPath = this.getEditorPath(name, groupName);
const itemEditorOptions = this.form.itemOption(editorPath).editorOptions;

Expand All @@ -257,7 +257,7 @@ export class AppointmentForm {
this.form.itemOption(editorPath, 'editorOptions', newEditorOption);
}

_createMainItems(dataExprs, triggerResize, changeSize, allowTimeZoneEditing) {
private createMainItems(dataExprs, triggerResize, changeSize, allowTimeZoneEditing) {
return [
{
name: this.normalizeEditorName(dataExprs.textExpr),
Expand All @@ -279,7 +279,7 @@ export class AppointmentForm {
lg: 2,
xs: 1,
},
items: this._createDateBoxItems(dataExprs, allowTimeZoneEditing),
items: this.createDateBoxItems(dataExprs, allowTimeZoneEditing),
},
{
itemType: 'group',
Expand Down Expand Up @@ -317,8 +317,8 @@ export class AppointmentForm {
}
}

this._changeFormItemDateType(dataExprs.startDateExpr, 'Main', value);
this._changeFormItemDateType(dataExprs.endDateExpr, 'Main', value);
this.changeFormItemDateType(dataExprs.startDateExpr, 'Main', value);
this.changeFormItemDateType(dataExprs.endDateExpr, 'Main', value);
},
},
}, {
Expand Down Expand Up @@ -370,7 +370,7 @@ export class AppointmentForm {
];
}

_createRecurrenceEditor(dataExprs) {
private createRecurrenceEditor(dataExprs) {
return [{
name: this.normalizeEditorName(dataExprs.recurrenceRuleExpr),
dataField: dataExprs.recurrenceRuleExpr,
Expand Down
Loading
Loading