@teambit/eslint 1.0.187 → 1.0.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_defender_eslint-preview.js +1 -1
- package/artifacts/schema.json +89 -20
- package/dist/eslint.aspect.js.map +1 -1
- package/dist/eslint.composition.js.map +1 -1
- package/dist/eslint.linter.js.map +1 -1
- package/dist/eslint.main.runtime.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/preview-1710224484125.js +7 -0
- package/package.json +10 -10
- package/dist/preview-1709867881461.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.defender/eslint@1.0.
|
|
3
|
+
<testsuite name="teambit.defender/eslint@1.0.189" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.defender/eslint-preview"]=t():e["teambit.defender/eslint-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.defender/eslint-preview"]=t():e["teambit.defender/eslint-preview"]=t()}(self,(()=>(()=>{"use strict";var e={25352:(e,t,o)=>{var r={id:"teambit.defender/eslint@1.0.189",homepage:"https://bit.cloud/teambit/defender/eslint",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const p=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-eslint.svg"}));p.__bit_component=r,t.Logo=p},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>l,compositions_metadata:()=>u,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>c});var t=o(25352);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},s.apply(this,arguments)}var a={},d="wrapper";function c(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,p);return(0,n.mdx)(d,s({},a,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}c.isMDXComponent=!0;const l=[t],f=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -74,7 +74,11 @@
|
|
|
74
74
|
"line": 53,
|
|
75
75
|
"character": 31
|
|
76
76
|
},
|
|
77
|
-
"name": "Logger"
|
|
77
|
+
"name": "Logger",
|
|
78
|
+
"componentId": {
|
|
79
|
+
"scope": "teambit.harmony",
|
|
80
|
+
"name": "logger"
|
|
81
|
+
}
|
|
78
82
|
},
|
|
79
83
|
"isOptional": false,
|
|
80
84
|
"isSpread": false
|
|
@@ -150,7 +154,11 @@
|
|
|
150
154
|
"line": 61,
|
|
151
155
|
"character": 14
|
|
152
156
|
},
|
|
153
|
-
"name": "LinterContext"
|
|
157
|
+
"name": "LinterContext",
|
|
158
|
+
"componentId": {
|
|
159
|
+
"scope": "teambit.defender",
|
|
160
|
+
"name": "linter"
|
|
161
|
+
}
|
|
154
162
|
},
|
|
155
163
|
"isOptional": false,
|
|
156
164
|
"isSpread": false
|
|
@@ -315,7 +323,11 @@
|
|
|
315
323
|
"line": 78,
|
|
316
324
|
"character": 39
|
|
317
325
|
},
|
|
318
|
-
"name": "LoggerMain"
|
|
326
|
+
"name": "LoggerMain",
|
|
327
|
+
"componentId": {
|
|
328
|
+
"scope": "teambit.harmony",
|
|
329
|
+
"name": "logger"
|
|
330
|
+
}
|
|
319
331
|
},
|
|
320
332
|
{
|
|
321
333
|
"__schema": "TypeRefSchema",
|
|
@@ -324,7 +336,11 @@
|
|
|
324
336
|
"line": 78,
|
|
325
337
|
"character": 51
|
|
326
338
|
},
|
|
327
|
-
"name": "WorkspaceConfigFilesMain"
|
|
339
|
+
"name": "WorkspaceConfigFilesMain",
|
|
340
|
+
"componentId": {
|
|
341
|
+
"scope": "teambit.workspace",
|
|
342
|
+
"name": "workspace-config-files"
|
|
343
|
+
}
|
|
328
344
|
},
|
|
329
345
|
{
|
|
330
346
|
"__schema": "TypeRefSchema",
|
|
@@ -333,7 +349,11 @@
|
|
|
333
349
|
"line": 78,
|
|
334
350
|
"character": 77
|
|
335
351
|
},
|
|
336
|
-
"name": "LinterMain"
|
|
352
|
+
"name": "LinterMain",
|
|
353
|
+
"componentId": {
|
|
354
|
+
"scope": "teambit.defender",
|
|
355
|
+
"name": "linter"
|
|
356
|
+
}
|
|
337
357
|
}
|
|
338
358
|
]
|
|
339
359
|
},
|
|
@@ -624,7 +644,7 @@
|
|
|
624
644
|
"line": 47,
|
|
625
645
|
"character": 39
|
|
626
646
|
},
|
|
627
|
-
"signature": "(config: EslintConfigMutator, context: EslintConfigTransformContext): EslintConfigMutator",
|
|
647
|
+
"signature": "(config: \u001b[2m(component: teambit.defender/eslint/config-mutator)\u001b[22m EslintConfigMutator, context: EslintConfigTransformContext): \u001b[2m(component: teambit.defender/eslint/config-mutator)\u001b[22m EslintConfigMutator",
|
|
628
648
|
"name": "",
|
|
629
649
|
"params": [
|
|
630
650
|
{
|
|
@@ -642,7 +662,12 @@
|
|
|
642
662
|
"line": 48,
|
|
643
663
|
"character": 11
|
|
644
664
|
},
|
|
645
|
-
"name": "EslintConfigMutator"
|
|
665
|
+
"name": "EslintConfigMutator",
|
|
666
|
+
"componentId": {
|
|
667
|
+
"scope": "teambit.defender",
|
|
668
|
+
"name": "eslint/config-mutator",
|
|
669
|
+
"version": "0.0.99"
|
|
670
|
+
}
|
|
646
671
|
},
|
|
647
672
|
"isOptional": false,
|
|
648
673
|
"isSpread": false
|
|
@@ -675,7 +700,12 @@
|
|
|
675
700
|
"line": 50,
|
|
676
701
|
"character": 6
|
|
677
702
|
},
|
|
678
|
-
"name": "EslintConfigMutator"
|
|
703
|
+
"name": "EslintConfigMutator",
|
|
704
|
+
"componentId": {
|
|
705
|
+
"scope": "teambit.defender",
|
|
706
|
+
"name": "eslint/config-mutator",
|
|
707
|
+
"version": "0.0.99"
|
|
708
|
+
}
|
|
679
709
|
},
|
|
680
710
|
"modifiers": []
|
|
681
711
|
}
|
|
@@ -993,7 +1023,7 @@
|
|
|
993
1023
|
"line": 47,
|
|
994
1024
|
"character": 39
|
|
995
1025
|
},
|
|
996
|
-
"signature": "(config: EslintConfigMutator, context: EslintConfigTransformContext): EslintConfigMutator",
|
|
1026
|
+
"signature": "(config: \u001b[2m(component: teambit.defender/eslint/config-mutator)\u001b[22m EslintConfigMutator, context: EslintConfigTransformContext): \u001b[2m(component: teambit.defender/eslint/config-mutator)\u001b[22m EslintConfigMutator",
|
|
997
1027
|
"name": "",
|
|
998
1028
|
"params": [
|
|
999
1029
|
{
|
|
@@ -1011,7 +1041,12 @@
|
|
|
1011
1041
|
"line": 48,
|
|
1012
1042
|
"character": 11
|
|
1013
1043
|
},
|
|
1014
|
-
"name": "EslintConfigMutator"
|
|
1044
|
+
"name": "EslintConfigMutator",
|
|
1045
|
+
"componentId": {
|
|
1046
|
+
"scope": "teambit.defender",
|
|
1047
|
+
"name": "eslint/config-mutator",
|
|
1048
|
+
"version": "0.0.99"
|
|
1049
|
+
}
|
|
1015
1050
|
},
|
|
1016
1051
|
"isOptional": false,
|
|
1017
1052
|
"isSpread": false
|
|
@@ -1044,7 +1079,12 @@
|
|
|
1044
1079
|
"line": 50,
|
|
1045
1080
|
"character": 6
|
|
1046
1081
|
},
|
|
1047
|
-
"name": "EslintConfigMutator"
|
|
1082
|
+
"name": "EslintConfigMutator",
|
|
1083
|
+
"componentId": {
|
|
1084
|
+
"scope": "teambit.defender",
|
|
1085
|
+
"name": "eslint/config-mutator",
|
|
1086
|
+
"version": "0.0.99"
|
|
1087
|
+
}
|
|
1048
1088
|
},
|
|
1049
1089
|
"modifiers": []
|
|
1050
1090
|
}
|
|
@@ -1084,7 +1124,11 @@
|
|
|
1084
1124
|
"line": 53,
|
|
1085
1125
|
"character": 31
|
|
1086
1126
|
},
|
|
1087
|
-
"name": "Logger"
|
|
1127
|
+
"name": "Logger",
|
|
1128
|
+
"componentId": {
|
|
1129
|
+
"scope": "teambit.harmony",
|
|
1130
|
+
"name": "logger"
|
|
1131
|
+
}
|
|
1088
1132
|
},
|
|
1089
1133
|
"isOptional": false,
|
|
1090
1134
|
"isSpread": false
|
|
@@ -1160,7 +1204,11 @@
|
|
|
1160
1204
|
"line": 61,
|
|
1161
1205
|
"character": 14
|
|
1162
1206
|
},
|
|
1163
|
-
"name": "LinterContext"
|
|
1207
|
+
"name": "LinterContext",
|
|
1208
|
+
"componentId": {
|
|
1209
|
+
"scope": "teambit.defender",
|
|
1210
|
+
"name": "linter"
|
|
1211
|
+
}
|
|
1164
1212
|
},
|
|
1165
1213
|
"isOptional": false,
|
|
1166
1214
|
"isSpread": false
|
|
@@ -1325,7 +1373,11 @@
|
|
|
1325
1373
|
"line": 78,
|
|
1326
1374
|
"character": 39
|
|
1327
1375
|
},
|
|
1328
|
-
"name": "LoggerMain"
|
|
1376
|
+
"name": "LoggerMain",
|
|
1377
|
+
"componentId": {
|
|
1378
|
+
"scope": "teambit.harmony",
|
|
1379
|
+
"name": "logger"
|
|
1380
|
+
}
|
|
1329
1381
|
},
|
|
1330
1382
|
{
|
|
1331
1383
|
"__schema": "TypeRefSchema",
|
|
@@ -1334,7 +1386,11 @@
|
|
|
1334
1386
|
"line": 78,
|
|
1335
1387
|
"character": 51
|
|
1336
1388
|
},
|
|
1337
|
-
"name": "WorkspaceConfigFilesMain"
|
|
1389
|
+
"name": "WorkspaceConfigFilesMain",
|
|
1390
|
+
"componentId": {
|
|
1391
|
+
"scope": "teambit.workspace",
|
|
1392
|
+
"name": "workspace-config-files"
|
|
1393
|
+
}
|
|
1338
1394
|
},
|
|
1339
1395
|
{
|
|
1340
1396
|
"__schema": "TypeRefSchema",
|
|
@@ -1343,7 +1399,11 @@
|
|
|
1343
1399
|
"line": 78,
|
|
1344
1400
|
"character": 77
|
|
1345
1401
|
},
|
|
1346
|
-
"name": "LinterMain"
|
|
1402
|
+
"name": "LinterMain",
|
|
1403
|
+
"componentId": {
|
|
1404
|
+
"scope": "teambit.defender",
|
|
1405
|
+
"name": "linter"
|
|
1406
|
+
}
|
|
1347
1407
|
}
|
|
1348
1408
|
]
|
|
1349
1409
|
},
|
|
@@ -1405,7 +1465,12 @@
|
|
|
1405
1465
|
"line": 103,
|
|
1406
1466
|
"character": 11
|
|
1407
1467
|
},
|
|
1408
|
-
"name": "EslintConfigMutator"
|
|
1468
|
+
"name": "EslintConfigMutator",
|
|
1469
|
+
"componentId": {
|
|
1470
|
+
"scope": "teambit.defender",
|
|
1471
|
+
"name": "eslint/config-mutator",
|
|
1472
|
+
"version": "0.0.99"
|
|
1473
|
+
}
|
|
1409
1474
|
},
|
|
1410
1475
|
"isOptional": false,
|
|
1411
1476
|
"isSpread": false
|
|
@@ -1471,7 +1536,7 @@
|
|
|
1471
1536
|
"componentId": {
|
|
1472
1537
|
"scope": "teambit.defender",
|
|
1473
1538
|
"name": "eslint/config-mutator",
|
|
1474
|
-
"version": "0.0.
|
|
1539
|
+
"version": "0.0.99"
|
|
1475
1540
|
}
|
|
1476
1541
|
},
|
|
1477
1542
|
"modifiers": [
|
|
@@ -1545,7 +1610,11 @@
|
|
|
1545
1610
|
"line": 89,
|
|
1546
1611
|
"character": 54
|
|
1547
1612
|
},
|
|
1548
|
-
"name": "LinterContext"
|
|
1613
|
+
"name": "LinterContext",
|
|
1614
|
+
"componentId": {
|
|
1615
|
+
"scope": "teambit.defender",
|
|
1616
|
+
"name": "linter"
|
|
1617
|
+
}
|
|
1549
1618
|
},
|
|
1550
1619
|
"isOptional": false,
|
|
1551
1620
|
"isSpread": false
|
|
@@ -1568,7 +1637,7 @@
|
|
|
1568
1637
|
"componentId": {
|
|
1569
1638
|
"scope": "teambit.defender",
|
|
1570
1639
|
"name": "eslint",
|
|
1571
|
-
"version": "1.0.
|
|
1640
|
+
"version": "1.0.189"
|
|
1572
1641
|
},
|
|
1573
1642
|
"taggedModuleExports": []
|
|
1574
1643
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_harmony","data","require","ESLintAspect","exports","Aspect","create","id"],"sources":["eslint.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ESLintAspect = Aspect.create({\n id: 'teambit.defender/eslint',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["_harmony","data","require","ESLintAspect","exports","Aspect","create","id"],"sources":["eslint.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ESLintAspect = Aspect.create({\n id: 'teambit.defender/eslint',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["eslint.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/brands/logo-eslint.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA+C,CAAE,CAC7E,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["eslint.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/brands/logo-eslint.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA+C,CAAE,CAC7E,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_lodash","_eslint","_pMapSeries","_objectHash","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","ESLintLinter","constructor","logger","options","ESLint","displayConfig","JSON","stringify","lint","context","longProcessLogger","createLongProcessLogger","components","eslint","createEslint","config","tsConfig","rootDir","tsConfigPath","createTempTsConfigFile","componentsDirMap","envRuntime","id","overrideConfig","parserOptions","project","resultsP","mapSeries","component","logProgress","toString","filesystem","files","filesP","map","file","extensions","includes","extname","undefined","path","compact","Promise","all","lintResults","lintFiles","fix","ESLintLib","outputFixes","results","flatten","formatter","loadFormatter","output","format","totalErrorCount","totalFatalErrorCount","totalFixableErrorCount","totalFixableWarningCount","totalWarningCount","componentsResults","computeComponentResultsWithTotals","totalComponentsWithErrorCount","totalComponentsWithFatalErrorCount","totalComponentsWithFixableErrorCount","totalComponentsWithFixableWarningCount","totalComponentsWithWarningCount","computeManyComponentsTotals","errors","componentDirMap","envId","newTsConfig","compDirs","toArray","compDir","include","includedPath","exclude","excludedPath","cacheDir","getCacheDir","hash","objectHash","tempTsConfigPath","join","fs","existsSync","outputJSONSync","spaces","result","errorCount","fatalErrorCount","fixableErrorCount","fixableWarningCount","warningCount","filePath","messages","raw","ESLintModule","version","exports"],"sources":["eslint.linter.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { flatten, compact } from 'lodash';\nimport { Linter, LinterContext, LintResults, ComponentLintResult } from '@teambit/linter';\nimport { ESLint as ESLintLib } from 'eslint';\nimport mapSeries from 'p-map-series';\nimport objectHash from 'object-hash';\nimport { ComponentMap } from '@teambit/component';\nimport { Logger } from '@teambit/logger';\nimport { ESLintOptions } from './eslint.main.runtime';\n\nexport class ESLintLinter implements Linter {\n constructor(\n private logger: Logger,\n\n private options: ESLintOptions,\n\n /**\n * reference to the eslint module.\n */\n private ESLint?: any\n ) {}\n\n id = 'eslint-linter';\n displayName = 'ESlint';\n\n displayConfig() {\n return JSON.stringify(this.options, null, 2);\n }\n\n async lint(context: LinterContext): Promise<LintResults> {\n const longProcessLogger = this.logger.createLongProcessLogger('linting components', context.components.length);\n const eslint = this.createEslint(this.options.config, this.ESLint);\n if (this.options.tsConfig && context.rootDir) {\n const tsConfigPath = this.createTempTsConfigFile(\n context.rootDir,\n context.componentsDirMap,\n context.envRuntime.id,\n this.options.tsConfig\n );\n if (this.options?.config?.overrideConfig?.parserOptions) {\n this.options.config.overrideConfig.parserOptions.project = tsConfigPath;\n }\n }\n const resultsP = mapSeries(context.components, async (component) => {\n longProcessLogger.logProgress(\n `component: ${component.id.toString()}, # of files: ${component.filesystem.files.length}`\n );\n const filesP = component.filesystem.files.map(async (file) => {\n // TODO: now that we moved to lint files, maybe it's not required anymore\n // The eslint api will not ignore extensions by default when using lintText, so we do it manually\n if (!this.options.extensions?.includes(file.extname)) return undefined;\n return file.path;\n });\n\n const files = compact(await Promise.all(filesP));\n const lintResults = await eslint.lintFiles(files);\n\n if (eslint && this.options.config.fix && lintResults) {\n await ESLintLib.outputFixes(lintResults);\n }\n\n const results: ESLintLib.LintResult[] = compact(flatten(lintResults));\n const formatter = await eslint.loadFormatter(this.options.formatter || 'stylish');\n const output = formatter.format(results);\n const {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n componentsResults,\n } = this.computeComponentResultsWithTotals(results);\n\n return {\n component,\n output,\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n results: componentsResults,\n };\n });\n\n const results = (await resultsP) as any as ComponentLintResult[];\n const {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n } = this.computeManyComponentsTotals(results);\n\n return {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n results,\n errors: [],\n };\n }\n\n private createTempTsConfigFile(\n rootDir: string,\n componentDirMap: ComponentMap<string>,\n envId: string,\n tsConfig: Record<string, any>\n ): string {\n const newTsConfig = {\n ...tsConfig,\n };\n const compDirs: string[] = componentDirMap.toArray().map(([, compDir]) => compDir);\n if (tsConfig.include) {\n newTsConfig.include = flatten(\n tsConfig.include.map((includedPath) => {\n return compDirs.map((compDir) => `../../${compDir}/${includedPath}`);\n })\n );\n }\n if (tsConfig.exclude) {\n newTsConfig.exclude = flatten(\n tsConfig.exclude.map((excludedPath) => {\n return compDirs.map((compDir) => `../../${compDir}/${excludedPath}`);\n })\n );\n }\n const cacheDir = getCacheDir(rootDir);\n const hash = objectHash(newTsConfig);\n // We save the tsconfig with hash here to avoid creating unnecessary tsconfig files\n // this is very important as eslint will be able to cache the tsconfig file and will not need to create another program\n // this affects performance dramatically\n const tempTsConfigPath = path.join(cacheDir, `bit.tsconfig.eslint.${hash}.json`);\n if (!fs.existsSync(tempTsConfigPath)) {\n fs.outputJSONSync(tempTsConfigPath, newTsConfig, { spaces: 2 });\n }\n return tempTsConfigPath;\n }\n\n private computeComponentResultsWithTotals(results: ESLintLib.LintResult[]) {\n let totalErrorCount = 0;\n let totalFatalErrorCount = 0;\n let totalFixableErrorCount = 0;\n let totalFixableWarningCount = 0;\n let totalWarningCount = 0;\n const componentsResults = results.map((result) => {\n totalErrorCount += result.errorCount ?? 0;\n // @ts-ignore - missing from the @types/eslint lib\n totalFatalErrorCount += result.fatalErrorCount ?? 0;\n totalFixableErrorCount += result.fixableErrorCount ?? 0;\n totalFixableWarningCount += result.fixableWarningCount ?? 0;\n totalWarningCount += result.warningCount ?? 0;\n return {\n filePath: result.filePath,\n errorCount: result.errorCount,\n // @ts-ignore - missing from the @types/eslint lib\n fatalErrorCount: result.fatalErrorCount,\n fixableErrorCount: result.fixableErrorCount,\n fixableWarningCount: result.fixableWarningCount,\n warningCount: result.warningCount,\n messages: result.messages,\n raw: result,\n };\n });\n return {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n componentsResults,\n };\n }\n\n private computeManyComponentsTotals(componentsResults: ComponentLintResult[]) {\n let totalErrorCount = 0;\n let totalFatalErrorCount = 0;\n let totalFixableErrorCount = 0;\n let totalFixableWarningCount = 0;\n let totalWarningCount = 0;\n let totalComponentsWithErrorCount = 0;\n let totalComponentsWithFatalErrorCount = 0;\n let totalComponentsWithFixableErrorCount = 0;\n let totalComponentsWithFixableWarningCount = 0;\n let totalComponentsWithWarningCount = 0;\n\n componentsResults.forEach((result) => {\n if (result.totalErrorCount) {\n totalErrorCount += result.totalErrorCount;\n totalComponentsWithErrorCount += 1;\n }\n // @ts-ignore - missing from the @types/eslint lib\n if (result.totalFatalErrorCount) {\n totalFatalErrorCount += result.totalFatalErrorCount;\n totalComponentsWithFatalErrorCount += 1;\n }\n if (result.totalFixableErrorCount) {\n totalFixableErrorCount += result.totalFixableErrorCount;\n totalComponentsWithFixableErrorCount += 1;\n }\n if (result.totalFixableWarningCount) {\n totalFixableWarningCount += result.totalFixableWarningCount;\n totalComponentsWithFixableWarningCount += 1;\n }\n if (result.totalWarningCount) {\n totalWarningCount += result.totalWarningCount;\n totalComponentsWithWarningCount += 1;\n }\n });\n return {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n componentsResults,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n };\n }\n\n /**\n * Create the eslint instance by options that was already merged with context\n * @param options\n * @param ESLintModule\n * @returns\n */\n private createEslint(options: ESLintLib.Options, ESLintModule?: any): ESLintLib {\n // eslint-disable-next-line no-new\n if (ESLintModule) new ESLintModule.ESLint(options);\n return new ESLintLib(options);\n }\n\n version() {\n if (this.ESLint) return this.ESLint.version;\n return ESLintLib.version;\n }\n}\n\nfunction getCacheDir(rootDir): string {\n return path.join(rootDir, 'node_modules', '.cache');\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;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,MAAM,CAAC+F,OAAO;IAC3C,OAAOpD,gBAAS,CAACoD,OAAO;EAC1B;AACF;AAACC,OAAA,CAAApG,YAAA,GAAAA,YAAA;AAED,SAASgF,WAAWA,CAAC/D,OAAO,EAAU;EACpC,OAAOuB,eAAI,CAAC4C,IAAI,CAACnE,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC;AACrD"}
|
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_lodash","_eslint","_pMapSeries","_objectHash","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","ESLintLinter","constructor","logger","options","ESLint","displayConfig","JSON","stringify","lint","context","longProcessLogger","createLongProcessLogger","components","eslint","createEslint","config","tsConfig","rootDir","tsConfigPath","createTempTsConfigFile","componentsDirMap","envRuntime","id","overrideConfig","parserOptions","project","resultsP","mapSeries","component","logProgress","toString","filesystem","files","filesP","map","file","extensions","includes","extname","undefined","path","compact","Promise","all","lintResults","lintFiles","fix","ESLintLib","outputFixes","results","flatten","formatter","loadFormatter","output","format","totalErrorCount","totalFatalErrorCount","totalFixableErrorCount","totalFixableWarningCount","totalWarningCount","componentsResults","computeComponentResultsWithTotals","totalComponentsWithErrorCount","totalComponentsWithFatalErrorCount","totalComponentsWithFixableErrorCount","totalComponentsWithFixableWarningCount","totalComponentsWithWarningCount","computeManyComponentsTotals","errors","componentDirMap","envId","newTsConfig","compDirs","toArray","compDir","include","includedPath","exclude","excludedPath","cacheDir","getCacheDir","hash","objectHash","tempTsConfigPath","join","fs","existsSync","outputJSONSync","spaces","result","errorCount","fatalErrorCount","fixableErrorCount","fixableWarningCount","warningCount","filePath","messages","raw","ESLintModule","version","exports"],"sources":["eslint.linter.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { flatten, compact } from 'lodash';\nimport { Linter, LinterContext, LintResults, ComponentLintResult } from '@teambit/linter';\nimport { ESLint as ESLintLib } from 'eslint';\nimport mapSeries from 'p-map-series';\nimport objectHash from 'object-hash';\nimport { ComponentMap } from '@teambit/component';\nimport { Logger } from '@teambit/logger';\nimport { ESLintOptions } from './eslint.main.runtime';\n\nexport class ESLintLinter implements Linter {\n constructor(\n private logger: Logger,\n\n private options: ESLintOptions,\n\n /**\n * reference to the eslint module.\n */\n private ESLint?: any\n ) {}\n\n id = 'eslint-linter';\n displayName = 'ESlint';\n\n displayConfig() {\n return JSON.stringify(this.options, null, 2);\n }\n\n async lint(context: LinterContext): Promise<LintResults> {\n const longProcessLogger = this.logger.createLongProcessLogger('linting components', context.components.length);\n const eslint = this.createEslint(this.options.config, this.ESLint);\n if (this.options.tsConfig && context.rootDir) {\n const tsConfigPath = this.createTempTsConfigFile(\n context.rootDir,\n context.componentsDirMap,\n context.envRuntime.id,\n this.options.tsConfig\n );\n if (this.options?.config?.overrideConfig?.parserOptions) {\n this.options.config.overrideConfig.parserOptions.project = tsConfigPath;\n }\n }\n const resultsP = mapSeries(context.components, async (component) => {\n longProcessLogger.logProgress(\n `component: ${component.id.toString()}, # of files: ${component.filesystem.files.length}`\n );\n const filesP = component.filesystem.files.map(async (file) => {\n // TODO: now that we moved to lint files, maybe it's not required anymore\n // The eslint api will not ignore extensions by default when using lintText, so we do it manually\n if (!this.options.extensions?.includes(file.extname)) return undefined;\n return file.path;\n });\n\n const files = compact(await Promise.all(filesP));\n const lintResults = await eslint.lintFiles(files);\n\n if (eslint && this.options.config.fix && lintResults) {\n await ESLintLib.outputFixes(lintResults);\n }\n\n const results: ESLintLib.LintResult[] = compact(flatten(lintResults));\n const formatter = await eslint.loadFormatter(this.options.formatter || 'stylish');\n const output = formatter.format(results);\n const {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n componentsResults,\n } = this.computeComponentResultsWithTotals(results);\n\n return {\n component,\n output,\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n results: componentsResults,\n };\n });\n\n const results = (await resultsP) as any as ComponentLintResult[];\n const {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n } = this.computeManyComponentsTotals(results);\n\n return {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n results,\n errors: [],\n };\n }\n\n private createTempTsConfigFile(\n rootDir: string,\n componentDirMap: ComponentMap<string>,\n envId: string,\n tsConfig: Record<string, any>\n ): string {\n const newTsConfig = {\n ...tsConfig,\n };\n const compDirs: string[] = componentDirMap.toArray().map(([, compDir]) => compDir);\n if (tsConfig.include) {\n newTsConfig.include = flatten(\n tsConfig.include.map((includedPath) => {\n return compDirs.map((compDir) => `../../${compDir}/${includedPath}`);\n })\n );\n }\n if (tsConfig.exclude) {\n newTsConfig.exclude = flatten(\n tsConfig.exclude.map((excludedPath) => {\n return compDirs.map((compDir) => `../../${compDir}/${excludedPath}`);\n })\n );\n }\n const cacheDir = getCacheDir(rootDir);\n const hash = objectHash(newTsConfig);\n // We save the tsconfig with hash here to avoid creating unnecessary tsconfig files\n // this is very important as eslint will be able to cache the tsconfig file and will not need to create another program\n // this affects performance dramatically\n const tempTsConfigPath = path.join(cacheDir, `bit.tsconfig.eslint.${hash}.json`);\n if (!fs.existsSync(tempTsConfigPath)) {\n fs.outputJSONSync(tempTsConfigPath, newTsConfig, { spaces: 2 });\n }\n return tempTsConfigPath;\n }\n\n private computeComponentResultsWithTotals(results: ESLintLib.LintResult[]) {\n let totalErrorCount = 0;\n let totalFatalErrorCount = 0;\n let totalFixableErrorCount = 0;\n let totalFixableWarningCount = 0;\n let totalWarningCount = 0;\n const componentsResults = results.map((result) => {\n totalErrorCount += result.errorCount ?? 0;\n // @ts-ignore - missing from the @types/eslint lib\n totalFatalErrorCount += result.fatalErrorCount ?? 0;\n totalFixableErrorCount += result.fixableErrorCount ?? 0;\n totalFixableWarningCount += result.fixableWarningCount ?? 0;\n totalWarningCount += result.warningCount ?? 0;\n return {\n filePath: result.filePath,\n errorCount: result.errorCount,\n // @ts-ignore - missing from the @types/eslint lib\n fatalErrorCount: result.fatalErrorCount,\n fixableErrorCount: result.fixableErrorCount,\n fixableWarningCount: result.fixableWarningCount,\n warningCount: result.warningCount,\n messages: result.messages,\n raw: result,\n };\n });\n return {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n componentsResults,\n };\n }\n\n private computeManyComponentsTotals(componentsResults: ComponentLintResult[]) {\n let totalErrorCount = 0;\n let totalFatalErrorCount = 0;\n let totalFixableErrorCount = 0;\n let totalFixableWarningCount = 0;\n let totalWarningCount = 0;\n let totalComponentsWithErrorCount = 0;\n let totalComponentsWithFatalErrorCount = 0;\n let totalComponentsWithFixableErrorCount = 0;\n let totalComponentsWithFixableWarningCount = 0;\n let totalComponentsWithWarningCount = 0;\n\n componentsResults.forEach((result) => {\n if (result.totalErrorCount) {\n totalErrorCount += result.totalErrorCount;\n totalComponentsWithErrorCount += 1;\n }\n // @ts-ignore - missing from the @types/eslint lib\n if (result.totalFatalErrorCount) {\n totalFatalErrorCount += result.totalFatalErrorCount;\n totalComponentsWithFatalErrorCount += 1;\n }\n if (result.totalFixableErrorCount) {\n totalFixableErrorCount += result.totalFixableErrorCount;\n totalComponentsWithFixableErrorCount += 1;\n }\n if (result.totalFixableWarningCount) {\n totalFixableWarningCount += result.totalFixableWarningCount;\n totalComponentsWithFixableWarningCount += 1;\n }\n if (result.totalWarningCount) {\n totalWarningCount += result.totalWarningCount;\n totalComponentsWithWarningCount += 1;\n }\n });\n return {\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n componentsResults,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n };\n }\n\n /**\n * Create the eslint instance by options that was already merged with context\n * @param options\n * @param ESLintModule\n * @returns\n */\n private createEslint(options: ESLintLib.Options, ESLintModule?: any): ESLintLib {\n // eslint-disable-next-line no-new\n if (ESLintModule) new ESLintModule.ESLint(options);\n return new ESLintLib(options);\n }\n\n version() {\n if (this.ESLint) return this.ESLint.version;\n return ESLintLib.version;\n }\n}\n\nfunction getCacheDir(rootDir): string {\n return path.join(rootDir, 'node_modules', '.cache');\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAA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,EAAE+F,YAAkB,EAAa;IAC9E;IACA,IAAIA,YAAY,EAAE,IAAIA,YAAY,CAAC9F,MAAM,CAACD,OAAO,CAAC;IAClD,OAAO,KAAI4C,gBAAS,EAAC5C,OAAO,CAAC;EAC/B;EAEAgG,OAAOA,CAAA,EAAG;IACR,IAAI,IAAI,CAAC/F,MAAM,EAAE,OAAO,IAAI,CAACA,MAAM,CAAC+F,OAAO;IAC3C,OAAOpD,gBAAS,CAACoD,OAAO;EAC1B;AACF;AAACC,OAAA,CAAApG,YAAA,GAAAA,YAAA;AAED,SAASgF,WAAWA,CAAC/D,OAAO,EAAU;EACpC,OAAOuB,eAAI,CAAC4C,IAAI,CAACnE,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC;AACrD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_logger","_defenderEslint","_eslint","_eslint2","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","ESLintMain","constructor","logger","createLinter","context","options","transformers","ESLintModule","mergedOptions","getOptions","configMutator","EslintConfigMutator","transformerContext","fix","afterMutation","runTransformersWithContext","clone","ESLintLinter","raw","provider","loggerExt","createLogger","ESLintAspect","id","exports","MainRuntime","LoggerAspect","addRuntime","mergedConfig","overrideConfig","config","extensions","extensionFormats","useEslintrc","cwd","pluginPath","fixTypes","assign","Array","isArray","newConfig","reduce","acc","transformer"],"sources":["eslint.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\n// import { Linter as ESLinter, ESLint as ESLintLib } from 'eslint';\nimport { ESLint as ESLintLib } from 'eslint';\nimport { Linter, LinterContext, LinterMain } from '@teambit/linter';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { EslintConfigMutator } from '@teambit/defender.eslint.config-mutator';\nimport { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { ESLintAspect } from './eslint.aspect';\nimport { ESLintLinter } from './eslint.linter';\n\nexport type ESLintOptions = {\n /**\n * linter config for eslint.\n */\n // config: ESLinter.Config;\n config: ESLintLib.Options;\n\n /**\n * specify to path to resolve eslint plugins from.\n */\n pluginPath?: string;\n\n /**\n * decide the formatter for the CLI output.\n */\n formatter?: string;\n\n /**\n * file types to lint.\n */\n extensions?: string[];\n\n // TODO: improve type\n /**\n * typescript config for eslint.\n * If you pass this, bit will auto generate a temp config file in `node_modules/.cache` and pass it to eslint.\n * In case you have include/exclude props in the tsconfig, they will be changed to handle the fact that they are inside the node_modules/.cache folder.\n * a `../../` will be added to the beginning of the path.\n */\n tsConfig?: Record<string, any>;\n};\n\nexport type EslintConfigTransformContext = {\n fix: boolean;\n};\n\nexport type EslintConfigTransformer = (\n config: EslintConfigMutator,\n context: EslintConfigTransformContext\n) => EslintConfigMutator;\n\nexport class ESLintMain {\n constructor(private logger: Logger) {}\n\n /**\n * create a eslint linter instance.\n * @param options eslint options.\n * @param ESLintModule reference to an `eslint` module.\n */\n createLinter(\n context: LinterContext,\n options: ESLintOptions,\n transformers: EslintConfigTransformer[] = [],\n ESLintModule?: any\n ): Linter {\n const mergedOptions = getOptions(options, context);\n const configMutator = new EslintConfigMutator(mergedOptions);\n const transformerContext: EslintConfigTransformContext = { fix: !!context.fix };\n const afterMutation = runTransformersWithContext(configMutator.clone(), transformers, transformerContext);\n\n return new ESLintLinter(this.logger, afterMutation.raw, ESLintModule);\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [LoggerAspect];\n\n static async provider([loggerExt]: [LoggerMain, WorkspaceConfigFilesMain, LinterMain]): Promise<ESLintMain> {\n const logger = loggerExt.createLogger(ESLintAspect.id);\n return new ESLintMain(logger);\n }\n}\n\nESLintAspect.addRuntime(ESLintMain);\n\n/**\n * get options for eslint.\n */\nfunction getOptions(options: ESLintOptions, context: LinterContext): ESLintOptions {\n const mergedConfig: ESLintLib.Options = {\n // @ts-ignore - this is a bug in the @types/eslint types\n overrideConfig: options.config,\n extensions: context.extensionFormats,\n useEslintrc: false,\n cwd: options.pluginPath,\n fix: !!context.fix,\n fixTypes: context.fixTypes,\n };\n return Object.assign({}, options, { config: mergedConfig, extensions: context.extensionFormats });\n}\n\nexport function runTransformersWithContext(\n config: EslintConfigMutator,\n transformers: EslintConfigTransformer[] = [],\n context: EslintConfigTransformContext\n): EslintConfigMutator {\n if (!Array.isArray(transformers)) return config;\n const newConfig = transformers.reduce((acc, transformer) => {\n return transformer(acc, context);\n }, config);\n return newConfig;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,SAAAM,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,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ineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","ESLintMain","constructor","logger","createLinter","context","options","transformers","ESLintModule","mergedOptions","getOptions","configMutator","EslintConfigMutator","transformerContext","fix","afterMutation","runTransformersWithContext","clone","ESLintLinter","raw","provider","loggerExt","createLogger","ESLintAspect","id","exports","MainRuntime","LoggerAspect","addRuntime","mergedConfig","overrideConfig","config","extensions","extensionFormats","useEslintrc","cwd","pluginPath","fixTypes","assign","Array","isArray","newConfig","reduce","acc","transformer"],"sources":["eslint.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\n// import { Linter as ESLinter, ESLint as ESLintLib } from 'eslint';\nimport { ESLint as ESLintLib } from 'eslint';\nimport { Linter, LinterContext, LinterMain } from '@teambit/linter';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { EslintConfigMutator } from '@teambit/defender.eslint.config-mutator';\nimport { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { ESLintAspect } from './eslint.aspect';\nimport { ESLintLinter } from './eslint.linter';\n\nexport type ESLintOptions = {\n /**\n * linter config for eslint.\n */\n // config: ESLinter.Config;\n config: ESLintLib.Options;\n\n /**\n * specify to path to resolve eslint plugins from.\n */\n pluginPath?: string;\n\n /**\n * decide the formatter for the CLI output.\n */\n formatter?: string;\n\n /**\n * file types to lint.\n */\n extensions?: string[];\n\n // TODO: improve type\n /**\n * typescript config for eslint.\n * If you pass this, bit will auto generate a temp config file in `node_modules/.cache` and pass it to eslint.\n * In case you have include/exclude props in the tsconfig, they will be changed to handle the fact that they are inside the node_modules/.cache folder.\n * a `../../` will be added to the beginning of the path.\n */\n tsConfig?: Record<string, any>;\n};\n\nexport type EslintConfigTransformContext = {\n fix: boolean;\n};\n\nexport type EslintConfigTransformer = (\n config: EslintConfigMutator,\n context: EslintConfigTransformContext\n) => EslintConfigMutator;\n\nexport class ESLintMain {\n constructor(private logger: Logger) {}\n\n /**\n * create a eslint linter instance.\n * @param options eslint options.\n * @param ESLintModule reference to an `eslint` module.\n */\n createLinter(\n context: LinterContext,\n options: ESLintOptions,\n transformers: EslintConfigTransformer[] = [],\n ESLintModule?: any\n ): Linter {\n const mergedOptions = getOptions(options, context);\n const configMutator = new EslintConfigMutator(mergedOptions);\n const transformerContext: EslintConfigTransformContext = { fix: !!context.fix };\n const afterMutation = runTransformersWithContext(configMutator.clone(), transformers, transformerContext);\n\n return new ESLintLinter(this.logger, afterMutation.raw, ESLintModule);\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [LoggerAspect];\n\n static async provider([loggerExt]: [LoggerMain, WorkspaceConfigFilesMain, LinterMain]): Promise<ESLintMain> {\n const logger = loggerExt.createLogger(ESLintAspect.id);\n return new ESLintMain(logger);\n }\n}\n\nESLintAspect.addRuntime(ESLintMain);\n\n/**\n * get options for eslint.\n */\nfunction getOptions(options: ESLintOptions, context: LinterContext): ESLintOptions {\n const mergedConfig: ESLintLib.Options = {\n // @ts-ignore - this is a bug in the @types/eslint types\n overrideConfig: options.config,\n extensions: context.extensionFormats,\n useEslintrc: false,\n cwd: options.pluginPath,\n fix: !!context.fix,\n fixTypes: context.fixTypes,\n };\n return Object.assign({}, options, { config: mergedConfig, extensions: context.extensionFormats });\n}\n\nexport function runTransformersWithContext(\n config: EslintConfigMutator,\n transformers: EslintConfigTransformer[] = [],\n context: EslintConfigTransformContext\n): EslintConfigMutator {\n if (!Array.isArray(transformers)) return config;\n const newConfig = transformers.reduce((acc, transformer) => {\n return transformer(acc, context);\n }, config);\n return newConfig;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;I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AAC,CAACT,OAAO,CAACS,GAAG;IAClBuB,QAAQ,EAAEhC,OAAO,CAACgC;EACpB,CAAC;EACD,OAAOpD,MAAM,CAACqD,MAAM,CAAC,CAAC,CAAC,EAAEhC,OAAO,EAAE;IAAEyB,MAAM,EAAEF,YAAY;IAAEG,UAAU,EAAE3B,OAAO,CAAC4B;EAAiB,CAAC,CAAC;AACnG;AAEO,SAASjB,0BAA0BA,CACxCe,MAA2B,EAC3BxB,YAAuC,GAAG,EAAE,EAC5CF,OAAqC,EAChB;EACrB,IAAI,CAACkC,KAAK,CAACC,OAAO,CAACjC,YAAY,CAAC,EAAE,OAAOwB,MAAM;EAC/C,MAAMU,SAAS,GAAGlC,YAAY,CAACmC,MAAM,CAAC,CAACC,GAAG,EAAEC,WAAW,KAAK;IAC1D,OAAOA,WAAW,CAACD,GAAG,EAAEtC,OAAO,CAAC;EAClC,CAAC,EAAE0B,MAAM,CAAC;EACV,OAAOU,SAAS;AAClB","ignoreList":[]}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_eslint","data","require","_default","exports","default","ESLintAspect"],"sources":["index.ts"],"sourcesContent":["import { ESLintAspect } from './eslint.aspect';\n\nexport { ESLintAspect };\nexport type {\n ESLintMain,\n ESLintOptions,\n EslintConfigTransformContext,\n EslintConfigTransformer,\n} from './eslint.main.runtime';\nexport default ESLintAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAShCC,sBAAY"}
|
|
1
|
+
{"version":3,"names":["_eslint","data","require","_default","exports","default","ESLintAspect"],"sources":["index.ts"],"sourcesContent":["import { ESLintAspect } from './eslint.aspect';\n\nexport { ESLintAspect };\nexport type {\n ESLintMain,\n ESLintOptions,\n EslintConfigTransformContext,\n EslintConfigTransformer,\n} from './eslint.main.runtime';\nexport default ESLintAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAShCC,sBAAY","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as compositions_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.defender_eslint@1.0.189/dist/eslint.composition.js';
|
|
2
|
+
import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.defender_eslint@1.0.189/dist/eslint.docs.mdx';
|
|
3
|
+
|
|
4
|
+
export const compositions = [compositions_0];
|
|
5
|
+
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/eslint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.189",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/defender/eslint",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.defender",
|
|
8
8
|
"name": "eslint",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.189"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"eslint": "
|
|
12
|
+
"eslint": "8.56.0",
|
|
13
13
|
"fs-extra": "10.0.0",
|
|
14
14
|
"lodash": "4.17.21",
|
|
15
15
|
"object-hash": "2.1.1",
|
|
16
16
|
"p-map-series": "2.1.0",
|
|
17
17
|
"@babel/runtime": "7.23.2",
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
|
-
"@teambit/component": "1.0.
|
|
20
|
-
"@teambit/linter": "1.0.
|
|
21
|
-
"@teambit/logger": "0.0.
|
|
22
|
-
"@teambit/cli": "0.0.
|
|
23
|
-
"@teambit/defender.eslint.config-mutator": "0.0.
|
|
24
|
-
"@teambit/workspace-config-files": "1.0.
|
|
19
|
+
"@teambit/component": "1.0.189",
|
|
20
|
+
"@teambit/linter": "1.0.189",
|
|
21
|
+
"@teambit/logger": "0.0.949",
|
|
22
|
+
"@teambit/cli": "0.0.856",
|
|
23
|
+
"@teambit/defender.eslint.config-mutator": "0.0.99",
|
|
24
|
+
"@teambit/workspace-config-files": "1.0.189"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/eslint": "7.28.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@types/object-hash": "1.3.4",
|
|
31
31
|
"@types/mocha": "10.0.1",
|
|
32
32
|
"chai": "4.3.0",
|
|
33
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
33
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.27"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_eslint@1.0.187/dist/eslint.composition.js';
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_eslint@1.0.187/dist/eslint.docs.mdx';
|
|
3
|
-
|
|
4
|
-
export const compositions = [compositions_0];
|
|
5
|
-
export const overview = [overview_0];
|
|
6
|
-
|
|
7
|
-
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|