2 "extends": "wikimedia",
14 "no-restricted-properties": [
19 "message": "Please use Array.prototype.map instead"
23 "property": "inArray",
24 "message": "Please use Array.prototype.indexOf instead"
29 "message": "Please consider different approaches to $.each, especially when using Array's. You can override this warning if necessary with eslint-disable-next-line."
33 "property": "isArray",
34 "message": "Please use Array.isArray instead"
38 "property": "isFunction",
39 "message": "Please use typeof (e.g. typeof e === 'function') instead"
44 "message": "Please use Array.prototype.filter instead"
49 "message": "Please use String.prototype.trim instead"
54 "message": "Please use Function.prototype.bind instead"
58 "property": "codePointAt",
59 "message": "Unsupported method String.prototype.codePointAt requires ES6."
62 "property": "endsWith",
63 "message": "Unsupported method String.prototype.endsWith requires ES6."
66 "property": "normalize",
67 "message": "Unsupported method String.prototype.normalize requires ES6."
71 "message": "Unsupported method String.prototype.padEnd requires ES2017."
74 "property": "padStart",
75 "message": "Unsupported method String.prototype.padStart requires ES2017."
79 "message": "Unsupported method String.prototype.repeat requires ES6."
82 "property": "startsWith",
83 "message": "Unsupported method String.prototype.startsWith requires ES6."
86 "property": "trimEnd",
87 "message": "Unsupported method String.prototype.trimEnd is still experimental."
90 "property": "trimLeft",
91 "message": "Unsupported method String.prototype.trimLeft is still experimental."
94 "property": "trimRight",
95 "message": "Unsupported method String.prototype.trimRight is still experimental."
98 "property": "trimStart",
99 "message": "Unsupported method String.prototype.trimStart is still experimental."
102 "property": "copyWithin",
103 "message": "Unsupported method Array.prototype.copyWithin requires ES6."
106 "property": "entries",
107 "message": "Unsupported method Array.prototype.entries requires ES6."
111 "message": "Unsupported method Array.prototype.fill requires ES6."
114 "property": "findIndex",
115 "message": "Unsupported method Array.prototype.findIndex requires ES6."
119 "message": "Unsupported method Array.prototype.flat is still experimental."
122 "property": "flatMap",
123 "message": "Unsupported method Array.prototype.flatMap is still experimental."
127 "property": "fromCodePoint",
128 "message": "Unsupported method String.fromCodePoint requires ES6."
133 "message": "Unsupported method String.raw requires ES6."
138 "message": "Unsupported method Array.from requires ES6."
143 "message": "Unsupported method Array.of requires ES6."
147 "property": "assign",
148 "message": "Unsupported method Object.assign requires ES6."
152 "property": "entries",
153 "message": "Unsupported method Object.entries requires ES2017."
157 "property": "getOwnPropertyDescriptors",
158 "message": "Unsupported method Object.getOwnPropertyDescriptors requires ES2017."
162 "property": "getOwnPropertySymbols",
163 "message": "Unsupported method Object.getOwnPropertySymbols requires ES6."
168 "message": "Unsupported method Object.is requires ES6."
172 "property": "values",
173 "message": "Unsupported method Object.values requires ES2017."
176 "no-restricted-syntax": [
179 // Match expressions like .includes( … ) (false positives when used as a property name)
180 "selector": "CallExpression[callee.type='MemberExpression'][callee.property.type='Identifier'][callee.property.name='includes']",
181 "message": "Unsupported methods String.prototype.includes and Array.prototype.includes require ES6 and ES2016 respectively."
184 // Match expressions like .find( function ( … ) { … } ) (avoid $( … ).find( … ))
185 "selector": "CallExpression[callee.type='MemberExpression'][callee.property.type='Identifier'][callee.property.name='find'][arguments.length=1][arguments.0.type='FunctionExpression']",
186 "message": "Unsupported method Array.prototype.find requires ES6."
189 // Match expressions like .keys( … ), except Object.keys( … ) (which is valid)
190 "selector": "CallExpression[callee.type='MemberExpression'][callee.property.type='Identifier'][callee.property.name='keys'][callee.object.name!='Object']",
191 "message": "Unsupported method Array.prototype.keys requires ES6."
194 // Match expressions like .values( … ), except Object.values( … ) (disallowed separately)
195 "selector": "CallExpression[callee.type='MemberExpression'][callee.property.type='Identifier'][callee.property.name='values'][callee.object.name!='Object']",
196 "message": "Unsupported method Array.prototype.values requires ES6."