@teambit/linter 1.0.226 → 1.0.227
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_linter-preview.js +1 -1
- package/artifacts/schema.json +38 -153
- package/dist/{preview-1712632644937.js → preview-1712719054377.js} +2 -2
- package/package.json +10 -10
- package/tsconfig.json +25 -1
- package/dist/index.d.ts +0 -8
- package/dist/lint.cmd.d.ts +0 -56
- package/dist/lint.task.d.ts +0 -8
- package/dist/linter-context.d.ts +0 -30
- package/dist/linter-env-type.d.ts +0 -8
- package/dist/linter.aspect.d.ts +0 -2
- package/dist/linter.composition.d.ts +0 -1
- package/dist/linter.d.ts +0 -134
- package/dist/linter.graphql.d.ts +0 -4
- package/dist/linter.main.runtime.d.ts +0 -35
- package/dist/linter.service.d.ts +0 -29
@@ -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/linter@1.0.
|
3
|
+
<testsuite name="teambit.defender/linter@1.0.227" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</testsuites>
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.defender/linter-preview"]=n():e["teambit.defender/linter-preview"]=n()}(self,(()=>(()=>{"use strict";var e={
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.defender/linter-preview"]=n():e["teambit.defender/linter-preview"]=n()}(self,(()=>(()=>{"use strict";var e={57608:(e,n,t)=>{Object.defineProperty(n,"Ay",{enumerable:!0,get:function(){return o.default}});var o=r(t(47835));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.defender/content/linter-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/linter-overview",exported:!0}},47835:(e,n,t)=>{var o={id:"teambit.defender/content/linter-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/linter-overview",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=c,p(t(41594));var r=t(5016),i=t(65682),a=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},d.apply(this,arguments)}function l(e,n){if(null==e)return{};var t,o,r=s(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function s(e,n){if(null==e)return{};var t,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}p.__bit_component=o,d.__bit_component=o,l.__bit_component=o,s.__bit_component=o;var m={},u="wrapper";function c(e){var n=e.components,t=l(e,a);return(0,r.mdx)(u,d({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Overview"),(0,r.mdx)("p",null,"Linting helps us maintain consistent code styling and avoid potential bugs by analyzing our source code, statically, before it is compiled and executed."),(0,r.mdx)("p",null,"The Linter aspect simplifies and standardizes the process of component linting. It does so for linting during development (in the workspace) and for linting during component build (in a capsule, as part of the ",(0,r.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"Build Pipeline"),")"),(0,r.mdx)("h2",null,"Linting in development"),(0,r.mdx)("p",null,"Bit lints all components in the ",(0,r.mdx)("a",{parentName:"p",href:"/workspace/overview"},"Workspace")," using just a single command. That is true for components of all types, regardless of their specific ",(0,r.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env"),", and as a consequence of that, their specific Linter implementation"," and configuration."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"bit lint\n")),(0,r.mdx)("p",null,"To learn more on linting during development, please refer to ",(0,r.mdx)("a",{parentName:"p",href:"/linter/workspace-linting"},"Workspace Linting"),"."),(0,r.mdx)("h2",null,"Linting during build"),(0,r.mdx)("p",null,"During build, the lint task is only used for checking linting issues. it will not re-write the components with the auto fix option."),(0,r.mdx)("p",null,"Testing components for distribution is done during ",(0,r.mdx)("inlineCode",{parentName:"p"},"build")," by the Bit ",(0,r.mdx)("a",{parentName:"p",href:"/builder/overview"},"Builder"),"."),(0,r.mdx)("p",null,"Component build can be simulated with ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit build")," and done through ",(0,r.mdx)("a",{parentName:"p",href:"/components/tags"},"Tag")," or ",(0,r.mdx)("a",{parentName:"p",href:"/components/snaps"},"Snap")),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"bit build\n")),(0,r.mdx)("p",null,"By default, linting is ",(0,r.mdx)("strong",{parentName:"p"},"not")," part of the ",(0,r.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"Build Pipeline"),"."),(0,r.mdx)("h2",null,"Configuring and implementing Linters"),(0,r.mdx)("p",null,"The Linter implementation"," is configured in the ",(0,r.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env")," which is configured on your ",(0,r.mdx)("a",{parentName:"p",href:"/components/overview"},"Component"),". Customizing it can be done by ",(0,r.mdx)("a",{parentName:"p",href:"/"},"customizing an existing env with your linter")," or by ",(0,r.mdx)("a",{parentName:"p",href:"/envs/customizing-env"},"implementing your own Env"),"."),(0,r.mdx)("p",null,"Linter can also be implemented into Bit through few interfaces. ")))}c.__bit_component=o,c.isMDXComponent=!0},82905:(e,n,t)=>{var o={id:"teambit.defender/linter@1.0.227",homepage:"https://bit.cloud/teambit/defender/linter",exported:!0};function r(){const e=i(t(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/linter.svg"}));a.__bit_component=o,n.Logo=a},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React},65682:e=>{e.exports=TeambitMdxUiMdxScopeContext}},n={};function t(o){var r=n[o];if(void 0!==r)return r.exports;var i=n[o]={exports:{}};return e[o](i,i.exports,t),i.exports}t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{t.r(o),t.d(o,{compositions:()=>u,compositions_metadata:()=>f,overview:()=>c});var e={};t.r(e),t.d(e,{default:()=>m});var n=t(82905),r=(t(41594),t(5016)),i=t(65682),a=t(57608),p=["components"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},d.apply(this,arguments)}var l={},s="wrapper";function m(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,p);return(0,r.mdx)(s,d({},l,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{LinterOverview:a.Ay},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.Ay,{mdxType:"LinterOverview"})))}m.isMDXComponent=!0;const u=[n],c=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),o})()));
|
package/artifacts/schema.json
CHANGED
@@ -95,11 +95,7 @@
|
|
95
95
|
"line": 24,
|
96
96
|
"character": 29
|
97
97
|
},
|
98
|
-
"name": "EnvsMain"
|
99
|
-
"componentId": {
|
100
|
-
"scope": "teambit.envs",
|
101
|
-
"name": "envs"
|
102
|
-
}
|
98
|
+
"name": "EnvsMain"
|
103
99
|
},
|
104
100
|
"isOptional": false,
|
105
101
|
"isSpread": false
|
@@ -119,8 +115,7 @@
|
|
119
115
|
"line": 24,
|
120
116
|
"character": 62
|
121
117
|
},
|
122
|
-
"name": "LinterService"
|
123
|
-
"internalFilePath": "linter.service.ts"
|
118
|
+
"name": "LinterService"
|
124
119
|
},
|
125
120
|
"isOptional": false,
|
126
121
|
"isSpread": false
|
@@ -179,11 +174,7 @@
|
|
179
174
|
"line": 29,
|
180
175
|
"character": 26
|
181
176
|
},
|
182
|
-
"name": "Component"
|
183
|
-
"componentId": {
|
184
|
-
"scope": "teambit.component",
|
185
|
-
"name": "component"
|
186
|
-
}
|
177
|
+
"name": "Component"
|
187
178
|
}
|
188
179
|
},
|
189
180
|
"isOptional": false,
|
@@ -248,11 +239,7 @@
|
|
248
239
|
"line": 35,
|
249
240
|
"character": 22
|
250
241
|
},
|
251
|
-
"name": "ExecutionContext"
|
252
|
-
"componentId": {
|
253
|
-
"scope": "teambit.envs",
|
254
|
-
"name": "envs"
|
255
|
-
}
|
242
|
+
"name": "ExecutionContext"
|
256
243
|
},
|
257
244
|
"isOptional": false,
|
258
245
|
"isSpread": false
|
@@ -429,11 +416,7 @@
|
|
429
416
|
"line": 55,
|
430
417
|
"character": 55
|
431
418
|
},
|
432
|
-
"name": "EnvsMain"
|
433
|
-
"componentId": {
|
434
|
-
"scope": "teambit.envs",
|
435
|
-
"name": "envs"
|
436
|
-
}
|
419
|
+
"name": "EnvsMain"
|
437
420
|
},
|
438
421
|
{
|
439
422
|
"__schema": "TypeRefSchema",
|
@@ -442,11 +425,7 @@
|
|
442
425
|
"line": 55,
|
443
426
|
"character": 65
|
444
427
|
},
|
445
|
-
"name": "CLIMain"
|
446
|
-
"componentId": {
|
447
|
-
"scope": "teambit.harmony",
|
448
|
-
"name": "cli"
|
449
|
-
}
|
428
|
+
"name": "CLIMain"
|
450
429
|
},
|
451
430
|
{
|
452
431
|
"__schema": "TypeRefSchema",
|
@@ -455,11 +434,7 @@
|
|
455
434
|
"line": 55,
|
456
435
|
"character": 74
|
457
436
|
},
|
458
|
-
"name": "ComponentMain"
|
459
|
-
"componentId": {
|
460
|
-
"scope": "teambit.component",
|
461
|
-
"name": "component"
|
462
|
-
}
|
437
|
+
"name": "ComponentMain"
|
463
438
|
},
|
464
439
|
{
|
465
440
|
"__schema": "TypeRefSchema",
|
@@ -468,11 +443,7 @@
|
|
468
443
|
"line": 55,
|
469
444
|
"character": 89
|
470
445
|
},
|
471
|
-
"name": "LoggerMain"
|
472
|
-
"componentId": {
|
473
|
-
"scope": "teambit.harmony",
|
474
|
-
"name": "logger"
|
475
|
-
}
|
446
|
+
"name": "LoggerMain"
|
476
447
|
},
|
477
448
|
{
|
478
449
|
"__schema": "TypeRefSchema",
|
@@ -481,11 +452,7 @@
|
|
481
452
|
"line": 55,
|
482
453
|
"character": 101
|
483
454
|
},
|
484
|
-
"name": "Workspace"
|
485
|
-
"componentId": {
|
486
|
-
"scope": "teambit.workspace",
|
487
|
-
"name": "workspace"
|
488
|
-
}
|
455
|
+
"name": "Workspace"
|
489
456
|
}
|
490
457
|
]
|
491
458
|
},
|
@@ -602,8 +569,7 @@
|
|
602
569
|
"line": 18,
|
603
570
|
"character": 14
|
604
571
|
},
|
605
|
-
"name": "FixTypes"
|
606
|
-
"internalFilePath": "linter-context.ts"
|
572
|
+
"name": "FixTypes"
|
607
573
|
},
|
608
574
|
"isOptional": true
|
609
575
|
}
|
@@ -1011,11 +977,7 @@
|
|
1011
977
|
"line": 155,
|
1012
978
|
"character": 47
|
1013
979
|
},
|
1014
|
-
"name": "BuildContext"
|
1015
|
-
"componentId": {
|
1016
|
-
"scope": "teambit.pipelines",
|
1017
|
-
"name": "builder"
|
1018
|
-
}
|
980
|
+
"name": "BuildContext"
|
1019
981
|
},
|
1020
982
|
"isOptional": true,
|
1021
983
|
"isSpread": false
|
@@ -1276,8 +1238,7 @@
|
|
1276
1238
|
"line": 77,
|
1277
1239
|
"character": 13
|
1278
1240
|
},
|
1279
|
-
"name": "LintMessage"
|
1280
|
-
"internalFilePath": "linter.ts"
|
1241
|
+
"name": "LintMessage"
|
1281
1242
|
}
|
1282
1243
|
},
|
1283
1244
|
"isOptional": false
|
@@ -1685,11 +1646,7 @@
|
|
1685
1646
|
"line": 11,
|
1686
1647
|
"character": 26
|
1687
1648
|
},
|
1688
|
-
"name": "BuildContext"
|
1689
|
-
"componentId": {
|
1690
|
-
"scope": "teambit.pipelines",
|
1691
|
-
"name": "builder"
|
1692
|
-
}
|
1649
|
+
"name": "BuildContext"
|
1693
1650
|
},
|
1694
1651
|
"isOptional": false,
|
1695
1652
|
"isSpread": false
|
@@ -1711,11 +1668,7 @@
|
|
1711
1668
|
"line": 11,
|
1712
1669
|
"character": 49
|
1713
1670
|
},
|
1714
|
-
"name": "BuiltTaskResult"
|
1715
|
-
"componentId": {
|
1716
|
-
"scope": "teambit.pipelines",
|
1717
|
-
"name": "builder"
|
1718
|
-
}
|
1671
|
+
"name": "BuiltTaskResult"
|
1719
1672
|
}
|
1720
1673
|
]
|
1721
1674
|
},
|
@@ -1747,7 +1700,7 @@
|
|
1747
1700
|
"_legacy": {
|
1748
1701
|
"scope": "teambit.defender",
|
1749
1702
|
"name": "linter",
|
1750
|
-
"version": "1.0.
|
1703
|
+
"version": "1.0.227"
|
1751
1704
|
},
|
1752
1705
|
"_scope": "teambit.defender"
|
1753
1706
|
}
|
@@ -1842,10 +1795,6 @@
|
|
1842
1795
|
"character": 21
|
1843
1796
|
},
|
1844
1797
|
"name": "ComponentMap",
|
1845
|
-
"componentId": {
|
1846
|
-
"scope": "teambit.component",
|
1847
|
-
"name": "component"
|
1848
|
-
},
|
1849
1798
|
"typeArgs": [
|
1850
1799
|
{
|
1851
1800
|
"__schema": "KeywordTypeSchema",
|
@@ -1883,7 +1832,7 @@
|
|
1883
1832
|
"_legacy": {
|
1884
1833
|
"scope": "teambit.defender",
|
1885
1834
|
"name": "linter",
|
1886
|
-
"version": "1.0.
|
1835
|
+
"version": "1.0.227"
|
1887
1836
|
},
|
1888
1837
|
"_scope": "teambit.defender"
|
1889
1838
|
}
|
@@ -1994,8 +1943,7 @@
|
|
1994
1943
|
"line": 21,
|
1995
1944
|
"character": 14
|
1996
1945
|
},
|
1997
|
-
"name": "FixTypes"
|
1998
|
-
"internalFilePath": "linter-context.ts"
|
1946
|
+
"name": "FixTypes"
|
1999
1947
|
},
|
2000
1948
|
"doc": {
|
2001
1949
|
"__schema": "DocSchema",
|
@@ -2117,8 +2065,7 @@
|
|
2117
2065
|
"line": 21,
|
2118
2066
|
"character": 14
|
2119
2067
|
},
|
2120
|
-
"name": "FixTypes"
|
2121
|
-
"internalFilePath": "linter-context.ts"
|
2068
|
+
"name": "FixTypes"
|
2122
2069
|
},
|
2123
2070
|
"isOptional": true
|
2124
2071
|
}
|
@@ -2163,10 +2110,6 @@
|
|
2163
2110
|
"character": 13
|
2164
2111
|
},
|
2165
2112
|
"name": "EnvHandler",
|
2166
|
-
"componentId": {
|
2167
|
-
"scope": "teambit.envs",
|
2168
|
-
"name": "envs"
|
2169
|
-
},
|
2170
2113
|
"typeArgs": [
|
2171
2114
|
{
|
2172
2115
|
"__schema": "TypeRefSchema",
|
@@ -2314,8 +2257,7 @@
|
|
2314
2257
|
"line": 18,
|
2315
2258
|
"character": 14
|
2316
2259
|
},
|
2317
|
-
"name": "FixTypes"
|
2318
|
-
"internalFilePath": "linter-context.ts"
|
2260
|
+
"name": "FixTypes"
|
2319
2261
|
},
|
2320
2262
|
"isOptional": true
|
2321
2263
|
}
|
@@ -2378,11 +2320,7 @@
|
|
2378
2320
|
"line": 24,
|
2379
2321
|
"character": 29
|
2380
2322
|
},
|
2381
|
-
"name": "EnvsMain"
|
2382
|
-
"componentId": {
|
2383
|
-
"scope": "teambit.envs",
|
2384
|
-
"name": "envs"
|
2385
|
-
}
|
2323
|
+
"name": "EnvsMain"
|
2386
2324
|
},
|
2387
2325
|
"isOptional": false,
|
2388
2326
|
"isSpread": false
|
@@ -2402,8 +2340,7 @@
|
|
2402
2340
|
"line": 24,
|
2403
2341
|
"character": 62
|
2404
2342
|
},
|
2405
|
-
"name": "LinterService"
|
2406
|
-
"internalFilePath": "linter.service.ts"
|
2343
|
+
"name": "LinterService"
|
2407
2344
|
},
|
2408
2345
|
"isOptional": false,
|
2409
2346
|
"isSpread": false
|
@@ -2462,11 +2399,7 @@
|
|
2462
2399
|
"line": 29,
|
2463
2400
|
"character": 26
|
2464
2401
|
},
|
2465
|
-
"name": "Component"
|
2466
|
-
"componentId": {
|
2467
|
-
"scope": "teambit.component",
|
2468
|
-
"name": "component"
|
2469
|
-
}
|
2402
|
+
"name": "Component"
|
2470
2403
|
}
|
2471
2404
|
},
|
2472
2405
|
"isOptional": false,
|
@@ -2531,11 +2464,7 @@
|
|
2531
2464
|
"line": 35,
|
2532
2465
|
"character": 22
|
2533
2466
|
},
|
2534
|
-
"name": "ExecutionContext"
|
2535
|
-
"componentId": {
|
2536
|
-
"scope": "teambit.envs",
|
2537
|
-
"name": "envs"
|
2538
|
-
}
|
2467
|
+
"name": "ExecutionContext"
|
2539
2468
|
},
|
2540
2469
|
"isOptional": false,
|
2541
2470
|
"isSpread": false
|
@@ -2712,11 +2641,7 @@
|
|
2712
2641
|
"line": 55,
|
2713
2642
|
"character": 55
|
2714
2643
|
},
|
2715
|
-
"name": "EnvsMain"
|
2716
|
-
"componentId": {
|
2717
|
-
"scope": "teambit.envs",
|
2718
|
-
"name": "envs"
|
2719
|
-
}
|
2644
|
+
"name": "EnvsMain"
|
2720
2645
|
},
|
2721
2646
|
{
|
2722
2647
|
"__schema": "TypeRefSchema",
|
@@ -2725,11 +2650,7 @@
|
|
2725
2650
|
"line": 55,
|
2726
2651
|
"character": 65
|
2727
2652
|
},
|
2728
|
-
"name": "CLIMain"
|
2729
|
-
"componentId": {
|
2730
|
-
"scope": "teambit.harmony",
|
2731
|
-
"name": "cli"
|
2732
|
-
}
|
2653
|
+
"name": "CLIMain"
|
2733
2654
|
},
|
2734
2655
|
{
|
2735
2656
|
"__schema": "TypeRefSchema",
|
@@ -2738,11 +2659,7 @@
|
|
2738
2659
|
"line": 55,
|
2739
2660
|
"character": 74
|
2740
2661
|
},
|
2741
|
-
"name": "ComponentMain"
|
2742
|
-
"componentId": {
|
2743
|
-
"scope": "teambit.component",
|
2744
|
-
"name": "component"
|
2745
|
-
}
|
2662
|
+
"name": "ComponentMain"
|
2746
2663
|
},
|
2747
2664
|
{
|
2748
2665
|
"__schema": "TypeRefSchema",
|
@@ -2751,11 +2668,7 @@
|
|
2751
2668
|
"line": 55,
|
2752
2669
|
"character": 89
|
2753
2670
|
},
|
2754
|
-
"name": "LoggerMain"
|
2755
|
-
"componentId": {
|
2756
|
-
"scope": "teambit.harmony",
|
2757
|
-
"name": "logger"
|
2758
|
-
}
|
2671
|
+
"name": "LoggerMain"
|
2759
2672
|
},
|
2760
2673
|
{
|
2761
2674
|
"__schema": "TypeRefSchema",
|
@@ -2764,11 +2677,7 @@
|
|
2764
2677
|
"line": 55,
|
2765
2678
|
"character": 101
|
2766
2679
|
},
|
2767
|
-
"name": "Workspace"
|
2768
|
-
"componentId": {
|
2769
|
-
"scope": "teambit.workspace",
|
2770
|
-
"name": "workspace"
|
2771
|
-
}
|
2680
|
+
"name": "Workspace"
|
2772
2681
|
}
|
2773
2682
|
]
|
2774
2683
|
},
|
@@ -3338,8 +3247,7 @@
|
|
3338
3247
|
"line": 77,
|
3339
3248
|
"character": 13
|
3340
3249
|
},
|
3341
|
-
"name": "LintMessage"
|
3342
|
-
"internalFilePath": "linter.ts"
|
3250
|
+
"name": "LintMessage"
|
3343
3251
|
}
|
3344
3252
|
},
|
3345
3253
|
"isOptional": false
|
@@ -4016,11 +3924,7 @@
|
|
4016
3924
|
"line": 155,
|
4017
3925
|
"character": 47
|
4018
3926
|
},
|
4019
|
-
"name": "BuildContext"
|
4020
|
-
"componentId": {
|
4021
|
-
"scope": "teambit.pipelines",
|
4022
|
-
"name": "builder"
|
4023
|
-
}
|
3927
|
+
"name": "BuildContext"
|
4024
3928
|
},
|
4025
3929
|
"isOptional": true,
|
4026
3930
|
"isSpread": false
|
@@ -4160,11 +4064,7 @@
|
|
4160
4064
|
"line": 11,
|
4161
4065
|
"character": 26
|
4162
4066
|
},
|
4163
|
-
"name": "BuildContext"
|
4164
|
-
"componentId": {
|
4165
|
-
"scope": "teambit.pipelines",
|
4166
|
-
"name": "builder"
|
4167
|
-
}
|
4067
|
+
"name": "BuildContext"
|
4168
4068
|
},
|
4169
4069
|
"isOptional": false,
|
4170
4070
|
"isSpread": false
|
@@ -4186,11 +4086,7 @@
|
|
4186
4086
|
"line": 11,
|
4187
4087
|
"character": 49
|
4188
4088
|
},
|
4189
|
-
"name": "BuiltTaskResult"
|
4190
|
-
"componentId": {
|
4191
|
-
"scope": "teambit.pipelines",
|
4192
|
-
"name": "builder"
|
4193
|
-
}
|
4089
|
+
"name": "BuiltTaskResult"
|
4194
4090
|
}
|
4195
4091
|
]
|
4196
4092
|
},
|
@@ -4222,7 +4118,7 @@
|
|
4222
4118
|
"_legacy": {
|
4223
4119
|
"scope": "teambit.defender",
|
4224
4120
|
"name": "linter",
|
4225
|
-
"version": "1.0.
|
4121
|
+
"version": "1.0.227"
|
4226
4122
|
},
|
4227
4123
|
"_scope": "teambit.defender"
|
4228
4124
|
}
|
@@ -4313,8 +4209,7 @@
|
|
4313
4209
|
"line": 5,
|
4314
4210
|
"character": 30
|
4315
4211
|
},
|
4316
|
-
"name": "FixType"
|
4317
|
-
"internalFilePath": "linter-context.ts"
|
4212
|
+
"name": "FixType"
|
4318
4213
|
}
|
4319
4214
|
]
|
4320
4215
|
}
|
@@ -4423,8 +4318,7 @@
|
|
4423
4318
|
"line": 21,
|
4424
4319
|
"character": 14
|
4425
4320
|
},
|
4426
|
-
"name": "FixTypes"
|
4427
|
-
"internalFilePath": "linter-context.ts"
|
4321
|
+
"name": "FixTypes"
|
4428
4322
|
},
|
4429
4323
|
"isOptional": true
|
4430
4324
|
}
|
@@ -4518,10 +4412,6 @@
|
|
4518
4412
|
"character": 21
|
4519
4413
|
},
|
4520
4414
|
"name": "ComponentMap",
|
4521
|
-
"componentId": {
|
4522
|
-
"scope": "teambit.component",
|
4523
|
-
"name": "component"
|
4524
|
-
},
|
4525
4415
|
"typeArgs": [
|
4526
4416
|
{
|
4527
4417
|
"__schema": "KeywordTypeSchema",
|
@@ -4559,7 +4449,7 @@
|
|
4559
4449
|
"_legacy": {
|
4560
4450
|
"scope": "teambit.defender",
|
4561
4451
|
"name": "linter",
|
4562
|
-
"version": "1.0.
|
4452
|
+
"version": "1.0.227"
|
4563
4453
|
},
|
4564
4454
|
"_scope": "teambit.defender"
|
4565
4455
|
}
|
@@ -4670,8 +4560,7 @@
|
|
4670
4560
|
"line": 21,
|
4671
4561
|
"character": 14
|
4672
4562
|
},
|
4673
|
-
"name": "FixTypes"
|
4674
|
-
"internalFilePath": "linter-context.ts"
|
4563
|
+
"name": "FixTypes"
|
4675
4564
|
},
|
4676
4565
|
"doc": {
|
4677
4566
|
"__schema": "DocSchema",
|
@@ -4738,10 +4627,6 @@
|
|
4738
4627
|
"character": 13
|
4739
4628
|
},
|
4740
4629
|
"name": "EnvHandler",
|
4741
|
-
"componentId": {
|
4742
|
-
"scope": "teambit.envs",
|
4743
|
-
"name": "envs"
|
4744
|
-
},
|
4745
4630
|
"typeArgs": [
|
4746
4631
|
{
|
4747
4632
|
"__schema": "TypeRefSchema",
|
@@ -4766,7 +4651,7 @@
|
|
4766
4651
|
"componentId": {
|
4767
4652
|
"scope": "teambit.defender",
|
4768
4653
|
"name": "linter",
|
4769
|
-
"version": "1.0.
|
4654
|
+
"version": "1.0.227"
|
4770
4655
|
},
|
4771
4656
|
"taggedModuleExports": []
|
4772
4657
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.227/dist/linter.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.227/dist/linter.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/linter",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.227",
|
4
4
|
"homepage": "https://bit.cloud/teambit/defender/linter",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.defender",
|
8
8
|
"name": "linter",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.227"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -14,20 +14,20 @@
|
|
14
14
|
"graphql-tag": "2.12.1",
|
15
15
|
"cli-highlight": "2.1.9",
|
16
16
|
"@teambit/harmony": "0.4.6",
|
17
|
-
"@teambit/cli": "0.0.
|
18
|
-
"@teambit/component": "1.0.
|
19
|
-
"@teambit/envs": "1.0.
|
20
|
-
"@teambit/workspace": "1.0.
|
21
|
-
"@teambit/builder": "1.0.
|
22
|
-
"@teambit/isolator": "1.0.
|
23
|
-
"@teambit/logger": "0.0.
|
17
|
+
"@teambit/cli": "0.0.860",
|
18
|
+
"@teambit/component": "1.0.227",
|
19
|
+
"@teambit/envs": "1.0.227",
|
20
|
+
"@teambit/workspace": "1.0.227",
|
21
|
+
"@teambit/builder": "1.0.227",
|
22
|
+
"@teambit/isolator": "1.0.227",
|
23
|
+
"@teambit/logger": "0.0.953"
|
24
24
|
},
|
25
25
|
"devDependencies": {
|
26
26
|
"@types/lodash": "4.14.165",
|
27
27
|
"@types/mocha": "9.1.0",
|
28
28
|
"chai": "4.3.0",
|
29
29
|
"@teambit/defender.content.linter-overview": "1.95.0",
|
30
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
30
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
31
31
|
},
|
32
32
|
"peerDependencies": {
|
33
33
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
@@ -20,7 +20,8 @@
|
|
20
20
|
"emitDeclarationOnly": true,
|
21
21
|
"strict": true,
|
22
22
|
"strictPropertyInitialization": false,
|
23
|
-
"noImplicitAny": false
|
23
|
+
"noImplicitAny": false,
|
24
|
+
"composite": true
|
24
25
|
},
|
25
26
|
"exclude": [
|
26
27
|
"artifacts",
|
@@ -35,5 +36,28 @@
|
|
35
36
|
"include": [
|
36
37
|
"**/*",
|
37
38
|
"**/*.json"
|
39
|
+
],
|
40
|
+
"references": [
|
41
|
+
{
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.227"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_isolator@1.0.227"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
61
|
+
}
|
38
62
|
]
|
39
63
|
}
|
package/dist/index.d.ts
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
import { LinterAspect } from './linter.aspect';
|
2
|
-
export { LinterAspect };
|
3
|
-
export type { LinterMain, LinterConfig } from './linter.main.runtime';
|
4
|
-
export type { LintResults, Linter, LintResult, ComponentLintResult } from './linter';
|
5
|
-
export type { LintTask } from './lint.task';
|
6
|
-
export type { LinterContext, LinterOptions } from './linter-context';
|
7
|
-
export type { LinterEnv } from './linter-env-type';
|
8
|
-
export default LinterAspect;
|
package/dist/lint.cmd.d.ts
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
import { TimerResponse } from '@teambit/legacy/dist/toolbox/timer';
|
2
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
3
|
-
import { ComponentFactory, ComponentID } from '@teambit/component';
|
4
|
-
import { Workspace } from '@teambit/workspace';
|
5
|
-
import { LinterMain } from './linter.main.runtime';
|
6
|
-
import { ComponentLintResult, LintResults } from './linter';
|
7
|
-
export type LintCmdOptions = {
|
8
|
-
changed?: boolean;
|
9
|
-
fix?: boolean;
|
10
|
-
fixType?: string;
|
11
|
-
json?: boolean;
|
12
|
-
};
|
13
|
-
/**
|
14
|
-
* A type for result with componentId instead of the entire component, as when output to console, we don't want to print all the component
|
15
|
-
*/
|
16
|
-
export type JsonComponentLintResult = Omit<ComponentLintResult, 'component'> & {
|
17
|
-
componentId: ComponentID;
|
18
|
-
};
|
19
|
-
export type JsonLintDataResults = Omit<LintResults, 'results'> & {
|
20
|
-
results: JsonComponentLintResult[];
|
21
|
-
};
|
22
|
-
/**
|
23
|
-
* A type for result with componentId instead of the entire component, as when output to console, we don't want to print all the component
|
24
|
-
*/
|
25
|
-
export type JsonLintResultsData = {
|
26
|
-
duration: TimerResponse;
|
27
|
-
lintResults: JsonLintDataResults;
|
28
|
-
componentsIdsToLint: string[];
|
29
|
-
};
|
30
|
-
export type JsonLintResults = {
|
31
|
-
code: number;
|
32
|
-
data: JsonLintResultsData;
|
33
|
-
};
|
34
|
-
export declare class LintCmd implements Command {
|
35
|
-
private linter;
|
36
|
-
private componentHost;
|
37
|
-
private workspace;
|
38
|
-
name: string;
|
39
|
-
description: string;
|
40
|
-
arguments: {
|
41
|
-
name: string;
|
42
|
-
description: string;
|
43
|
-
}[];
|
44
|
-
helpUrl: string;
|
45
|
-
group: string;
|
46
|
-
options: CommandOptions;
|
47
|
-
constructor(linter: LinterMain, componentHost: ComponentFactory, workspace: Workspace);
|
48
|
-
report([pattern]: [string], linterOptions: LintCmdOptions): Promise<{
|
49
|
-
code: number;
|
50
|
-
data: string;
|
51
|
-
}>;
|
52
|
-
private getSummarySection;
|
53
|
-
private renderTotalLine;
|
54
|
-
json([pattern]: [string], linterOptions: LintCmdOptions): Promise<JsonLintResults>;
|
55
|
-
private getIdsToLint;
|
56
|
-
}
|
package/dist/lint.task.d.ts
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
import { BuildTask, BuiltTaskResult, BuildContext } from '@teambit/builder';
|
2
|
-
export declare class LintTask implements BuildTask {
|
3
|
-
readonly aspectId: string;
|
4
|
-
readonly name: string;
|
5
|
-
constructor(aspectId: string, name?: string);
|
6
|
-
execute(context: BuildContext): Promise<BuiltTaskResult>;
|
7
|
-
private getComponentsDirectory;
|
8
|
-
}
|
package/dist/linter-context.d.ts
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import { ComponentMap } from '@teambit/component';
|
2
|
-
import { ExecutionContext } from '@teambit/envs';
|
3
|
-
export type FixType = 'problem' | 'suggestion' | 'layout';
|
4
|
-
export type FixTypes = Array<FixType>;
|
5
|
-
export interface LinterOptions {
|
6
|
-
/**
|
7
|
-
* extensions formats to lint. (e.g. .ts, .tsx, etc.)
|
8
|
-
*/
|
9
|
-
extensionFormats?: string[];
|
10
|
-
/**
|
11
|
-
* automatically fix problems
|
12
|
-
*/
|
13
|
-
fix?: boolean;
|
14
|
-
/**
|
15
|
-
* specify the types of fixes to apply (problem, suggestion, layout)
|
16
|
-
*/
|
17
|
-
fixTypes?: FixTypes;
|
18
|
-
}
|
19
|
-
export interface LinterContext extends ExecutionContext, LinterOptions {
|
20
|
-
quiet?: boolean;
|
21
|
-
/**
|
22
|
-
* Root dir that contains all the components in the fs that are about to be linted
|
23
|
-
* Usually it's the workspace root dir or the capsule root dir
|
24
|
-
*/
|
25
|
-
rootDir?: string;
|
26
|
-
/**
|
27
|
-
* Component map with the path to the component in the fs
|
28
|
-
*/
|
29
|
-
componentsDirMap: ComponentMap<string>;
|
30
|
-
}
|
package/dist/linter.aspect.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/linter.d.ts
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
import { BuildContext } from '@teambit/builder';
|
2
|
-
import { Component } from '@teambit/component';
|
3
|
-
import { LinterContext } from './linter-context';
|
4
|
-
export type ComponentLintResult = {
|
5
|
-
/**
|
6
|
-
* the linted component.
|
7
|
-
*/
|
8
|
-
component: Component;
|
9
|
-
/**
|
10
|
-
* CLI output of the linter.
|
11
|
-
*/
|
12
|
-
output: string;
|
13
|
-
/**
|
14
|
-
* total errors count of the component (from all of the files).
|
15
|
-
*/
|
16
|
-
totalErrorCount: number;
|
17
|
-
/**
|
18
|
-
* total fatal errors count of the component (from all of the files).
|
19
|
-
*/
|
20
|
-
totalFatalErrorCount?: number;
|
21
|
-
/**
|
22
|
-
* total fixable errors count of the component (from all of the files).
|
23
|
-
*/
|
24
|
-
totalFixableErrorCount?: number;
|
25
|
-
/**
|
26
|
-
* total fatal warning count of the component (from all of the files).
|
27
|
-
*/
|
28
|
-
totalFixableWarningCount?: number;
|
29
|
-
/**
|
30
|
-
* total warning count of the component (from all of the files).
|
31
|
-
*/
|
32
|
-
totalWarningCount: number;
|
33
|
-
/**
|
34
|
-
* lint results for each one of the component files
|
35
|
-
*/
|
36
|
-
results: LintResult[];
|
37
|
-
};
|
38
|
-
export type LintResult = {
|
39
|
-
/**
|
40
|
-
* path of the linted file.
|
41
|
-
*/
|
42
|
-
filePath: string;
|
43
|
-
/**
|
44
|
-
* numbers of errors found.
|
45
|
-
*/
|
46
|
-
errorCount: number;
|
47
|
-
/**
|
48
|
-
* numbers of errors found.
|
49
|
-
*/
|
50
|
-
fatalErrorCount?: number;
|
51
|
-
/**
|
52
|
-
* numbers of fixable errors found.
|
53
|
-
*/
|
54
|
-
fixableErrorCount?: number;
|
55
|
-
/**
|
56
|
-
* numbers of fixable warning found.
|
57
|
-
*/
|
58
|
-
fixableWarningCount?: number;
|
59
|
-
/**
|
60
|
-
* number of found warnings.
|
61
|
-
*/
|
62
|
-
warningCount: number;
|
63
|
-
/**
|
64
|
-
* lint messages.
|
65
|
-
*/
|
66
|
-
messages: LintMessage[];
|
67
|
-
/**
|
68
|
-
* Raw data as returned from the linter
|
69
|
-
*/
|
70
|
-
raw: any;
|
71
|
-
};
|
72
|
-
export type LintMessage = {
|
73
|
-
/**
|
74
|
-
* severity of the issue.
|
75
|
-
*/
|
76
|
-
severity: string;
|
77
|
-
/**
|
78
|
-
* stating column of the issue.
|
79
|
-
*/
|
80
|
-
column: number;
|
81
|
-
/**
|
82
|
-
* line of the issue.
|
83
|
-
*/
|
84
|
-
line: number;
|
85
|
-
/**
|
86
|
-
* end column of the issue.
|
87
|
-
*/
|
88
|
-
endColumn?: number;
|
89
|
-
/**
|
90
|
-
* end line of the issue.
|
91
|
-
*/
|
92
|
-
endLine?: number;
|
93
|
-
/**
|
94
|
-
* message of the issue.
|
95
|
-
*/
|
96
|
-
message: string;
|
97
|
-
/**
|
98
|
-
* lint suggestions.
|
99
|
-
*/
|
100
|
-
suggestions?: string[];
|
101
|
-
};
|
102
|
-
export type LintResults = {
|
103
|
-
results: ComponentLintResult[];
|
104
|
-
/**
|
105
|
-
* total errors count of the component (from all of the components).
|
106
|
-
*/
|
107
|
-
totalErrorCount: number;
|
108
|
-
/**
|
109
|
-
* total fatal errors count of the component (from all of the components).
|
110
|
-
*/
|
111
|
-
totalFatalErrorCount?: number;
|
112
|
-
/**
|
113
|
-
* total fixable errors count of the component (from all of the components).
|
114
|
-
*/
|
115
|
-
totalFixableErrorCount?: number;
|
116
|
-
/**
|
117
|
-
* total fatal warning count of the component (from all of the components).
|
118
|
-
*/
|
119
|
-
totalFixableWarningCount?: number;
|
120
|
-
/**
|
121
|
-
* total warning count of the component (from all of the components).
|
122
|
-
*/
|
123
|
-
totalWarningCount: number;
|
124
|
-
totalComponentsWithErrorCount: number;
|
125
|
-
totalComponentsWithFatalErrorCount?: number;
|
126
|
-
totalComponentsWithFixableErrorCount?: number;
|
127
|
-
totalComponentsWithFixableWarningCount?: number;
|
128
|
-
totalComponentsWithWarningCount: number;
|
129
|
-
errors: Error[];
|
130
|
-
};
|
131
|
-
export interface Linter {
|
132
|
-
id: string;
|
133
|
-
lint(context: LinterContext, buildContext?: BuildContext): Promise<LintResults>;
|
134
|
-
}
|
package/dist/linter.graphql.d.ts
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
import { CLIMain } from '@teambit/cli';
|
2
|
-
import { Component, ComponentMain } from '@teambit/component';
|
3
|
-
import { EnvsMain, ExecutionContext } from '@teambit/envs';
|
4
|
-
import { LoggerMain } from '@teambit/logger';
|
5
|
-
import { Workspace } from '@teambit/workspace';
|
6
|
-
import { LinterService } from './linter.service';
|
7
|
-
import { LintTask } from './lint.task';
|
8
|
-
import { FixTypes, LinterOptions } from './linter-context';
|
9
|
-
import { Linter } from './linter';
|
10
|
-
export type LinterConfig = {
|
11
|
-
/**
|
12
|
-
* extension formats to lint.
|
13
|
-
*/
|
14
|
-
extensionFormats: string[];
|
15
|
-
fixTypes?: FixTypes;
|
16
|
-
};
|
17
|
-
export declare class LinterMain {
|
18
|
-
private envs;
|
19
|
-
private linterService;
|
20
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
21
|
-
constructor(envs: EnvsMain, linterService: LinterService);
|
22
|
-
/**
|
23
|
-
* lint an array of components.
|
24
|
-
*/
|
25
|
-
lint(components: Component[], opts: LinterOptions): Promise<import("@teambit/envs").EnvsExecutionResult<import("./linter").LintResults>>;
|
26
|
-
getLinter(context: ExecutionContext, options: LinterOptions): Linter;
|
27
|
-
/**
|
28
|
-
* create a lint task for build pipelines.
|
29
|
-
* @param name name of the task.
|
30
|
-
*/
|
31
|
-
createTask(name?: string): LintTask;
|
32
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
33
|
-
static defaultConfig: LinterConfig;
|
34
|
-
static provider([envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace], config: LinterConfig): Promise<LinterMain>;
|
35
|
-
}
|
package/dist/linter.service.d.ts
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
import { EnvService, ExecutionContext, EnvDefinition, ServiceTransformationMap, EnvContext, Env } from '@teambit/envs';
|
2
|
-
import { Workspace } from '@teambit/workspace';
|
3
|
-
import { Linter, LintResults } from './linter';
|
4
|
-
import { LinterOptions } from './linter-context';
|
5
|
-
import { LinterConfig } from './linter.main.runtime';
|
6
|
-
type LinterTransformationMap = ServiceTransformationMap & {
|
7
|
-
getLinter: () => Linter;
|
8
|
-
};
|
9
|
-
export declare class LinterService implements EnvService<LintResults> {
|
10
|
-
private linterConfig;
|
11
|
-
private workspace;
|
12
|
-
name: string;
|
13
|
-
constructor(linterConfig: LinterConfig, workspace: Workspace);
|
14
|
-
run(context: ExecutionContext, options: LinterOptions): Promise<LintResults>;
|
15
|
-
getLinter(context: ExecutionContext, options: LinterOptions): Linter;
|
16
|
-
private optionsWithDefaults;
|
17
|
-
private mergeContext;
|
18
|
-
private getComponentsDirectory;
|
19
|
-
render(env: EnvDefinition): string;
|
20
|
-
transform(env: Env, context: EnvContext): LinterTransformationMap | undefined;
|
21
|
-
getDescriptor(env: EnvDefinition): {
|
22
|
-
id: any;
|
23
|
-
icon: any;
|
24
|
-
config: any;
|
25
|
-
version: any;
|
26
|
-
displayName: any;
|
27
|
-
} | undefined;
|
28
|
-
}
|
29
|
-
export {};
|