-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypescript-ie11-errors.xml
More file actions
28 lines (28 loc) · 2.89 KB
/
Copy pathtypescript-ie11-errors.xml
File metadata and controls
28 lines (28 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="TypeScript IE11 errors" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JSEqualityComparisonWithCoercion.TS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SSBasedInspection" enabled="true" level="ERROR" enabled_by_default="true">
<replaceConfiguration name="IE11 does not support Object.entries. Replace it with a safe function." text="$object$.entries($variable$)" recursive="false" caseInsensitive="true" type="TypeScript" reformatAccordingToStyle="false" shortenFQN="false" replacement="function $object$Polyfill(obj) {
 const keys = $object$.keys(obj);

 const keyValuePairs = keys.map(key => {
 const value = obj[key];

 return [key, value];
 });

 return keyValuePairs;
};">
<constraint name="__context__" target="true" within="" contains="" />
<constraint name="object" within="" contains="" />
</replaceConfiguration>
<replaceConfiguration name="IE11 does not support Object.values. Replace it with a safe function." text="$object$.values($variable$)" recursive="false" caseInsensitive="true" type="TypeScript" reformatAccordingToStyle="false" shortenFQN="false" replacement="$object$.keys(obj).map(e => obj[e])">
<constraint name="__context__" within="" contains="" />
<constraint name="object" within="" contains="" />
</replaceConfiguration>
<replaceConfiguration name="IE11 does not support Array.findIndex. Replace it with a safe function." text="$array$.findIndex($variable$);" recursive="false" caseInsensitive="true" type="TypeScript" reformatAccordingToStyle="false" shortenFQN="false" replacement="let index = -1;
$array$.some(function(el, i) {
 if (el === $variable$) {
 index = i;
 return true;
 }
});">
<constraint name="__context__" within="" contains="" />
<constraint name="array" within="" contains="" />
<constraint name="variable" within="" contains="" />
</replaceConfiguration>
<replaceConfiguration name="IE11 does not support Array.flat. Replace it with a safe function." text="$array$.flat($variable$)
" recursive="false" caseInsensitive="true" type="TypeScript" reformatAccordingToStyle="false" shortenFQN="false" replacement="const flattened = $array$.reduce(function(a, b) {
 return a.concat(b);
});">
<constraint name="__context__" within="" contains="" />
<constraint name="array" within="" contains="" />
</replaceConfiguration>
</inspection_tool>
<inspection_tool class="Stylelint" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>