Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ca0f0fa

Browse files
chore(docs): deprecation notices for methods and properties
Closes #15351
1 parent 161f2e8 commit ca0f0fa

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

docs/config/tag-defs/deprecated.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
var result = {};
1010
var invalidOptions = [];
1111
value = value.trim();
12-
while(OPTION_MATCHER.test(value)) {
12+
while (OPTION_MATCHER.test(value)) {
1313
value = value.replace(OPTION_MATCHER, function(_, key, value, rest) {
1414
if (VALID_OPTIONS.indexOf(key) !== -1) {
1515
result[key] = value;
@@ -23,7 +23,7 @@ module.exports = {
2323
throw new Error('Invalid options: ' + humanList(invalidOptions) + '. Value options are: ' + humanList(VALID_OPTIONS));
2424
}
2525
result.description = value;
26-
return result;
26+
return result;
2727
}
2828
};
2929

@@ -33,10 +33,10 @@ function humanList(values, sep, lastSep) {
3333

3434
return values.reduce(function(output, value, index, list) {
3535
output += '"' + value + '"';
36-
switch(list.length - index) {
36+
switch (list.length - index) {
3737
case 1: return output;
3838
case 2: return output + lastSep;
3939
default: return output + sep;
4040
}
4141
}, '');
42-
}
42+
}

docs/config/tag-defs/deprecated.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'use strict';
2+
3+
/* globals describe, it, expect */
14
var tagDef = require('./deprecated');
25

36
describe('deprecated tag', function() {
@@ -19,12 +22,12 @@ describe('deprecated tag', function() {
1922
expect(tag.description).toEqual('what is left is description');
2023
expect(tag.sinceVersion).toEqual('v1.3.4');
2124
expect(tag.removeVersion).toEqual('v1.4.5');
22-
})
25+
});
2326

2427
it('should error if there is an invalid option', function() {
2528
expect(function() {
2629
tagDef.transforms({}, {}, ' fromVersion="v1.3.4" toVersion="v1.4.5" what is left is description');
2730
}).toThrowError('Invalid options: "fromVersion" and "toVersion". Value options are: "sinceVersion" and "removeVersion"');
2831
});
2932
});
30-
});
33+
});

0 commit comments

Comments
 (0)