Skip to content

Commit 105675b

Browse files
Add 20 deprecations and removals
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent e397060 commit 105675b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

lib/rules/no-deprecations.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,19 @@ const oc = {
6262
webroot: '19.0.0',
6363
};
6464

65+
const oca = {
66+
Search: '20.0.0',
67+
}
68+
6569
const ocp = {
6670
Toast: '19.0.0',
6771
}
6872

6973
const oc_sub = {
70-
74+
Util: {
75+
formatDate: '20.0.0',
76+
relativeModifiedDate: '20.0.0',
77+
}
7178
};
7279

7380
module.exports = {
@@ -94,6 +101,11 @@ module.exports = {
94101
&& oc.hasOwnProperty(node.property.name)) {
95102
context.report(node, "The property or function OC." + node.property.name + " was deprecated in Nextcloud " + oc[node.property.name]);
96103
}
104+
// OCA.x
105+
if (node.object.name === 'OCA'
106+
&& oca.hasOwnProperty(node.property.name)) {
107+
context.report(node, "The property or function OCA." + node.property.name + " was deprecated in Nextcloud " + oca[node.property.name]);
108+
}
97109
// OCP.x
98110
if (node.object.name === 'OCP'
99111
&& ocp.hasOwnProperty(node.property.name)) {

lib/rules/no-removed-apis.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//------------------------------------------------------------------------------
66

77
const global = {
8+
escapeHTML: '20.0.0',
89
fileDownloadPath: '15.0.0',
910
formatDate: '19.0.0',
1011
getScrollBarWidth: '15.0.0',

0 commit comments

Comments
 (0)