Skip to content

Commit 0ff0682

Browse files
committed
Fix merge conflict with introduction of eslint
2 parents 18834c9 + b52617a commit 0ff0682

31 files changed

Lines changed: 10766 additions & 2305 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/Dist/**/*.ts
2+
**/node_modules/**

src/XrmDefinitelyTyped/.eslintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": [
5+
"@typescript-eslint"
6+
],
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended"
11+
]
12+
}

src/XrmDefinitelyTyped/Resources/Extensions/dg.xrmquery.web_ext_9-.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="..\Dist\dg.xrmquery.web.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\Dist\dg.xrmquery.web.d.ts" />
23
declare namespace Filter {
34
function $in<T extends string | number | XQW.Guid>(val: T, listVal: T[]): WebFilter;
45
function notIn<T extends string | number | XQW.Guid>(val: T, listVal: T[]): WebFilter;

src/XrmDefinitelyTyped/Resources/Extensions/dg.xrmquery.web_ext_9-.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="..\dg.xrmquery.web.ts" />
1+
// eslint-disable-next-line @typescript-eslint/no-namespace, @typescript-eslint/no-unused-vars
22
namespace Filter {
33
const GUID_ENDING = "_value";
44
const GUID_START = "_";
@@ -39,21 +39,24 @@ namespace Filter {
3939
*/
4040
function queryFunc<T>(funcName: string, val1: T): WebFilter;
4141
function queryFunc<T, V>(funcName: string, val1: T, val2: V): WebFilter;
42+
// eslint-disable-next-line no-inner-declarations
4243
function queryFunc<T, V>(funcName: string, val1: T, val2?: V): WebFilter {
4344
if (val2 !== undefined) {
44-
return <WebFilter><any>(`Microsoft.Dynamics.CRM.${funcName}(PropertyName='${parsePropertyName(getVal(val1))}',PropertyValues=${getVal(val2)})`);
45+
return <WebFilter><any>(`Microsoft.Dynamics.CRM.${funcName}(PropertyName='${parsePropertyName(getVal(val1))}',PropertyValues=${getVal(val2)})`); // eslint-disable-line @typescript-eslint/no-explicit-any
4546
} else {
46-
return <WebFilter><any>(`Microsoft.Dynamics.CRM.${funcName}(PropertyName='${parsePropertyName(getVal(val1))}')`);
47+
return <WebFilter><any>(`Microsoft.Dynamics.CRM.${funcName}(PropertyName='${parsePropertyName(getVal(val1))}')`); // eslint-disable-line @typescript-eslint/no-explicit-any
4748
}
4849
}
4950

51+
// eslint-disable-next-line no-inner-declarations
5052
function parsePropertyName(name: string) {
5153
const idxStart = name.indexOf(GUID_START);
5254
const idxEnd = name.indexOf(GUID_ENDING);
5355
if (idxStart === -1 || idxEnd === -1) return name;
5456
return `${name.substr(idxStart + 1, idxEnd - 1)}`;
5557
}
5658

59+
// eslint-disable-next-line no-inner-declarations, @typescript-eslint/no-explicit-any
5760
function getVal(v: any): string {
5861
if (v === null) return "null";
5962
if (typeof v === "string") return `'${encodeSpecialCharacters(v)}'`;
@@ -65,6 +68,7 @@ namespace Filter {
6568
/**
6669
* @internal
6770
*/
71+
// eslint-disable-next-line no-inner-declarations
6872
function encodeSpecialCharacters(queryString: string) {
6973
return encodeURI(queryString)
7074
.replace(/'/g, "''")

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_-6.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="..\xrm.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\xrm.d.ts" />
23
declare namespace Xrm {
34
interface context {
45
/**
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
/// <reference path="..\xrm.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\xrm.d.ts" />
23
declare namespace Xrm {
4+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
35
interface PageTab<T extends SectionCollectionBase> {
46
/**
57
* Add an event handler on tab state change.
68
*
79
* @param reference Event handler for tab state change.
810
*/
9-
add_tabStateChange(reference: Function): void;
11+
add_tabStateChange(reference: Function): void; //eslint-disable-line @typescript-eslint/ban-types
1012
}
1113
}

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_-9-.d.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/// <reference path="..\xrm.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\xrm.d.ts" />
23
declare namespace Xrm {
3-
var Page: Xrm.PageBase<Xrm.AttributeCollectionBase, Xrm.TabCollectionBase, Xrm.ControlCollectionBase>;
4+
let Page: Xrm.PageBase<Xrm.AttributeCollectionBase, Xrm.TabCollectionBase, Xrm.ControlCollectionBase>;
45
/**
56
* Interface for the base of an Xrm.Page
67
*/
8+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
79
interface PageBase<T extends AttributeCollectionBase, U extends TabCollectionBase, V extends ControlCollectionBase> {
810
/**
911
* The context of the page.
@@ -25,7 +27,7 @@ declare namespace Xrm {
2527
/**
2628
* Returns a dictionary object of key value pairs that represent the query string arguments that were passed to the page.
2729
*/
28-
getQueryStringParameters(): any;
30+
getQueryStringParameters(): any; // eslint-disable-line @typescript-eslint/no-explicit-any
2931

3032
/**
3133
* Returns the GUID of the SystemUser.Id value for the current user.
@@ -46,6 +48,7 @@ declare namespace Xrm {
4648
/**
4749
* Interface for the entity on a form.
4850
*/
51+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4952
interface PageEntity<T extends AttributeCollectionBase> {
5053
/**
5154
* This is the equivalent of using the "Save and Close" command.
@@ -80,6 +83,7 @@ declare namespace Xrm {
8083
* @param parameters A dictionary object that passes extra query string parameters to the form. Invalid query string parameters will cause an error.
8184
* @param windowOptions You can choose to open a form in a new window by passing a dictionary object with a boolean openInNewWindow property set to true.
8285
*/
86+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8387
openEntityForm(name: string, id?: string, parameters?: any, windowOptions?: WindowOptions): void;
8488

8589
/**

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_-9.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
/// <reference path="..\xrm.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\xrm.d.ts" />
23
declare namespace Xrm {
4+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
35
interface DataModule<T extends AttributeCollectionBase> {
46
/**
57
* Asynchronously refreshes and optionally saves all the data of the form without reloading the page.
@@ -16,6 +18,7 @@ declare namespace Xrm {
1618
save(saveOptions?: SaveOptions): Then<undefined>;
1719
}
1820

21+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1922
interface SubGridControl<T extends string> extends BaseControl {
2023
/**
2124
* Use this method to get the logical name of the relationship used for the data displayed in the grid.

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_6-.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="..\xrm.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\xrm.d.ts" />
23
declare namespace Xrm {
34
interface BaseControl {
45
/**
@@ -29,11 +30,13 @@ declare namespace Xrm {
2930
/**
3031
* Use this method to apply changes to lookups based on values current just as the user is about to view results for the lookup.
3132
*/
33+
// eslint-disable-next-line @typescript-eslint/ban-types
3234
addPreSearch(handler: Function): void;
3335

3436
/**
3537
* Use this method to remove event handler functions that have previously been set for the PreSearch event.
3638
*/
39+
// eslint-disable-next-line @typescript-eslint/ban-types
3740
removePreSearch(handler: Function): void;
3841
}
3942

@@ -44,20 +47,23 @@ declare namespace Xrm {
4447
setShowTime(doShow: boolean): void;
4548
}
4649

50+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4751
interface PageEntity<T extends AttributeCollectionBase> {
4852
/**
4953
* Gets a string for the value of the primary attribute of the entity.
5054
*/
5155
getPrimaryAttributeValue(): string;
5256
}
5357

58+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5459
interface BaseAttribute<T> {
5560
/**
5661
* Determine whether a lookup attribute represents a partylist lookup.
5762
*/
5863
getIsPartyList(): boolean;
5964
}
6065

66+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6167
interface UiModule<T extends TabCollectionBase, U extends ControlCollectionBase> {
6268
/**
6369
* Use this method to remove form level notifications.

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_6-9-.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/// <reference path="..\xrm.d.ts" />
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2+
/// <reference path="..\xrm.d.ts" />
23
declare namespace Xrm {
34
interface Utility {
45
/**
@@ -7,6 +8,7 @@ declare namespace Xrm {
78
* @param message The text of the message to display in the dialog.
89
* @param onCloseCallback A function to execute when the OK button is clicked.
910
*/
11+
// eslint-disable-next-line @typescript-eslint/ban-types
1012
alertDialog(message: string, onCloseCallback?: Function): void;
1113

1214
/**
@@ -16,6 +18,7 @@ declare namespace Xrm {
1618
* @param yesCloseCallback A function to execute when the OK button is clicked.
1719
* @param noCloseCallback A function to execute when the Cancel button is clicked.
1820
*/
21+
// eslint-disable-next-line @typescript-eslint/ban-types
1922
confirmDialog(message: string, yesCloseCallback?: Function, noCloseCallback?: Function): void;
2023

2124
/**

0 commit comments

Comments
 (0)