Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Latest commit

 

History

History
46 lines (35 loc) · 1.49 KB

no-deprecated-episerver-apis.md

File metadata and controls

46 lines (35 loc) · 1.49 KB

Ensure deprecated Episerver CMS API's are not used. (@episerver/cms/no-deprecated-episerver-apis)

Ensure deprecated Episerver CMS API's are not used, as they can be removed in the next major release.

Rule Details

Examples of incorrect code for this rule:

/*eslint @episerver/cms/no-deprecated-episerver-apis: ["error"]*/
define([
    "epi/shell/TypeDescriptorManager",
    "epi-cms/command/RenameFolder" // This is a deprecated module
], function (
    TypeDescriptorManager,
    RenameFolder
) {
    return {};
});

Examples of correct code for this rule:

/*eslint @episerver/cms/no-deprecated-episerver-apis: ["error"]*/
define([
    "epi/shell/TypeDescriptorManager",
    "epi-cms/asset/command/RenameSelectedFolder" // Ok (public and not deprecated)
], function (
    TypeDescriptorManager,
    RenameFolder
) {
    return {};
});

When Not To Use It

When you don't plan on upgrading Episerver CMS, or when you are willing to use deprecated API's and just deal with their potential disappearance when upgrading to a new major version.

Further Reading