@teambit/linter 1.0.425 → 1.0.427
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 +118 -118
- package/dist/lint.cmd.js.map +1 -1
- package/dist/lint.task.js.map +1 -1
- package/dist/linter.main.runtime.js.map +1 -1
- package/dist/linter.service.js.map +1 -1
- package/dist/{preview-1728184966899.js → preview-1728271406903.js} +2 -2
- package/package.json +9 -9
@@ -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.427" 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={675:(e,n,t)=>{Object.defineProperty(n,"Ay",{enumerable:!0,get:function(){return r.default}});var r=o(t(32));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.defender/content/linter-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/linter-overview",exported:!0}},32:(e,n,t)=>{var r={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(594));var o=t(16),i=t(682),a=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},l.apply(this,arguments)}function d(e,n){if(null==e)return{};var t,r,o=s(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}p.__bit_component=r,l.__bit_component=r,d.__bit_component=r,s.__bit_component=r;var m={},u="wrapper";function c(e){var n=e.components,t=d(e,a);return(0,o.mdx)(u,l({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,o.mdx)("h1",null,"Overview"),(0,o.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,o.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,o.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"Build Pipeline"),")"),(0,o.mdx)("h2",null,"Linting in development"),(0,o.mdx)("p",null,"Bit lints all components in the ",(0,o.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,o.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env"),", and as a consequence of that, their specific Linter implementation"," and configuration."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit lint\n")),(0,o.mdx)("p",null,"To learn more on linting during development, please refer to ",(0,o.mdx)("a",{parentName:"p",href:"/linter/workspace-linting"},"Workspace Linting"),"."),(0,o.mdx)("h2",null,"Linting during build"),(0,o.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,o.mdx)("p",null,"Testing components for distribution is done during ",(0,o.mdx)("inlineCode",{parentName:"p"},"build")," by the Bit ",(0,o.mdx)("a",{parentName:"p",href:"/builder/overview"},"Builder"),"."),(0,o.mdx)("p",null,"Component build can be simulated with ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit build")," and done through ",(0,o.mdx)("a",{parentName:"p",href:"/components/tags"},"Tag")," or ",(0,o.mdx)("a",{parentName:"p",href:"/components/snaps"},"Snap")),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit build\n")),(0,o.mdx)("p",null,"By default, linting is ",(0,o.mdx)("strong",{parentName:"p"},"not")," part of the ",(0,o.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"Build Pipeline"),"."),(0,o.mdx)("h2",null,"Configuring and implementing Linters"),(0,o.mdx)("p",null,"The Linter implementation"," is configured in the ",(0,o.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env")," which is configured on your ",(0,o.mdx)("a",{parentName:"p",href:"/components/overview"},"Component"),". Customizing it can be done by ",(0,o.mdx)("a",{parentName:"p",href:"/"},"customizing an existing env with your linter")," or by ",(0,o.mdx)("a",{parentName:"p",href:"/envs/customizing-env"},"implementing your own Env"),"."),(0,o.mdx)("p",null,"Linter can also be implemented into Bit through few interfaces. ")))}c.__bit_component=r,c.isMDXComponent=!0},973:(e,n,t)=>{var r={id:"teambit.defender/linter@1.0.427",homepage:"https://bit.cloud/teambit/defender/linter",exported:!0};function o(){const e=i(t(594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,o.__bit_component=r,i.__bit_component=r;const a=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/linter.svg"}));a.__bit_component=r,n.Logo=a},16:e=>{e.exports=MdxJsReact},594:e=>{e.exports=React},682:e=>{e.exports=TeambitMdxUiMdxScopeContext}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return e[r](i,i.exports,t),i.exports}t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},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 r={};t.r(r),t.d(r,{compositions:()=>f,compositions_metadata:()=>b,overview:()=>v});var o={};t.r(o),t.d(o,{default:()=>c});var i=t(973),a=(t(594),t(16)),p=t(682),l=t(675),d=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},s.apply(null,arguments)}var m={},u="wrapper";function c(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(n.includes(r))continue;t[r]=e[r]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,d);return(0,a.mdx)(u,s({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)(p.MDXScopeProvider,{components:{LinterOverview:l.Ay},mdxType:"MDXScopeProvider"},(0,a.mdx)(l.Ay,{mdxType:"LinterOverview"})))}c.isMDXComponent=!0;const f=[i],v=[o],b={compositions:[{displayName:"Logo",identifier:"Logo"}]};return r})()));
|
package/artifacts/schema.json
CHANGED
@@ -103,16 +103,16 @@
|
|
103
103
|
"__schema": "ParameterSchema",
|
104
104
|
"location": {
|
105
105
|
"filePath": "linter.main.runtime.ts",
|
106
|
-
"line":
|
107
|
-
"character":
|
106
|
+
"line": 25,
|
107
|
+
"character": 5
|
108
108
|
},
|
109
109
|
"name": "envs",
|
110
110
|
"type": {
|
111
111
|
"__schema": "TypeRefSchema",
|
112
112
|
"location": {
|
113
113
|
"filePath": "linter.main.runtime.ts",
|
114
|
-
"line":
|
115
|
-
"character":
|
114
|
+
"line": 25,
|
115
|
+
"character": 19
|
116
116
|
},
|
117
117
|
"name": "EnvsMain",
|
118
118
|
"componentId": {
|
@@ -127,16 +127,16 @@
|
|
127
127
|
"__schema": "ParameterSchema",
|
128
128
|
"location": {
|
129
129
|
"filePath": "linter.main.runtime.ts",
|
130
|
-
"line":
|
131
|
-
"character":
|
130
|
+
"line": 26,
|
131
|
+
"character": 5
|
132
132
|
},
|
133
133
|
"name": "linterService",
|
134
134
|
"type": {
|
135
135
|
"__schema": "TypeRefSchema",
|
136
136
|
"location": {
|
137
137
|
"filePath": "linter.main.runtime.ts",
|
138
|
-
"line":
|
139
|
-
"character":
|
138
|
+
"line": 26,
|
139
|
+
"character": 28
|
140
140
|
},
|
141
141
|
"name": "LinterService",
|
142
142
|
"internalFilePath": "linter.service.ts"
|
@@ -160,14 +160,14 @@
|
|
160
160
|
"__schema": "FunctionLikeSchema",
|
161
161
|
"location": {
|
162
162
|
"filePath": "linter.main.runtime.ts",
|
163
|
-
"line":
|
163
|
+
"line": 32,
|
164
164
|
"character": 3
|
165
165
|
},
|
166
166
|
"doc": {
|
167
167
|
"__schema": "DocSchema",
|
168
168
|
"location": {
|
169
169
|
"filePath": "linter.main.runtime.ts",
|
170
|
-
"line":
|
170
|
+
"line": 29,
|
171
171
|
"character": 3
|
172
172
|
},
|
173
173
|
"raw": "/**\n * lint an array of components.\n */",
|
@@ -181,7 +181,7 @@
|
|
181
181
|
"__schema": "ParameterSchema",
|
182
182
|
"location": {
|
183
183
|
"filePath": "linter.main.runtime.ts",
|
184
|
-
"line":
|
184
|
+
"line": 32,
|
185
185
|
"character": 14
|
186
186
|
},
|
187
187
|
"name": "components",
|
@@ -189,14 +189,14 @@
|
|
189
189
|
"__schema": "TypeArraySchema",
|
190
190
|
"location": {
|
191
191
|
"filePath": "linter.main.runtime.ts",
|
192
|
-
"line":
|
192
|
+
"line": 32,
|
193
193
|
"character": 26
|
194
194
|
},
|
195
195
|
"type": {
|
196
196
|
"__schema": "TypeRefSchema",
|
197
197
|
"location": {
|
198
198
|
"filePath": "linter.main.runtime.ts",
|
199
|
-
"line":
|
199
|
+
"line": 32,
|
200
200
|
"character": 26
|
201
201
|
},
|
202
202
|
"name": "Component",
|
@@ -213,7 +213,7 @@
|
|
213
213
|
"__schema": "ParameterSchema",
|
214
214
|
"location": {
|
215
215
|
"filePath": "linter.main.runtime.ts",
|
216
|
-
"line":
|
216
|
+
"line": 32,
|
217
217
|
"character": 39
|
218
218
|
},
|
219
219
|
"name": "opts",
|
@@ -221,7 +221,7 @@
|
|
221
221
|
"__schema": "TypeRefSchema",
|
222
222
|
"location": {
|
223
223
|
"filePath": "linter.main.runtime.ts",
|
224
|
-
"line":
|
224
|
+
"line": 32,
|
225
225
|
"character": 45
|
226
226
|
},
|
227
227
|
"name": "LinterOptions"
|
@@ -234,7 +234,7 @@
|
|
234
234
|
"__schema": "InferenceTypeSchema",
|
235
235
|
"location": {
|
236
236
|
"filePath": "linter.main.runtime.ts",
|
237
|
-
"line":
|
237
|
+
"line": 32,
|
238
238
|
"character": 3
|
239
239
|
},
|
240
240
|
"type": "Promise<EnvsExecutionResult<LintResults>>"
|
@@ -247,7 +247,7 @@
|
|
247
247
|
"__schema": "FunctionLikeSchema",
|
248
248
|
"location": {
|
249
249
|
"filePath": "linter.main.runtime.ts",
|
250
|
-
"line":
|
250
|
+
"line": 38,
|
251
251
|
"character": 3
|
252
252
|
},
|
253
253
|
"signature": "(method) LinterMain.getLinter(context: ExecutionContext, options: LinterOptions): Linter",
|
@@ -257,7 +257,7 @@
|
|
257
257
|
"__schema": "ParameterSchema",
|
258
258
|
"location": {
|
259
259
|
"filePath": "linter.main.runtime.ts",
|
260
|
-
"line":
|
260
|
+
"line": 38,
|
261
261
|
"character": 13
|
262
262
|
},
|
263
263
|
"name": "context",
|
@@ -265,7 +265,7 @@
|
|
265
265
|
"__schema": "TypeRefSchema",
|
266
266
|
"location": {
|
267
267
|
"filePath": "linter.main.runtime.ts",
|
268
|
-
"line":
|
268
|
+
"line": 38,
|
269
269
|
"character": 22
|
270
270
|
},
|
271
271
|
"name": "ExecutionContext",
|
@@ -281,7 +281,7 @@
|
|
281
281
|
"__schema": "ParameterSchema",
|
282
282
|
"location": {
|
283
283
|
"filePath": "linter.main.runtime.ts",
|
284
|
-
"line":
|
284
|
+
"line": 38,
|
285
285
|
"character": 40
|
286
286
|
},
|
287
287
|
"name": "options",
|
@@ -289,7 +289,7 @@
|
|
289
289
|
"__schema": "TypeRefSchema",
|
290
290
|
"location": {
|
291
291
|
"filePath": "linter.main.runtime.ts",
|
292
|
-
"line":
|
292
|
+
"line": 38,
|
293
293
|
"character": 49
|
294
294
|
},
|
295
295
|
"name": "LinterOptions"
|
@@ -302,7 +302,7 @@
|
|
302
302
|
"__schema": "TypeRefSchema",
|
303
303
|
"location": {
|
304
304
|
"filePath": "linter.main.runtime.ts",
|
305
|
-
"line":
|
305
|
+
"line": 38,
|
306
306
|
"character": 3
|
307
307
|
},
|
308
308
|
"name": "Linter"
|
@@ -313,14 +313,14 @@
|
|
313
313
|
"__schema": "FunctionLikeSchema",
|
314
314
|
"location": {
|
315
315
|
"filePath": "linter.main.runtime.ts",
|
316
|
-
"line":
|
316
|
+
"line": 46,
|
317
317
|
"character": 3
|
318
318
|
},
|
319
319
|
"doc": {
|
320
320
|
"__schema": "DocSchema",
|
321
321
|
"location": {
|
322
322
|
"filePath": "linter.main.runtime.ts",
|
323
|
-
"line":
|
323
|
+
"line": 42,
|
324
324
|
"character": 3
|
325
325
|
},
|
326
326
|
"raw": "/**\n * create a lint task for build pipelines.\n * @param name name of the task.\n */",
|
@@ -330,7 +330,7 @@
|
|
330
330
|
"__schema": "PropertyLikeTagSchema",
|
331
331
|
"location": {
|
332
332
|
"filePath": "linter.main.runtime.ts",
|
333
|
-
"line":
|
333
|
+
"line": 44,
|
334
334
|
"character": 6
|
335
335
|
},
|
336
336
|
"name": "name",
|
@@ -346,7 +346,7 @@
|
|
346
346
|
"__schema": "ParameterSchema",
|
347
347
|
"location": {
|
348
348
|
"filePath": "linter.main.runtime.ts",
|
349
|
-
"line":
|
349
|
+
"line": 46,
|
350
350
|
"character": 14
|
351
351
|
},
|
352
352
|
"name": "name",
|
@@ -354,7 +354,7 @@
|
|
354
354
|
"__schema": "KeywordTypeSchema",
|
355
355
|
"location": {
|
356
356
|
"filePath": "linter.main.runtime.ts",
|
357
|
-
"line":
|
357
|
+
"line": 46,
|
358
358
|
"character": 21
|
359
359
|
},
|
360
360
|
"name": "string"
|
@@ -367,7 +367,7 @@
|
|
367
367
|
"__schema": "TypeRefSchema",
|
368
368
|
"location": {
|
369
369
|
"filePath": "linter.main.runtime.ts",
|
370
|
-
"line":
|
370
|
+
"line": 46,
|
371
371
|
"character": 3
|
372
372
|
},
|
373
373
|
"name": "LintTask"
|
@@ -378,7 +378,7 @@
|
|
378
378
|
"__schema": "VariableLikeSchema",
|
379
379
|
"location": {
|
380
380
|
"filePath": "linter.main.runtime.ts",
|
381
|
-
"line":
|
381
|
+
"line": 50,
|
382
382
|
"character": 3
|
383
383
|
},
|
384
384
|
"signature": "(property) LinterMain.dependencies: Aspect[]",
|
@@ -387,7 +387,7 @@
|
|
387
387
|
"__schema": "InferenceTypeSchema",
|
388
388
|
"location": {
|
389
389
|
"filePath": "linter.main.runtime.ts",
|
390
|
-
"line":
|
390
|
+
"line": 50,
|
391
391
|
"character": 3
|
392
392
|
},
|
393
393
|
"type": "Aspect[]"
|
@@ -399,7 +399,7 @@
|
|
399
399
|
"__schema": "VariableLikeSchema",
|
400
400
|
"location": {
|
401
401
|
"filePath": "linter.main.runtime.ts",
|
402
|
-
"line":
|
402
|
+
"line": 52,
|
403
403
|
"character": 3
|
404
404
|
},
|
405
405
|
"signature": "(property) LinterMain.defaultConfig: LinterConfig",
|
@@ -408,7 +408,7 @@
|
|
408
408
|
"__schema": "TypeRefSchema",
|
409
409
|
"location": {
|
410
410
|
"filePath": "linter.main.runtime.ts",
|
411
|
-
"line":
|
411
|
+
"line": 52,
|
412
412
|
"character": 3
|
413
413
|
},
|
414
414
|
"name": "LinterConfig"
|
@@ -420,7 +420,7 @@
|
|
420
420
|
"__schema": "FunctionLikeSchema",
|
421
421
|
"location": {
|
422
422
|
"filePath": "linter.main.runtime.ts",
|
423
|
-
"line":
|
423
|
+
"line": 57,
|
424
424
|
"character": 3
|
425
425
|
},
|
426
426
|
"signature": "(method) LinterMain.provider([envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace], config: LinterConfig): Promise<LinterMain>",
|
@@ -430,7 +430,7 @@
|
|
430
430
|
"__schema": "ParameterSchema",
|
431
431
|
"location": {
|
432
432
|
"filePath": "linter.main.runtime.ts",
|
433
|
-
"line":
|
433
|
+
"line": 58,
|
434
434
|
"character": 5
|
435
435
|
},
|
436
436
|
"name": "[ envs, cli, component, loggerAspect, workspace ]",
|
@@ -438,7 +438,7 @@
|
|
438
438
|
"__schema": "TupleTypeSchema",
|
439
439
|
"location": {
|
440
440
|
"filePath": "linter.main.runtime.ts",
|
441
|
-
"line":
|
441
|
+
"line": 58,
|
442
442
|
"character": 54
|
443
443
|
},
|
444
444
|
"elements": [
|
@@ -446,7 +446,7 @@
|
|
446
446
|
"__schema": "TypeRefSchema",
|
447
447
|
"location": {
|
448
448
|
"filePath": "linter.main.runtime.ts",
|
449
|
-
"line":
|
449
|
+
"line": 58,
|
450
450
|
"character": 55
|
451
451
|
},
|
452
452
|
"name": "EnvsMain",
|
@@ -459,7 +459,7 @@
|
|
459
459
|
"__schema": "TypeRefSchema",
|
460
460
|
"location": {
|
461
461
|
"filePath": "linter.main.runtime.ts",
|
462
|
-
"line":
|
462
|
+
"line": 58,
|
463
463
|
"character": 65
|
464
464
|
},
|
465
465
|
"name": "CLIMain",
|
@@ -472,7 +472,7 @@
|
|
472
472
|
"__schema": "TypeRefSchema",
|
473
473
|
"location": {
|
474
474
|
"filePath": "linter.main.runtime.ts",
|
475
|
-
"line":
|
475
|
+
"line": 58,
|
476
476
|
"character": 74
|
477
477
|
},
|
478
478
|
"name": "ComponentMain",
|
@@ -485,7 +485,7 @@
|
|
485
485
|
"__schema": "TypeRefSchema",
|
486
486
|
"location": {
|
487
487
|
"filePath": "linter.main.runtime.ts",
|
488
|
-
"line":
|
488
|
+
"line": 58,
|
489
489
|
"character": 89
|
490
490
|
},
|
491
491
|
"name": "LoggerMain",
|
@@ -498,7 +498,7 @@
|
|
498
498
|
"__schema": "TypeRefSchema",
|
499
499
|
"location": {
|
500
500
|
"filePath": "linter.main.runtime.ts",
|
501
|
-
"line":
|
501
|
+
"line": 58,
|
502
502
|
"character": 101
|
503
503
|
},
|
504
504
|
"name": "Workspace",
|
@@ -516,7 +516,7 @@
|
|
516
516
|
"__schema": "ParameterSchema",
|
517
517
|
"location": {
|
518
518
|
"filePath": "linter.main.runtime.ts",
|
519
|
-
"line":
|
519
|
+
"line": 59,
|
520
520
|
"character": 5
|
521
521
|
},
|
522
522
|
"name": "config",
|
@@ -524,7 +524,7 @@
|
|
524
524
|
"__schema": "TypeRefSchema",
|
525
525
|
"location": {
|
526
526
|
"filePath": "linter.main.runtime.ts",
|
527
|
-
"line":
|
527
|
+
"line": 59,
|
528
528
|
"character": 13
|
529
529
|
},
|
530
530
|
"name": "LinterConfig"
|
@@ -537,7 +537,7 @@
|
|
537
537
|
"__schema": "InferenceTypeSchema",
|
538
538
|
"location": {
|
539
539
|
"filePath": "linter.main.runtime.ts",
|
540
|
-
"line":
|
540
|
+
"line": 57,
|
541
541
|
"character": 3
|
542
542
|
},
|
543
543
|
"type": "Promise<LinterMain>"
|
@@ -1775,16 +1775,16 @@
|
|
1775
1775
|
"__schema": "ParameterSchema",
|
1776
1776
|
"location": {
|
1777
1777
|
"filePath": "lint.task.ts",
|
1778
|
-
"line":
|
1779
|
-
"character":
|
1778
|
+
"line": 10,
|
1779
|
+
"character": 5
|
1780
1780
|
},
|
1781
1781
|
"name": "aspectId",
|
1782
1782
|
"type": {
|
1783
1783
|
"__schema": "KeywordTypeSchema",
|
1784
1784
|
"location": {
|
1785
1785
|
"filePath": "lint.task.ts",
|
1786
|
-
"line":
|
1787
|
-
"character":
|
1786
|
+
"line": 10,
|
1787
|
+
"character": 24
|
1788
1788
|
},
|
1789
1789
|
"name": "string"
|
1790
1790
|
},
|
@@ -1795,16 +1795,16 @@
|
|
1795
1795
|
"__schema": "ParameterSchema",
|
1796
1796
|
"location": {
|
1797
1797
|
"filePath": "lint.task.ts",
|
1798
|
-
"line":
|
1799
|
-
"character":
|
1798
|
+
"line": 11,
|
1799
|
+
"character": 5
|
1800
1800
|
},
|
1801
1801
|
"name": "name",
|
1802
1802
|
"type": {
|
1803
1803
|
"__schema": "InferenceTypeSchema",
|
1804
1804
|
"location": {
|
1805
1805
|
"filePath": "lint.task.ts",
|
1806
|
-
"line":
|
1807
|
-
"character":
|
1806
|
+
"line": 11,
|
1807
|
+
"character": 5
|
1808
1808
|
},
|
1809
1809
|
"type": "string"
|
1810
1810
|
},
|
@@ -1828,7 +1828,7 @@
|
|
1828
1828
|
"__schema": "FunctionLikeSchema",
|
1829
1829
|
"location": {
|
1830
1830
|
"filePath": "lint.task.ts",
|
1831
|
-
"line":
|
1831
|
+
"line": 14,
|
1832
1832
|
"character": 3
|
1833
1833
|
},
|
1834
1834
|
"signature": "(method) LintTask.execute(context: BuildContext): Promise<BuiltTaskResult>",
|
@@ -1838,7 +1838,7 @@
|
|
1838
1838
|
"__schema": "ParameterSchema",
|
1839
1839
|
"location": {
|
1840
1840
|
"filePath": "lint.task.ts",
|
1841
|
-
"line":
|
1841
|
+
"line": 14,
|
1842
1842
|
"character": 17
|
1843
1843
|
},
|
1844
1844
|
"name": "context",
|
@@ -1846,7 +1846,7 @@
|
|
1846
1846
|
"__schema": "TypeRefSchema",
|
1847
1847
|
"location": {
|
1848
1848
|
"filePath": "lint.task.ts",
|
1849
|
-
"line":
|
1849
|
+
"line": 14,
|
1850
1850
|
"character": 26
|
1851
1851
|
},
|
1852
1852
|
"name": "BuildContext",
|
@@ -1863,7 +1863,7 @@
|
|
1863
1863
|
"__schema": "TypeRefSchema",
|
1864
1864
|
"location": {
|
1865
1865
|
"filePath": "lint.task.ts",
|
1866
|
-
"line":
|
1866
|
+
"line": 14,
|
1867
1867
|
"character": 41
|
1868
1868
|
},
|
1869
1869
|
"name": "Promise",
|
@@ -1872,7 +1872,7 @@
|
|
1872
1872
|
"__schema": "TypeRefSchema",
|
1873
1873
|
"location": {
|
1874
1874
|
"filePath": "lint.task.ts",
|
1875
|
-
"line":
|
1875
|
+
"line": 14,
|
1876
1876
|
"character": 49
|
1877
1877
|
},
|
1878
1878
|
"name": "BuiltTaskResult",
|
@@ -1911,7 +1911,7 @@
|
|
1911
1911
|
"_legacy": {
|
1912
1912
|
"scope": "teambit.defender",
|
1913
1913
|
"name": "linter",
|
1914
|
-
"version": "1.0.
|
1914
|
+
"version": "1.0.427"
|
1915
1915
|
},
|
1916
1916
|
"_scope": "teambit.defender"
|
1917
1917
|
}
|
@@ -2059,7 +2059,7 @@
|
|
2059
2059
|
"_legacy": {
|
2060
2060
|
"scope": "teambit.defender",
|
2061
2061
|
"name": "linter",
|
2062
|
-
"version": "1.0.
|
2062
|
+
"version": "1.0.427"
|
2063
2063
|
},
|
2064
2064
|
"_scope": "teambit.defender"
|
2065
2065
|
}
|
@@ -2572,16 +2572,16 @@
|
|
2572
2572
|
"__schema": "ParameterSchema",
|
2573
2573
|
"location": {
|
2574
2574
|
"filePath": "linter.main.runtime.ts",
|
2575
|
-
"line":
|
2576
|
-
"character":
|
2575
|
+
"line": 25,
|
2576
|
+
"character": 5
|
2577
2577
|
},
|
2578
2578
|
"name": "envs",
|
2579
2579
|
"type": {
|
2580
2580
|
"__schema": "TypeRefSchema",
|
2581
2581
|
"location": {
|
2582
2582
|
"filePath": "linter.main.runtime.ts",
|
2583
|
-
"line":
|
2584
|
-
"character":
|
2583
|
+
"line": 25,
|
2584
|
+
"character": 19
|
2585
2585
|
},
|
2586
2586
|
"name": "EnvsMain",
|
2587
2587
|
"componentId": {
|
@@ -2596,16 +2596,16 @@
|
|
2596
2596
|
"__schema": "ParameterSchema",
|
2597
2597
|
"location": {
|
2598
2598
|
"filePath": "linter.main.runtime.ts",
|
2599
|
-
"line":
|
2600
|
-
"character":
|
2599
|
+
"line": 26,
|
2600
|
+
"character": 5
|
2601
2601
|
},
|
2602
2602
|
"name": "linterService",
|
2603
2603
|
"type": {
|
2604
2604
|
"__schema": "TypeRefSchema",
|
2605
2605
|
"location": {
|
2606
2606
|
"filePath": "linter.main.runtime.ts",
|
2607
|
-
"line":
|
2608
|
-
"character":
|
2607
|
+
"line": 26,
|
2608
|
+
"character": 28
|
2609
2609
|
},
|
2610
2610
|
"name": "LinterService",
|
2611
2611
|
"internalFilePath": "linter.service.ts"
|
@@ -2629,14 +2629,14 @@
|
|
2629
2629
|
"__schema": "FunctionLikeSchema",
|
2630
2630
|
"location": {
|
2631
2631
|
"filePath": "linter.main.runtime.ts",
|
2632
|
-
"line":
|
2632
|
+
"line": 32,
|
2633
2633
|
"character": 3
|
2634
2634
|
},
|
2635
2635
|
"doc": {
|
2636
2636
|
"__schema": "DocSchema",
|
2637
2637
|
"location": {
|
2638
2638
|
"filePath": "linter.main.runtime.ts",
|
2639
|
-
"line":
|
2639
|
+
"line": 29,
|
2640
2640
|
"character": 3
|
2641
2641
|
},
|
2642
2642
|
"raw": "/**\n * lint an array of components.\n */",
|
@@ -2650,7 +2650,7 @@
|
|
2650
2650
|
"__schema": "ParameterSchema",
|
2651
2651
|
"location": {
|
2652
2652
|
"filePath": "linter.main.runtime.ts",
|
2653
|
-
"line":
|
2653
|
+
"line": 32,
|
2654
2654
|
"character": 14
|
2655
2655
|
},
|
2656
2656
|
"name": "components",
|
@@ -2658,14 +2658,14 @@
|
|
2658
2658
|
"__schema": "TypeArraySchema",
|
2659
2659
|
"location": {
|
2660
2660
|
"filePath": "linter.main.runtime.ts",
|
2661
|
-
"line":
|
2661
|
+
"line": 32,
|
2662
2662
|
"character": 26
|
2663
2663
|
},
|
2664
2664
|
"type": {
|
2665
2665
|
"__schema": "TypeRefSchema",
|
2666
2666
|
"location": {
|
2667
2667
|
"filePath": "linter.main.runtime.ts",
|
2668
|
-
"line":
|
2668
|
+
"line": 32,
|
2669
2669
|
"character": 26
|
2670
2670
|
},
|
2671
2671
|
"name": "Component",
|
@@ -2682,7 +2682,7 @@
|
|
2682
2682
|
"__schema": "ParameterSchema",
|
2683
2683
|
"location": {
|
2684
2684
|
"filePath": "linter.main.runtime.ts",
|
2685
|
-
"line":
|
2685
|
+
"line": 32,
|
2686
2686
|
"character": 39
|
2687
2687
|
},
|
2688
2688
|
"name": "opts",
|
@@ -2690,7 +2690,7 @@
|
|
2690
2690
|
"__schema": "TypeRefSchema",
|
2691
2691
|
"location": {
|
2692
2692
|
"filePath": "linter.main.runtime.ts",
|
2693
|
-
"line":
|
2693
|
+
"line": 32,
|
2694
2694
|
"character": 45
|
2695
2695
|
},
|
2696
2696
|
"name": "LinterOptions"
|
@@ -2703,7 +2703,7 @@
|
|
2703
2703
|
"__schema": "InferenceTypeSchema",
|
2704
2704
|
"location": {
|
2705
2705
|
"filePath": "linter.main.runtime.ts",
|
2706
|
-
"line":
|
2706
|
+
"line": 32,
|
2707
2707
|
"character": 3
|
2708
2708
|
},
|
2709
2709
|
"type": "Promise<EnvsExecutionResult<LintResults>>"
|
@@ -2716,7 +2716,7 @@
|
|
2716
2716
|
"__schema": "FunctionLikeSchema",
|
2717
2717
|
"location": {
|
2718
2718
|
"filePath": "linter.main.runtime.ts",
|
2719
|
-
"line":
|
2719
|
+
"line": 38,
|
2720
2720
|
"character": 3
|
2721
2721
|
},
|
2722
2722
|
"signature": "(method) LinterMain.getLinter(context: ExecutionContext, options: LinterOptions): Linter",
|
@@ -2726,7 +2726,7 @@
|
|
2726
2726
|
"__schema": "ParameterSchema",
|
2727
2727
|
"location": {
|
2728
2728
|
"filePath": "linter.main.runtime.ts",
|
2729
|
-
"line":
|
2729
|
+
"line": 38,
|
2730
2730
|
"character": 13
|
2731
2731
|
},
|
2732
2732
|
"name": "context",
|
@@ -2734,7 +2734,7 @@
|
|
2734
2734
|
"__schema": "TypeRefSchema",
|
2735
2735
|
"location": {
|
2736
2736
|
"filePath": "linter.main.runtime.ts",
|
2737
|
-
"line":
|
2737
|
+
"line": 38,
|
2738
2738
|
"character": 22
|
2739
2739
|
},
|
2740
2740
|
"name": "ExecutionContext",
|
@@ -2750,7 +2750,7 @@
|
|
2750
2750
|
"__schema": "ParameterSchema",
|
2751
2751
|
"location": {
|
2752
2752
|
"filePath": "linter.main.runtime.ts",
|
2753
|
-
"line":
|
2753
|
+
"line": 38,
|
2754
2754
|
"character": 40
|
2755
2755
|
},
|
2756
2756
|
"name": "options",
|
@@ -2758,7 +2758,7 @@
|
|
2758
2758
|
"__schema": "TypeRefSchema",
|
2759
2759
|
"location": {
|
2760
2760
|
"filePath": "linter.main.runtime.ts",
|
2761
|
-
"line":
|
2761
|
+
"line": 38,
|
2762
2762
|
"character": 49
|
2763
2763
|
},
|
2764
2764
|
"name": "LinterOptions"
|
@@ -2771,7 +2771,7 @@
|
|
2771
2771
|
"__schema": "TypeRefSchema",
|
2772
2772
|
"location": {
|
2773
2773
|
"filePath": "linter.main.runtime.ts",
|
2774
|
-
"line":
|
2774
|
+
"line": 38,
|
2775
2775
|
"character": 3
|
2776
2776
|
},
|
2777
2777
|
"name": "Linter"
|
@@ -2782,14 +2782,14 @@
|
|
2782
2782
|
"__schema": "FunctionLikeSchema",
|
2783
2783
|
"location": {
|
2784
2784
|
"filePath": "linter.main.runtime.ts",
|
2785
|
-
"line":
|
2785
|
+
"line": 46,
|
2786
2786
|
"character": 3
|
2787
2787
|
},
|
2788
2788
|
"doc": {
|
2789
2789
|
"__schema": "DocSchema",
|
2790
2790
|
"location": {
|
2791
2791
|
"filePath": "linter.main.runtime.ts",
|
2792
|
-
"line":
|
2792
|
+
"line": 42,
|
2793
2793
|
"character": 3
|
2794
2794
|
},
|
2795
2795
|
"raw": "/**\n * create a lint task for build pipelines.\n * @param name name of the task.\n */",
|
@@ -2799,7 +2799,7 @@
|
|
2799
2799
|
"__schema": "PropertyLikeTagSchema",
|
2800
2800
|
"location": {
|
2801
2801
|
"filePath": "linter.main.runtime.ts",
|
2802
|
-
"line":
|
2802
|
+
"line": 44,
|
2803
2803
|
"character": 6
|
2804
2804
|
},
|
2805
2805
|
"name": "name",
|
@@ -2815,7 +2815,7 @@
|
|
2815
2815
|
"__schema": "ParameterSchema",
|
2816
2816
|
"location": {
|
2817
2817
|
"filePath": "linter.main.runtime.ts",
|
2818
|
-
"line":
|
2818
|
+
"line": 46,
|
2819
2819
|
"character": 14
|
2820
2820
|
},
|
2821
2821
|
"name": "name",
|
@@ -2823,7 +2823,7 @@
|
|
2823
2823
|
"__schema": "KeywordTypeSchema",
|
2824
2824
|
"location": {
|
2825
2825
|
"filePath": "linter.main.runtime.ts",
|
2826
|
-
"line":
|
2826
|
+
"line": 46,
|
2827
2827
|
"character": 21
|
2828
2828
|
},
|
2829
2829
|
"name": "string"
|
@@ -2836,7 +2836,7 @@
|
|
2836
2836
|
"__schema": "TypeRefSchema",
|
2837
2837
|
"location": {
|
2838
2838
|
"filePath": "linter.main.runtime.ts",
|
2839
|
-
"line":
|
2839
|
+
"line": 46,
|
2840
2840
|
"character": 3
|
2841
2841
|
},
|
2842
2842
|
"name": "LintTask"
|
@@ -2847,7 +2847,7 @@
|
|
2847
2847
|
"__schema": "VariableLikeSchema",
|
2848
2848
|
"location": {
|
2849
2849
|
"filePath": "linter.main.runtime.ts",
|
2850
|
-
"line":
|
2850
|
+
"line": 50,
|
2851
2851
|
"character": 3
|
2852
2852
|
},
|
2853
2853
|
"signature": "(property) LinterMain.dependencies: Aspect[]",
|
@@ -2856,7 +2856,7 @@
|
|
2856
2856
|
"__schema": "InferenceTypeSchema",
|
2857
2857
|
"location": {
|
2858
2858
|
"filePath": "linter.main.runtime.ts",
|
2859
|
-
"line":
|
2859
|
+
"line": 50,
|
2860
2860
|
"character": 3
|
2861
2861
|
},
|
2862
2862
|
"type": "Aspect[]"
|
@@ -2868,7 +2868,7 @@
|
|
2868
2868
|
"__schema": "VariableLikeSchema",
|
2869
2869
|
"location": {
|
2870
2870
|
"filePath": "linter.main.runtime.ts",
|
2871
|
-
"line":
|
2871
|
+
"line": 52,
|
2872
2872
|
"character": 3
|
2873
2873
|
},
|
2874
2874
|
"signature": "(property) LinterMain.defaultConfig: LinterConfig",
|
@@ -2877,7 +2877,7 @@
|
|
2877
2877
|
"__schema": "TypeRefSchema",
|
2878
2878
|
"location": {
|
2879
2879
|
"filePath": "linter.main.runtime.ts",
|
2880
|
-
"line":
|
2880
|
+
"line": 52,
|
2881
2881
|
"character": 3
|
2882
2882
|
},
|
2883
2883
|
"name": "LinterConfig"
|
@@ -2889,7 +2889,7 @@
|
|
2889
2889
|
"__schema": "FunctionLikeSchema",
|
2890
2890
|
"location": {
|
2891
2891
|
"filePath": "linter.main.runtime.ts",
|
2892
|
-
"line":
|
2892
|
+
"line": 57,
|
2893
2893
|
"character": 3
|
2894
2894
|
},
|
2895
2895
|
"signature": "(method) LinterMain.provider([envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace], config: LinterConfig): Promise<LinterMain>",
|
@@ -2899,7 +2899,7 @@
|
|
2899
2899
|
"__schema": "ParameterSchema",
|
2900
2900
|
"location": {
|
2901
2901
|
"filePath": "linter.main.runtime.ts",
|
2902
|
-
"line":
|
2902
|
+
"line": 58,
|
2903
2903
|
"character": 5
|
2904
2904
|
},
|
2905
2905
|
"name": "[ envs, cli, component, loggerAspect, workspace ]",
|
@@ -2907,7 +2907,7 @@
|
|
2907
2907
|
"__schema": "TupleTypeSchema",
|
2908
2908
|
"location": {
|
2909
2909
|
"filePath": "linter.main.runtime.ts",
|
2910
|
-
"line":
|
2910
|
+
"line": 58,
|
2911
2911
|
"character": 54
|
2912
2912
|
},
|
2913
2913
|
"elements": [
|
@@ -2915,7 +2915,7 @@
|
|
2915
2915
|
"__schema": "TypeRefSchema",
|
2916
2916
|
"location": {
|
2917
2917
|
"filePath": "linter.main.runtime.ts",
|
2918
|
-
"line":
|
2918
|
+
"line": 58,
|
2919
2919
|
"character": 55
|
2920
2920
|
},
|
2921
2921
|
"name": "EnvsMain",
|
@@ -2928,7 +2928,7 @@
|
|
2928
2928
|
"__schema": "TypeRefSchema",
|
2929
2929
|
"location": {
|
2930
2930
|
"filePath": "linter.main.runtime.ts",
|
2931
|
-
"line":
|
2931
|
+
"line": 58,
|
2932
2932
|
"character": 65
|
2933
2933
|
},
|
2934
2934
|
"name": "CLIMain",
|
@@ -2941,7 +2941,7 @@
|
|
2941
2941
|
"__schema": "TypeRefSchema",
|
2942
2942
|
"location": {
|
2943
2943
|
"filePath": "linter.main.runtime.ts",
|
2944
|
-
"line":
|
2944
|
+
"line": 58,
|
2945
2945
|
"character": 74
|
2946
2946
|
},
|
2947
2947
|
"name": "ComponentMain",
|
@@ -2954,7 +2954,7 @@
|
|
2954
2954
|
"__schema": "TypeRefSchema",
|
2955
2955
|
"location": {
|
2956
2956
|
"filePath": "linter.main.runtime.ts",
|
2957
|
-
"line":
|
2957
|
+
"line": 58,
|
2958
2958
|
"character": 89
|
2959
2959
|
},
|
2960
2960
|
"name": "LoggerMain",
|
@@ -2967,7 +2967,7 @@
|
|
2967
2967
|
"__schema": "TypeRefSchema",
|
2968
2968
|
"location": {
|
2969
2969
|
"filePath": "linter.main.runtime.ts",
|
2970
|
-
"line":
|
2970
|
+
"line": 58,
|
2971
2971
|
"character": 101
|
2972
2972
|
},
|
2973
2973
|
"name": "Workspace",
|
@@ -2985,7 +2985,7 @@
|
|
2985
2985
|
"__schema": "ParameterSchema",
|
2986
2986
|
"location": {
|
2987
2987
|
"filePath": "linter.main.runtime.ts",
|
2988
|
-
"line":
|
2988
|
+
"line": 59,
|
2989
2989
|
"character": 5
|
2990
2990
|
},
|
2991
2991
|
"name": "config",
|
@@ -2993,7 +2993,7 @@
|
|
2993
2993
|
"__schema": "TypeRefSchema",
|
2994
2994
|
"location": {
|
2995
2995
|
"filePath": "linter.main.runtime.ts",
|
2996
|
-
"line":
|
2996
|
+
"line": 59,
|
2997
2997
|
"character": 13
|
2998
2998
|
},
|
2999
2999
|
"name": "LinterConfig"
|
@@ -3006,7 +3006,7 @@
|
|
3006
3006
|
"__schema": "InferenceTypeSchema",
|
3007
3007
|
"location": {
|
3008
3008
|
"filePath": "linter.main.runtime.ts",
|
3009
|
-
"line":
|
3009
|
+
"line": 57,
|
3010
3010
|
"character": 3
|
3011
3011
|
},
|
3012
3012
|
"type": "Promise<LinterMain>"
|
@@ -3026,7 +3026,7 @@
|
|
3026
3026
|
"__schema": "UnImplementedSchema",
|
3027
3027
|
"location": {
|
3028
3028
|
"filePath": "linter.main.runtime.ts",
|
3029
|
-
"line":
|
3029
|
+
"line": 72,
|
3030
3030
|
"character": 1
|
3031
3031
|
},
|
3032
3032
|
"name": "LinterAspect.addRuntime(LinterMain);",
|
@@ -4382,16 +4382,16 @@
|
|
4382
4382
|
"__schema": "ParameterSchema",
|
4383
4383
|
"location": {
|
4384
4384
|
"filePath": "lint.task.ts",
|
4385
|
-
"line":
|
4386
|
-
"character":
|
4385
|
+
"line": 10,
|
4386
|
+
"character": 5
|
4387
4387
|
},
|
4388
4388
|
"name": "aspectId",
|
4389
4389
|
"type": {
|
4390
4390
|
"__schema": "KeywordTypeSchema",
|
4391
4391
|
"location": {
|
4392
4392
|
"filePath": "lint.task.ts",
|
4393
|
-
"line":
|
4394
|
-
"character":
|
4393
|
+
"line": 10,
|
4394
|
+
"character": 24
|
4395
4395
|
},
|
4396
4396
|
"name": "string"
|
4397
4397
|
},
|
@@ -4402,16 +4402,16 @@
|
|
4402
4402
|
"__schema": "ParameterSchema",
|
4403
4403
|
"location": {
|
4404
4404
|
"filePath": "lint.task.ts",
|
4405
|
-
"line":
|
4406
|
-
"character":
|
4405
|
+
"line": 11,
|
4406
|
+
"character": 5
|
4407
4407
|
},
|
4408
4408
|
"name": "name",
|
4409
4409
|
"type": {
|
4410
4410
|
"__schema": "InferenceTypeSchema",
|
4411
4411
|
"location": {
|
4412
4412
|
"filePath": "lint.task.ts",
|
4413
|
-
"line":
|
4414
|
-
"character":
|
4413
|
+
"line": 11,
|
4414
|
+
"character": 5
|
4415
4415
|
},
|
4416
4416
|
"type": "string"
|
4417
4417
|
},
|
@@ -4435,7 +4435,7 @@
|
|
4435
4435
|
"__schema": "FunctionLikeSchema",
|
4436
4436
|
"location": {
|
4437
4437
|
"filePath": "lint.task.ts",
|
4438
|
-
"line":
|
4438
|
+
"line": 14,
|
4439
4439
|
"character": 3
|
4440
4440
|
},
|
4441
4441
|
"signature": "(method) LintTask.execute(context: BuildContext): Promise<BuiltTaskResult>",
|
@@ -4445,7 +4445,7 @@
|
|
4445
4445
|
"__schema": "ParameterSchema",
|
4446
4446
|
"location": {
|
4447
4447
|
"filePath": "lint.task.ts",
|
4448
|
-
"line":
|
4448
|
+
"line": 14,
|
4449
4449
|
"character": 17
|
4450
4450
|
},
|
4451
4451
|
"name": "context",
|
@@ -4453,7 +4453,7 @@
|
|
4453
4453
|
"__schema": "TypeRefSchema",
|
4454
4454
|
"location": {
|
4455
4455
|
"filePath": "lint.task.ts",
|
4456
|
-
"line":
|
4456
|
+
"line": 14,
|
4457
4457
|
"character": 26
|
4458
4458
|
},
|
4459
4459
|
"name": "BuildContext",
|
@@ -4470,7 +4470,7 @@
|
|
4470
4470
|
"__schema": "TypeRefSchema",
|
4471
4471
|
"location": {
|
4472
4472
|
"filePath": "lint.task.ts",
|
4473
|
-
"line":
|
4473
|
+
"line": 14,
|
4474
4474
|
"character": 41
|
4475
4475
|
},
|
4476
4476
|
"name": "Promise",
|
@@ -4479,7 +4479,7 @@
|
|
4479
4479
|
"__schema": "TypeRefSchema",
|
4480
4480
|
"location": {
|
4481
4481
|
"filePath": "lint.task.ts",
|
4482
|
-
"line":
|
4482
|
+
"line": 14,
|
4483
4483
|
"character": 49
|
4484
4484
|
},
|
4485
4485
|
"name": "BuiltTaskResult",
|
@@ -4518,7 +4518,7 @@
|
|
4518
4518
|
"_legacy": {
|
4519
4519
|
"scope": "teambit.defender",
|
4520
4520
|
"name": "linter",
|
4521
|
-
"version": "1.0.
|
4521
|
+
"version": "1.0.427"
|
4522
4522
|
},
|
4523
4523
|
"_scope": "teambit.defender"
|
4524
4524
|
}
|
@@ -4956,7 +4956,7 @@
|
|
4956
4956
|
"_legacy": {
|
4957
4957
|
"scope": "teambit.defender",
|
4958
4958
|
"name": "linter",
|
4959
|
-
"version": "1.0.
|
4959
|
+
"version": "1.0.427"
|
4960
4960
|
},
|
4961
4961
|
"_scope": "teambit.defender"
|
4962
4962
|
}
|
@@ -5167,7 +5167,7 @@
|
|
5167
5167
|
"componentId": {
|
5168
5168
|
"scope": "teambit.defender",
|
5169
5169
|
"name": "linter",
|
5170
|
-
"version": "1.0.
|
5170
|
+
"version": "1.0.427"
|
5171
5171
|
},
|
5172
5172
|
"taggedModuleExports": []
|
5173
5173
|
}
|
package/dist/lint.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_toolboxTime","data","require","_constants","_chalk","_interopRequireDefault","_lodash","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LintCmd","constructor","linter","componentHost","workspace","name","description","COMPONENT_PATTERN_HELP","report","pattern","linterOptions","code","json","lintResults","componentsIdsToLint","title","chalk","bold","cyan","length","toString","groupedByIsClean","groupBy","results","res","isClean","undefined","totalErrorCount","totalFatalErrorCount","totalWarningCount","dirtyComponentsOutputs","false","map","lintRes","compTitle","componentId","ignoreVersion","compOutput","output","join","cleanComponentsCount","true","cleanComponentsOutput","green","summary","getSummarySection","finalOutput","compact","duration","seconds","summaryTitle","totalFieldsMap","itemsDataField","componentsDataField","label","summaryTotals","item","renderTotalLine","filter","Boolean","componentsCount","itemsCount","fieldLabel","timer","Timer","create","start","componentsIds","getIdsToLint","changed","componentsToLint","getMany","opts","fix","fixTypes","fixType","split","linterResults","lint","jsonLinterResults","toJsonLintResults","timerResponse","stop","comp","id","idsByPattern","getNewAndModifiedIds","listIds","exports","totalFixableErrorCount","totalFixableWarningCount","totalComponentsWithErrorCount","totalComponentsWithFatalErrorCount","totalComponentsWithFixableErrorCount","totalComponentsWithFixableWarningCount","totalComponentsWithWarningCount","newResults","resultsWithoutComponent","result","assign","component","omit","flatten","errors"],"sources":["lint.cmd.ts"],"sourcesContent":["import { TimerResponse, Timer } from '@teambit/toolbox.time.timer';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentFactory, ComponentID } from '@teambit/component';\nimport chalk from 'chalk';\nimport { EnvsExecutionResult } from '@teambit/envs';\nimport { Workspace } from '@teambit/workspace';\nimport { compact, flatten, groupBy, omit } from 'lodash';\nimport { LinterMain } from './linter.main.runtime';\nimport { ComponentLintResult, LintResults } from './linter';\nimport { FixTypes, LinterOptions } from './linter-context';\n\nexport type LintCmdOptions = {\n changed?: boolean;\n fix?: boolean;\n fixType?: string;\n json?: boolean;\n};\n\n/**\n * 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\n */\nexport type JsonComponentLintResult = Omit<ComponentLintResult, 'component'> & {\n componentId: ComponentID;\n};\n\nexport type JsonLintDataResults = Omit<LintResults, 'results'> & { results: JsonComponentLintResult[] };\n/**\n * 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\n */\nexport type JsonLintResultsData = {\n duration: TimerResponse;\n lintResults: JsonLintDataResults;\n componentsIdsToLint: string[];\n};\n\nexport type JsonLintResults = {\n code: number;\n data: JsonLintResultsData;\n};\n\nexport class LintCmd implements Command {\n name = 'lint [component-pattern]';\n description = 'lint components in the development workspace';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n helpUrl = 'reference/linting/linter-overview';\n group = 'development';\n options = [\n ['c', 'changed', 'lint only new and modified components'],\n ['f', 'fix', 'automatically fix problems'],\n ['', 'fix-type <fixType>', 'specify the types of fixes to apply (problem, suggestion, layout)'],\n ['j', 'json', 'return the lint results in json format'],\n ] as CommandOptions;\n\n constructor(private linter: LinterMain, private componentHost: ComponentFactory, private workspace: Workspace) {}\n\n async report([pattern]: [string], linterOptions: LintCmdOptions) {\n const { code, data } = await this.json([pattern], linterOptions);\n const { lintResults, componentsIdsToLint } = data;\n const title = chalk.bold(\n `linting total of ${chalk.cyan(componentsIdsToLint.length.toString())} component(s) in workspace '${chalk.cyan(\n this.componentHost.name\n )}'`\n );\n\n const groupedByIsClean = groupBy(lintResults.results, (res) => {\n if (res.isClean !== undefined) {\n return res.isClean;\n }\n // The is clean field was added in a later version of the linter, so if it's not there, we will calculate it\n // based on the errors/warnings count\n return res.totalErrorCount + (res.totalFatalErrorCount || 0) + res.totalWarningCount === 0;\n });\n\n const dirtyComponentsOutputs = (groupedByIsClean.false || [])\n .map((lintRes) => {\n const compTitle = chalk.bold.cyan(lintRes.componentId.toString({ ignoreVersion: true }));\n const compOutput = lintRes.output;\n return `${compTitle}\\n${compOutput}`;\n })\n .join('\\n');\n\n const cleanComponentsCount = groupedByIsClean.true?.length || 0;\n const cleanComponentsOutput = cleanComponentsCount\n ? `total of ${chalk.green(cleanComponentsCount.toString())} component(s) has no linting issues`\n : '';\n\n const summary = this.getSummarySection(data);\n const finalOutput = compact([title, dirtyComponentsOutputs, cleanComponentsOutput, summary]).join('\\n\\n');\n return { code, data: finalOutput };\n }\n\n private getSummarySection(data: JsonLintResultsData) {\n const { duration, lintResults, componentsIdsToLint } = data;\n const { seconds } = duration;\n const summaryTitle = `linted ${chalk.cyan(componentsIdsToLint.length.toString())} components in ${chalk.cyan(\n seconds.toString()\n )} seconds`;\n\n const totalFieldsMap = [\n { itemsDataField: 'totalErrorCount', componentsDataField: 'totalComponentsWithErrorCount', label: 'Errors' },\n {\n itemsDataField: 'totalFatalErrorCount',\n componentsDataField: 'totalComponentsWithFatalErrorCount',\n label: 'FatalErrors',\n },\n {\n itemsDataField: 'totalFixableErrorCount',\n componentsDataField: 'totalComponentsWithFixableErrorCount',\n label: 'FixableErrors',\n },\n {\n itemsDataField: 'totalFixableWarningCount',\n componentsDataField: 'totalComponentsWithFixableWarningCount',\n label: 'FixableWarnings',\n },\n {\n itemsDataField: 'totalWarningCount',\n componentsDataField: 'totalComponentsWithWarningCount',\n label: 'Warnings',\n },\n ];\n\n const summaryTotals = totalFieldsMap\n .map((item) =>\n this.renderTotalLine(lintResults[item.componentsDataField], lintResults[item.itemsDataField], item.label)\n )\n .filter(Boolean)\n .join('\\n');\n const summary = `${summaryTitle}\\n${summaryTotals}`;\n return summary;\n }\n\n private renderTotalLine(componentsCount: number, itemsCount: number, fieldLabel: string): string | undefined {\n if (itemsCount === 0) return undefined;\n return `total of ${chalk.green(itemsCount.toString())} ${chalk.cyan(fieldLabel)} (from ${chalk.green(\n componentsCount.toString()\n )} components)`;\n }\n\n async json([pattern]: [string], linterOptions: LintCmdOptions): Promise<JsonLintResults> {\n const timer = Timer.create();\n timer.start();\n const componentsIds = await this.getIdsToLint(pattern, linterOptions.changed);\n const componentsToLint = await this.workspace.getMany(componentsIds);\n const opts: LinterOptions = {\n fix: linterOptions.fix,\n fixTypes: linterOptions.fixType ? (linterOptions.fixType.split(',') as FixTypes) : undefined,\n };\n const linterResults = await this.linter.lint(componentsToLint, opts);\n const jsonLinterResults = toJsonLintResults(linterResults);\n const timerResponse = timer.stop();\n let code = 0;\n if (jsonLinterResults.totalErrorCount || jsonLinterResults.totalFatalErrorCount) {\n code = 1;\n }\n return {\n code,\n data: {\n duration: timerResponse,\n lintResults: jsonLinterResults,\n componentsIdsToLint: componentsToLint.map((comp) => comp.id.toString()),\n },\n };\n }\n\n private async getIdsToLint(pattern: string, changed = false): Promise<ComponentID[]> {\n if (pattern) {\n return this.workspace.idsByPattern(pattern);\n }\n if (changed) {\n return this.workspace.getNewAndModifiedIds();\n }\n return this.componentHost.listIds();\n }\n}\n\nfunction toJsonLintResults(results: EnvsExecutionResult<LintResults>): JsonLintDataResults {\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 const newResults = results.results.map((res) => {\n const resultsWithoutComponent = res.data?.results.map((result) => {\n return Object.assign({}, { componentId: result.component.id }, omit(result, ['component']));\n });\n\n if (res.data) {\n if (res.data.totalErrorCount) {\n totalErrorCount += res.data.totalErrorCount;\n totalComponentsWithErrorCount += res.data.totalComponentsWithErrorCount ?? 0;\n }\n if (res.data.totalFatalErrorCount) {\n totalFatalErrorCount += res.data.totalFatalErrorCount;\n totalComponentsWithFatalErrorCount += res.data.totalComponentsWithFatalErrorCount ?? 0;\n }\n if (res.data.totalFixableErrorCount) {\n totalFixableErrorCount += res.data.totalFixableErrorCount;\n totalComponentsWithFixableErrorCount += res.data.totalComponentsWithFixableErrorCount ?? 0;\n }\n if (res.data.totalFixableWarningCount) {\n totalFixableWarningCount += res.data.totalFixableWarningCount;\n totalComponentsWithFixableWarningCount += res.data.totalComponentsWithFixableWarningCount ?? 0;\n }\n if (res.data.totalWarningCount) {\n totalWarningCount += res.data.totalWarningCount;\n totalComponentsWithWarningCount += res.data.totalComponentsWithWarningCount ?? 0;\n }\n }\n\n return compact(resultsWithoutComponent);\n });\n\n const isClean =\n totalComponentsWithErrorCount === 0 &&\n totalComponentsWithWarningCount === 0 &&\n totalComponentsWithFatalErrorCount === 0;\n\n return {\n results: compact(flatten(newResults)),\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n isClean,\n errors: results?.errors,\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAA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H,wBAAwB;QAC7DI,sCAAsC,IAAItE,GAAG,CAACnD,IAAI,CAACyH,sCAAsC,IAAI,CAAC;MAChG;MACA,IAAItE,GAAG,CAACnD,IAAI,CAACwD,iBAAiB,EAAE;QAC9BA,iBAAiB,IAAIL,GAAG,CAACnD,IAAI,CAACwD,iBAAiB;QAC/CkE,+BAA+B,IAAIvE,GAAG,CAACnD,IAAI,CAAC0H,+BAA+B,IAAI,CAAC;MAClF;IACF;IAEA,OAAO,IAAAhD,iBAAO,EAACkD,uBAAuB,CAAC;EACzC,CAAC,CAAC;EAEF,MAAMxE,OAAO,GACXkE,6BAA6B,KAAK,CAAC,IACnCI,+BAA+B,KAAK,CAAC,IACrCH,kCAAkC,KAAK,CAAC;EAE1C,OAAO;IACLrE,OAAO,EAAE,IAAAwB,iBAAO,EAAC,IAAAuD,iBAAO,EAACN,UAAU,CAAC,CAAC;IACrCrE,eAAe;IACfC,oBAAoB;IACpB6D,sBAAsB;IACtBC,wBAAwB;IACxB7D,iBAAiB;IACjB8D,6BAA6B;IAC7BC,kCAAkC;IAClCC,oCAAoC;IACpCC,sCAAsC;IACtCC,+BAA+B;IAC/BtE,OAAO;IACP8E,MAAM,EAAEhF,OAAO,EAAEgF;EACnB,CAAC;AACH","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_toolboxTime","data","require","_constants","_chalk","_interopRequireDefault","_lodash","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LintCmd","constructor","linter","componentHost","workspace","name","description","COMPONENT_PATTERN_HELP","report","pattern","linterOptions","code","json","lintResults","componentsIdsToLint","title","chalk","bold","cyan","length","toString","groupedByIsClean","groupBy","results","res","isClean","undefined","totalErrorCount","totalFatalErrorCount","totalWarningCount","dirtyComponentsOutputs","false","map","lintRes","compTitle","componentId","ignoreVersion","compOutput","output","join","cleanComponentsCount","true","cleanComponentsOutput","green","summary","getSummarySection","finalOutput","compact","duration","seconds","summaryTitle","totalFieldsMap","itemsDataField","componentsDataField","label","summaryTotals","item","renderTotalLine","filter","Boolean","componentsCount","itemsCount","fieldLabel","timer","Timer","create","start","componentsIds","getIdsToLint","changed","componentsToLint","getMany","opts","fix","fixTypes","fixType","split","linterResults","lint","jsonLinterResults","toJsonLintResults","timerResponse","stop","comp","id","idsByPattern","getNewAndModifiedIds","listIds","exports","totalFixableErrorCount","totalFixableWarningCount","totalComponentsWithErrorCount","totalComponentsWithFatalErrorCount","totalComponentsWithFixableErrorCount","totalComponentsWithFixableWarningCount","totalComponentsWithWarningCount","newResults","resultsWithoutComponent","result","assign","component","omit","flatten","errors"],"sources":["lint.cmd.ts"],"sourcesContent":["import { TimerResponse, Timer } from '@teambit/toolbox.time.timer';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentFactory, ComponentID } from '@teambit/component';\nimport chalk from 'chalk';\nimport { EnvsExecutionResult } from '@teambit/envs';\nimport { Workspace } from '@teambit/workspace';\nimport { compact, flatten, groupBy, omit } from 'lodash';\nimport { LinterMain } from './linter.main.runtime';\nimport { ComponentLintResult, LintResults } from './linter';\nimport { FixTypes, LinterOptions } from './linter-context';\n\nexport type LintCmdOptions = {\n changed?: boolean;\n fix?: boolean;\n fixType?: string;\n json?: boolean;\n};\n\n/**\n * 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\n */\nexport type JsonComponentLintResult = Omit<ComponentLintResult, 'component'> & {\n componentId: ComponentID;\n};\n\nexport type JsonLintDataResults = Omit<LintResults, 'results'> & { results: JsonComponentLintResult[] };\n/**\n * 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\n */\nexport type JsonLintResultsData = {\n duration: TimerResponse;\n lintResults: JsonLintDataResults;\n componentsIdsToLint: string[];\n};\n\nexport type JsonLintResults = {\n code: number;\n data: JsonLintResultsData;\n};\n\nexport class LintCmd implements Command {\n name = 'lint [component-pattern]';\n description = 'lint components in the development workspace';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n helpUrl = 'reference/linting/linter-overview';\n group = 'development';\n options = [\n ['c', 'changed', 'lint only new and modified components'],\n ['f', 'fix', 'automatically fix problems'],\n ['', 'fix-type <fixType>', 'specify the types of fixes to apply (problem, suggestion, layout)'],\n ['j', 'json', 'return the lint results in json format'],\n ] as CommandOptions;\n\n constructor(\n private linter: LinterMain,\n private componentHost: ComponentFactory,\n private workspace: Workspace\n ) {}\n\n async report([pattern]: [string], linterOptions: LintCmdOptions) {\n const { code, data } = await this.json([pattern], linterOptions);\n const { lintResults, componentsIdsToLint } = data;\n const title = chalk.bold(\n `linting total of ${chalk.cyan(componentsIdsToLint.length.toString())} component(s) in workspace '${chalk.cyan(\n this.componentHost.name\n )}'`\n );\n\n const groupedByIsClean = groupBy(lintResults.results, (res) => {\n if (res.isClean !== undefined) {\n return res.isClean;\n }\n // The is clean field was added in a later version of the linter, so if it's not there, we will calculate it\n // based on the errors/warnings count\n return res.totalErrorCount + (res.totalFatalErrorCount || 0) + res.totalWarningCount === 0;\n });\n\n const dirtyComponentsOutputs = (groupedByIsClean.false || [])\n .map((lintRes) => {\n const compTitle = chalk.bold.cyan(lintRes.componentId.toString({ ignoreVersion: true }));\n const compOutput = lintRes.output;\n return `${compTitle}\\n${compOutput}`;\n })\n .join('\\n');\n\n const cleanComponentsCount = groupedByIsClean.true?.length || 0;\n const cleanComponentsOutput = cleanComponentsCount\n ? `total of ${chalk.green(cleanComponentsCount.toString())} component(s) has no linting issues`\n : '';\n\n const summary = this.getSummarySection(data);\n const finalOutput = compact([title, dirtyComponentsOutputs, cleanComponentsOutput, summary]).join('\\n\\n');\n return { code, data: finalOutput };\n }\n\n private getSummarySection(data: JsonLintResultsData) {\n const { duration, lintResults, componentsIdsToLint } = data;\n const { seconds } = duration;\n const summaryTitle = `linted ${chalk.cyan(componentsIdsToLint.length.toString())} components in ${chalk.cyan(\n seconds.toString()\n )} seconds`;\n\n const totalFieldsMap = [\n { itemsDataField: 'totalErrorCount', componentsDataField: 'totalComponentsWithErrorCount', label: 'Errors' },\n {\n itemsDataField: 'totalFatalErrorCount',\n componentsDataField: 'totalComponentsWithFatalErrorCount',\n label: 'FatalErrors',\n },\n {\n itemsDataField: 'totalFixableErrorCount',\n componentsDataField: 'totalComponentsWithFixableErrorCount',\n label: 'FixableErrors',\n },\n {\n itemsDataField: 'totalFixableWarningCount',\n componentsDataField: 'totalComponentsWithFixableWarningCount',\n label: 'FixableWarnings',\n },\n {\n itemsDataField: 'totalWarningCount',\n componentsDataField: 'totalComponentsWithWarningCount',\n label: 'Warnings',\n },\n ];\n\n const summaryTotals = totalFieldsMap\n .map((item) =>\n this.renderTotalLine(lintResults[item.componentsDataField], lintResults[item.itemsDataField], item.label)\n )\n .filter(Boolean)\n .join('\\n');\n const summary = `${summaryTitle}\\n${summaryTotals}`;\n return summary;\n }\n\n private renderTotalLine(componentsCount: number, itemsCount: number, fieldLabel: string): string | undefined {\n if (itemsCount === 0) return undefined;\n return `total of ${chalk.green(itemsCount.toString())} ${chalk.cyan(fieldLabel)} (from ${chalk.green(\n componentsCount.toString()\n )} components)`;\n }\n\n async json([pattern]: [string], linterOptions: LintCmdOptions): Promise<JsonLintResults> {\n const timer = Timer.create();\n timer.start();\n const componentsIds = await this.getIdsToLint(pattern, linterOptions.changed);\n const componentsToLint = await this.workspace.getMany(componentsIds);\n const opts: LinterOptions = {\n fix: linterOptions.fix,\n fixTypes: linterOptions.fixType ? (linterOptions.fixType.split(',') as FixTypes) : undefined,\n };\n const linterResults = await this.linter.lint(componentsToLint, opts);\n const jsonLinterResults = toJsonLintResults(linterResults);\n const timerResponse = timer.stop();\n let code = 0;\n if (jsonLinterResults.totalErrorCount || jsonLinterResults.totalFatalErrorCount) {\n code = 1;\n }\n return {\n code,\n data: {\n duration: timerResponse,\n lintResults: jsonLinterResults,\n componentsIdsToLint: componentsToLint.map((comp) => comp.id.toString()),\n },\n };\n }\n\n private async getIdsToLint(pattern: string, changed = false): Promise<ComponentID[]> {\n if (pattern) {\n return this.workspace.idsByPattern(pattern);\n }\n if (changed) {\n return this.workspace.getNewAndModifiedIds();\n }\n return this.componentHost.listIds();\n }\n}\n\nfunction toJsonLintResults(results: EnvsExecutionResult<LintResults>): JsonLintDataResults {\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 const newResults = results.results.map((res) => {\n const resultsWithoutComponent = res.data?.results.map((result) => {\n return Object.assign({}, { componentId: result.component.id }, omit(result, ['component']));\n });\n\n if (res.data) {\n if (res.data.totalErrorCount) {\n totalErrorCount += res.data.totalErrorCount;\n totalComponentsWithErrorCount += res.data.totalComponentsWithErrorCount ?? 0;\n }\n if (res.data.totalFatalErrorCount) {\n totalFatalErrorCount += res.data.totalFatalErrorCount;\n totalComponentsWithFatalErrorCount += res.data.totalComponentsWithFatalErrorCount ?? 0;\n }\n if (res.data.totalFixableErrorCount) {\n totalFixableErrorCount += res.data.totalFixableErrorCount;\n totalComponentsWithFixableErrorCount += res.data.totalComponentsWithFixableErrorCount ?? 0;\n }\n if (res.data.totalFixableWarningCount) {\n totalFixableWarningCount += res.data.totalFixableWarningCount;\n totalComponentsWithFixableWarningCount += res.data.totalComponentsWithFixableWarningCount ?? 0;\n }\n if (res.data.totalWarningCount) {\n totalWarningCount += res.data.totalWarningCount;\n totalComponentsWithWarningCount += res.data.totalComponentsWithWarningCount ?? 0;\n }\n }\n\n return compact(resultsWithoutComponent);\n });\n\n const isClean =\n totalComponentsWithErrorCount === 0 &&\n totalComponentsWithWarningCount === 0 &&\n totalComponentsWithFatalErrorCount === 0;\n\n return {\n results: compact(flatten(newResults)),\n totalErrorCount,\n totalFatalErrorCount,\n totalFixableErrorCount,\n totalFixableWarningCount,\n totalWarningCount,\n totalComponentsWithErrorCount,\n totalComponentsWithFatalErrorCount,\n totalComponentsWithFixableErrorCount,\n totalComponentsWithFixableWarningCount,\n totalComponentsWithWarningCount,\n isClean,\n errors: results?.errors,\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAA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AAIL,GAAG,CAACnD,IAAI,CAACwD,iBAAiB;QAC/CkE,+BAA+B,IAAIvE,GAAG,CAACnD,IAAI,CAAC0H,+BAA+B,IAAI,CAAC;MAClF;IACF;IAEA,OAAO,IAAAhD,iBAAO,EAACkD,uBAAuB,CAAC;EACzC,CAAC,CAAC;EAEF,MAAMxE,OAAO,GACXkE,6BAA6B,KAAK,CAAC,IACnCI,+BAA+B,KAAK,CAAC,IACrCH,kCAAkC,KAAK,CAAC;EAE1C,OAAO;IACLrE,OAAO,EAAE,IAAAwB,iBAAO,EAAC,IAAAuD,iBAAO,EAACN,UAAU,CAAC,CAAC;IACrCrE,eAAe;IACfC,oBAAoB;IACpB6D,sBAAsB;IACtBC,wBAAwB;IACxB7D,iBAAiB;IACjB8D,6BAA6B;IAC7BC,kCAAkC;IAClCC,oCAAoC;IACpCC,sCAAsC;IACtCC,+BAA+B;IAC/BtE,OAAO;IACP8E,MAAM,EAAEhF,OAAO,EAAEgF;EACnB,CAAC;AACH","ignoreList":[]}
|
package/dist/lint.task.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_path","data","_interopRequireDefault","require","_component","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LintTask","constructor","aspectId","name","execute","context","linter","env","getLinter","rootDir","capsuleNetwork","capsulesRootDir","componentsDirMap","getComponentsDirectory","originalSeedersCapsules","linterContext","results","lint","componentsResults","map","lintResult","component","metadata","output","errors","capsuleRootDir","capsuleList","ComponentMap","as","getAllComponents","fullPath","getCapsule","id","path","relativePath","relative","exports"],"sources":["lint.task.ts"],"sourcesContent":["import path from 'path';\nimport { BuildTask, BuiltTaskResult, BuildContext, ComponentResult } from '@teambit/builder';\nimport { ComponentMap } from '@teambit/component';\nimport { CapsuleList } from '@teambit/isolator';\nimport { Linter } from './linter';\nimport { LinterContext } from './linter-context';\n\nexport class LintTask implements BuildTask {\n constructor(readonly aspectId: string
|
1
|
+
{"version":3,"names":["_path","data","_interopRequireDefault","require","_component","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LintTask","constructor","aspectId","name","execute","context","linter","env","getLinter","rootDir","capsuleNetwork","capsulesRootDir","componentsDirMap","getComponentsDirectory","originalSeedersCapsules","linterContext","results","lint","componentsResults","map","lintResult","component","metadata","output","errors","capsuleRootDir","capsuleList","ComponentMap","as","getAllComponents","fullPath","getCapsule","id","path","relativePath","relative","exports"],"sources":["lint.task.ts"],"sourcesContent":["import path from 'path';\nimport { BuildTask, BuiltTaskResult, BuildContext, ComponentResult } from '@teambit/builder';\nimport { ComponentMap } from '@teambit/component';\nimport { CapsuleList } from '@teambit/isolator';\nimport { Linter } from './linter';\nimport { LinterContext } from './linter-context';\n\nexport class LintTask implements BuildTask {\n constructor(\n readonly aspectId: string,\n readonly name = 'lint'\n ) {}\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const linter: Linter = context.env.getLinter();\n const rootDir = context.capsuleNetwork.capsulesRootDir;\n const componentsDirMap = this.getComponentsDirectory(rootDir, context.capsuleNetwork.originalSeedersCapsules);\n\n // @ts-ignore TODO: fix this\n const linterContext: LinterContext = {\n rootDir,\n componentsDirMap,\n ...context,\n };\n const results = await linter.lint(linterContext);\n const componentsResults = results.results.map((lintResult): ComponentResult => {\n return {\n component: lintResult.component,\n metadata: {\n output: lintResult.output,\n results: lintResult.results,\n },\n errors: [],\n };\n });\n\n return {\n componentsResults,\n };\n }\n\n private getComponentsDirectory(capsuleRootDir: string, capsuleList: CapsuleList): ComponentMap<string> {\n return ComponentMap.as<string>(capsuleList.getAllComponents(), (component) => {\n const fullPath = capsuleList.getCapsule(component.id)?.path || '';\n const relativePath = path.relative(capsuleRootDir, fullPath);\n return relativePath;\n });\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAX,CAAA,EAAAI,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAf,CAAA,aAAAI,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAD,OAAA,CAAAG,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAnB,CAAA,EAAAI,CAAA,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AAOA,CAACC,OAAqB,EAA4B;IAC7D,MAAMC,MAAc,GAAGD,OAAO,CAACE,GAAG,CAACC,SAAS,CAAC,CAAC;IAC9C,MAAMC,OAAO,GAAGJ,OAAO,CAACK,cAAc,CAACC,eAAe;IACtD,MAAMC,gBAAgB,GAAG,IAAI,CAACC,sBAAsB,CAACJ,OAAO,EAAEJ,OAAO,CAACK,cAAc,CAACI,uBAAuB,CAAC;;IAE7G;IACA,MAAMC,aAA4B,GAAAnC,aAAA;MAChC6B,OAAO;MACPG;IAAgB,GACbP,OAAO,CACX;IACD,MAAMW,OAAO,GAAG,MAAMV,MAAM,CAACW,IAAI,CAACF,aAAa,CAAC;IAChD,MAAMG,iBAAiB,GAAGF,OAAO,CAACA,OAAO,CAACG,GAAG,CAAEC,UAAU,IAAsB;MAC7E,OAAO;QACLC,SAAS,EAAED,UAAU,CAACC,SAAS;QAC/BC,QAAQ,EAAE;UACRC,MAAM,EAAEH,UAAU,CAACG,MAAM;UACzBP,OAAO,EAAEI,UAAU,CAACJ;QACtB,CAAC;QACDQ,MAAM,EAAE;MACV,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;MACLN;IACF,CAAC;EACH;EAEQL,sBAAsBA,CAACY,cAAsB,EAAEC,WAAwB,EAAwB;IACrG,OAAOC,yBAAY,CAACC,EAAE,CAASF,WAAW,CAACG,gBAAgB,CAAC,CAAC,EAAGR,SAAS,IAAK;MAC5E,MAAMS,QAAQ,GAAGJ,WAAW,CAACK,UAAU,CAACV,SAAS,CAACW,EAAE,CAAC,EAAEC,IAAI,IAAI,EAAE;MACjE,MAAMC,YAAY,GAAGD,eAAI,CAACE,QAAQ,CAACV,cAAc,EAAEK,QAAQ,CAAC;MAC5D,OAAOI,YAAY;IACrB,CAAC,CAAC;EACJ;AACF;AAACE,OAAA,CAAApC,QAAA,GAAAA,QAAA","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_component","_envs","_logger","_workspace","_linter","_linter2","_lint","_lint2","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LinterMain","constructor","envs","linterService","lint","components","opts","envsRuntime","createEnvironment","lintResults","run","getLinter","context","options","createTask","name","LintTask","LinterAspect","id","provider","cli","component","loggerAspect","workspace","config","logger","createLogger","LinterService","linterAspect","registerService","register","LintCmd","getHost","exports","MainRuntime","EnvsAspect","CLIAspect","ComponentAspect","LoggerAspect","WorkspaceAspect","extensionFormats","fixTypes","addRuntime"],"sources":["linter.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Component, ComponentAspect, ComponentMain } from '@teambit/component';\nimport { EnvsAspect, EnvsMain, ExecutionContext } from '@teambit/envs';\nimport { LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { LinterAspect } from './linter.aspect';\nimport { LinterService } from './linter.service';\nimport { LintTask } from './lint.task';\nimport { LintCmd } from './lint.cmd';\nimport { FixTypes, LinterOptions } from './linter-context';\nimport { Linter } from './linter';\n\nexport type LinterConfig = {\n /**\n * extension formats to lint.\n */\n extensionFormats: string[];\n fixTypes?: FixTypes;\n};\n\nexport class LinterMain {\n static runtime = MainRuntime;\n\n constructor(private envs: EnvsMain
|
1
|
+
{"version":3,"names":["_cli","data","require","_component","_envs","_logger","_workspace","_linter","_linter2","_lint","_lint2","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LinterMain","constructor","envs","linterService","lint","components","opts","envsRuntime","createEnvironment","lintResults","run","getLinter","context","options","createTask","name","LintTask","LinterAspect","id","provider","cli","component","loggerAspect","workspace","config","logger","createLogger","LinterService","linterAspect","registerService","register","LintCmd","getHost","exports","MainRuntime","EnvsAspect","CLIAspect","ComponentAspect","LoggerAspect","WorkspaceAspect","extensionFormats","fixTypes","addRuntime"],"sources":["linter.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Component, ComponentAspect, ComponentMain } from '@teambit/component';\nimport { EnvsAspect, EnvsMain, ExecutionContext } from '@teambit/envs';\nimport { LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { LinterAspect } from './linter.aspect';\nimport { LinterService } from './linter.service';\nimport { LintTask } from './lint.task';\nimport { LintCmd } from './lint.cmd';\nimport { FixTypes, LinterOptions } from './linter-context';\nimport { Linter } from './linter';\n\nexport type LinterConfig = {\n /**\n * extension formats to lint.\n */\n extensionFormats: string[];\n fixTypes?: FixTypes;\n};\n\nexport class LinterMain {\n static runtime = MainRuntime;\n\n constructor(\n private envs: EnvsMain,\n private linterService: LinterService\n ) {}\n\n /**\n * lint an array of components.\n */\n async lint(components: Component[], opts: LinterOptions) {\n const envsRuntime = await this.envs.createEnvironment(components);\n const lintResults = envsRuntime.run(this.linterService, opts);\n return lintResults;\n }\n\n getLinter(context: ExecutionContext, options: LinterOptions): Linter {\n return this.linterService.getLinter(context, options);\n }\n\n /**\n * create a lint task for build pipelines.\n * @param name name of the task.\n */\n createTask(name?: string): LintTask {\n return new LintTask(LinterAspect.id, name);\n }\n\n static dependencies = [EnvsAspect, CLIAspect, ComponentAspect, LoggerAspect, WorkspaceAspect];\n\n static defaultConfig: LinterConfig = {\n extensionFormats: ['.ts', '.tsx', '.js', '.jsx', '.mjs'],\n fixTypes: ['layout', 'problem', 'suggestion'],\n };\n\n static async provider(\n [envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace],\n config: LinterConfig\n ) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const logger = loggerAspect.createLogger(LinterAspect.id);\n const linterService = new LinterService(config, workspace);\n const linterAspect = new LinterMain(envs, linterService);\n envs.registerService(linterService);\n cli.register(new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odash","_cliHighlight","_component","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LinterService","constructor","linterConfig","workspace","run","context","options","mergedOpts","optionsWithDefaults","linterContext","mergeContext","linter","getLinter","results","lint","env","defaults","componentsDirMap","components","getComponentsDirectory","ComponentMap","create","assign","rootDir","path","quiet","extensionFormats","fixTypes","fix","as","component","componentDir","id","undefined","relative","render","descriptor","getDescriptor","name","chalk","green","displayName","version","configLabel","configObj","config","highlight","language","ignoreIllegals","transform","icon","displayConfig","exports"],"sources":["linter.service.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { defaults } from 'lodash';\nimport { EnvService, ExecutionContext, EnvDefinition, ServiceTransformationMap, EnvContext, Env } from '@teambit/envs';\nimport { Workspace } from '@teambit/workspace';\nimport highlight from 'cli-highlight';\nimport { Component, ComponentMap } from '@teambit/component';\nimport { Linter, LintResults } from './linter';\nimport { LinterContext, LinterOptions } from './linter-context';\nimport { LinterConfig } from './linter.main.runtime';\n\ntype LinterTransformationMap = ServiceTransformationMap & {\n getLinter: () => Linter;\n};\n\nexport class LinterService implements EnvService<LintResults> {\n name = 'linter';\n\n constructor(private linterConfig: LinterConfig
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_cliHighlight","_component","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LinterService","constructor","linterConfig","workspace","run","context","options","mergedOpts","optionsWithDefaults","linterContext","mergeContext","linter","getLinter","results","lint","env","defaults","componentsDirMap","components","getComponentsDirectory","ComponentMap","create","assign","rootDir","path","quiet","extensionFormats","fixTypes","fix","as","component","componentDir","id","undefined","relative","render","descriptor","getDescriptor","name","chalk","green","displayName","version","configLabel","configObj","config","highlight","language","ignoreIllegals","transform","icon","displayConfig","exports"],"sources":["linter.service.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { defaults } from 'lodash';\nimport { EnvService, ExecutionContext, EnvDefinition, ServiceTransformationMap, EnvContext, Env } from '@teambit/envs';\nimport { Workspace } from '@teambit/workspace';\nimport highlight from 'cli-highlight';\nimport { Component, ComponentMap } from '@teambit/component';\nimport { Linter, LintResults } from './linter';\nimport { LinterContext, LinterOptions } from './linter-context';\nimport { LinterConfig } from './linter.main.runtime';\n\ntype LinterTransformationMap = ServiceTransformationMap & {\n getLinter: () => Linter;\n};\n\nexport class LinterService implements EnvService<LintResults> {\n name = 'linter';\n\n constructor(\n private linterConfig: LinterConfig,\n private workspace: Workspace\n ) {}\n\n async run(context: ExecutionContext, options: LinterOptions): Promise<LintResults> {\n const mergedOpts = this.optionsWithDefaults(options);\n const linterContext = this.mergeContext(mergedOpts, context);\n const linter: Linter = this.getLinter(context, options);\n\n const results = await linter.lint(linterContext);\n return results;\n }\n\n getLinter(context: ExecutionContext, options: LinterOptions): Linter {\n const mergedOpts = this.optionsWithDefaults(options);\n const linterContext = this.mergeContext(mergedOpts, context);\n const linter: Linter = context.env.getLinter(linterContext);\n return linter;\n }\n\n private optionsWithDefaults(options: LinterOptions): LinterOptions {\n return defaults(options, this.linterConfig);\n }\n\n private mergeContext(options: LinterOptions, context?: ExecutionContext): LinterContext {\n const componentsDirMap = context?.components\n ? this.getComponentsDirectory(context.components)\n : ComponentMap.create<string>([]);\n const linterContext: LinterContext = Object.assign(\n {},\n {\n rootDir: this.workspace?.path,\n quiet: false,\n extensionFormats: options.extensionFormats,\n fixTypes: options.fixTypes,\n fix: options.fix,\n componentsDirMap,\n },\n context\n );\n return linterContext;\n }\n\n private getComponentsDirectory(components: Component[]): ComponentMap<string> {\n return ComponentMap.as<string>(components, (component) =>\n this.workspace.componentDir(component.id, undefined, { relative: true })\n );\n }\n\n render(env: EnvDefinition) {\n const descriptor = this.getDescriptor(env);\n const name = `${chalk.green('configured linter:')} ${descriptor?.id} (${descriptor?.displayName} @ ${\n descriptor?.version\n })`;\n const configLabel = chalk.green('linter config:');\n const configObj = descriptor?.config\n ? highlight(descriptor?.config, { language: 'json', ignoreIllegals: true })\n : '';\n return `${name}\\n${configLabel}\\n${configObj}`;\n }\n\n transform(env: Env, context: EnvContext): LinterTransformationMap | undefined {\n // Old env\n if (!env?.linter) return undefined;\n return {\n getLinter: () => env.linter()(context),\n };\n }\n\n getDescriptor(env: EnvDefinition) {\n if (!env.env.getLinter) return undefined;\n const mergedOpts = this.optionsWithDefaults({});\n const linterContext = this.mergeContext(mergedOpts);\n const linter = env.env.getLinter(linterContext);\n\n return {\n id: linter.id,\n icon: linter.icon,\n config: linter.displayConfig ? linter.displayConfig() : undefined,\n version: linter.version ? linter.version() : '?',\n displayName: linter.displayName ? linter.displayName : '?',\n };\n }\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;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6D,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAA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M,CAAC+B,OAAO,CAAC,CAAC,GAAG,GAAG;MAChDD,WAAW,EAAE9B,MAAM,CAAC8B,WAAW,GAAG9B,MAAM,CAAC8B,WAAW,GAAG;IACzD,CAAC;EACH;AACF;AAACW,OAAA,CAAApD,aAAA,GAAAA,aAAA","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_linter@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_linter@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_linter@1.0.427/dist/linter.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_linter@1.0.427/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.427",
|
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.427"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -14,14 +14,14 @@
|
|
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.
|
17
|
+
"@teambit/cli": "0.0.1004",
|
18
|
+
"@teambit/component": "1.0.427",
|
19
|
+
"@teambit/envs": "1.0.427",
|
20
20
|
"@teambit/toolbox.time.timer": "0.0.1",
|
21
|
-
"@teambit/workspace": "1.0.
|
22
|
-
"@teambit/builder": "1.0.
|
23
|
-
"@teambit/isolator": "1.0.
|
24
|
-
"@teambit/logger": "0.0.
|
21
|
+
"@teambit/workspace": "1.0.427",
|
22
|
+
"@teambit/builder": "1.0.427",
|
23
|
+
"@teambit/isolator": "1.0.427",
|
24
|
+
"@teambit/logger": "0.0.1097"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@types/lodash": "4.14.165",
|