@teambit/linter 1.0.409 → 1.0.411
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.
@@ -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.411" 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={8138:(e,n,t)=>{Object.defineProperty(n,"Ay",{enumerable:!0,get:function(){return r.default}});var r=o(t(44409));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}},44409:(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(41594));var o=t(5016),i=t(65682),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},
|
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={8138:(e,n,t)=>{Object.defineProperty(n,"Ay",{enumerable:!0,get:function(){return r.default}});var r=o(t(44409));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}},44409:(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(41594));var o=t(5016),i=t(65682),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},59405:(e,n,t)=>{var r={id:"teambit.defender/linter@1.0.411",homepage:"https://bit.cloud/teambit/defender/linter",exported:!0};function o(){const e=i(t(41594));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},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React},65682: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(59405),a=(t(41594),t(5016)),p=t(65682),l=t(8138),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
@@ -20,6 +20,7 @@
|
|
20
20
|
"line": 3,
|
21
21
|
"character": 10
|
22
22
|
},
|
23
|
+
"signature": "const LinterAspect: Aspect",
|
23
24
|
"name": "LinterAspect",
|
24
25
|
"exportNode": {
|
25
26
|
"__schema": "VariableLikeSchema",
|
@@ -55,6 +56,7 @@
|
|
55
56
|
"line": 4,
|
56
57
|
"character": 15
|
57
58
|
},
|
59
|
+
"signature": "class LinterMain",
|
58
60
|
"name": "LinterMain",
|
59
61
|
"exportNode": {
|
60
62
|
"__schema": "ClassSchema",
|
@@ -524,6 +526,7 @@
|
|
524
526
|
"line": 4,
|
525
527
|
"character": 27
|
526
528
|
},
|
529
|
+
"signature": "type LinterConfig = {\n extensionFormats: string[];\n fixTypes?: FixTypes | undefined;\n}",
|
527
530
|
"name": "LinterConfig",
|
528
531
|
"exportNode": {
|
529
532
|
"__schema": "TypeSchema",
|
@@ -612,6 +615,7 @@
|
|
612
615
|
"line": 5,
|
613
616
|
"character": 15
|
614
617
|
},
|
618
|
+
"signature": "type LintResults = {\n results: ComponentLintResult[];\n totalErrorCount: number;\n totalFatalErrorCount?: number | undefined;\n totalFixableErrorCount?: number | undefined;\n totalFixableWarningCount?: number | undefined;\n totalWarningCount: number;\n ... 6 more ...;\n errors: Error[];\n}",
|
615
619
|
"name": "LintResults",
|
616
620
|
"exportNode": {
|
617
621
|
"__schema": "TypeSchema",
|
@@ -983,6 +987,7 @@
|
|
983
987
|
"line": 5,
|
984
988
|
"character": 28
|
985
989
|
},
|
990
|
+
"signature": "interface Linter",
|
986
991
|
"name": "Linter",
|
987
992
|
"exportNode": {
|
988
993
|
"__schema": "InterfaceSchema",
|
@@ -1098,6 +1103,7 @@
|
|
1098
1103
|
"line": 5,
|
1099
1104
|
"character": 36
|
1100
1105
|
},
|
1106
|
+
"signature": "type LintResult = {\n filePath: string;\n errorCount: number;\n fatalErrorCount?: number | undefined;\n fixableErrorCount?: number | undefined;\n fixableWarningCount?: number | undefined;\n warningCount: number;\n messages: LintMessage[];\n raw: any;\n}",
|
1101
1107
|
"name": "LintResult",
|
1102
1108
|
"exportNode": {
|
1103
1109
|
"__schema": "TypeSchema",
|
@@ -1383,6 +1389,7 @@
|
|
1383
1389
|
"line": 5,
|
1384
1390
|
"character": 48
|
1385
1391
|
},
|
1392
|
+
"signature": "type ComponentLintResult = {\n component: Component;\n output: string;\n totalErrorCount: number;\n totalFatalErrorCount?: number | undefined;\n totalFixableErrorCount?: number | undefined;\n totalFixableWarningCount?: number | undefined;\n totalWarningCount: number;\n isClean: boolean;\n results: LintResult[];\n}",
|
1386
1393
|
"name": "ComponentLintResult",
|
1387
1394
|
"exportNode": {
|
1388
1395
|
"__schema": "TypeSchema",
|
@@ -1703,6 +1710,7 @@
|
|
1703
1710
|
"line": 6,
|
1704
1711
|
"character": 15
|
1705
1712
|
},
|
1713
|
+
"signature": "class LintTask",
|
1706
1714
|
"name": "LintTask",
|
1707
1715
|
"exportNode": {
|
1708
1716
|
"__schema": "ClassSchema",
|
@@ -1856,7 +1864,7 @@
|
|
1856
1864
|
"_legacy": {
|
1857
1865
|
"scope": "teambit.defender",
|
1858
1866
|
"name": "linter",
|
1859
|
-
"version": "1.0.
|
1867
|
+
"version": "1.0.411"
|
1860
1868
|
},
|
1861
1869
|
"_scope": "teambit.defender"
|
1862
1870
|
}
|
@@ -1872,6 +1880,7 @@
|
|
1872
1880
|
"line": 7,
|
1873
1881
|
"character": 15
|
1874
1882
|
},
|
1883
|
+
"signature": "interface LinterContext",
|
1875
1884
|
"name": "LinterContext",
|
1876
1885
|
"exportNode": {
|
1877
1886
|
"__schema": "InterfaceSchema",
|
@@ -1999,7 +2008,7 @@
|
|
1999
2008
|
"_legacy": {
|
2000
2009
|
"scope": "teambit.defender",
|
2001
2010
|
"name": "linter",
|
2002
|
-
"version": "1.0.
|
2011
|
+
"version": "1.0.411"
|
2003
2012
|
},
|
2004
2013
|
"_scope": "teambit.defender"
|
2005
2014
|
}
|
@@ -2139,6 +2148,7 @@
|
|
2139
2148
|
"line": 7,
|
2140
2149
|
"character": 30
|
2141
2150
|
},
|
2151
|
+
"signature": "interface LinterOptions",
|
2142
2152
|
"name": "LinterOptions",
|
2143
2153
|
"exportNode": {
|
2144
2154
|
"__schema": "InterfaceSchema",
|
@@ -2262,6 +2272,7 @@
|
|
2262
2272
|
"line": 8,
|
2263
2273
|
"character": 15
|
2264
2274
|
},
|
2275
|
+
"signature": "interface LinterEnv",
|
2265
2276
|
"name": "LinterEnv",
|
2266
2277
|
"exportNode": {
|
2267
2278
|
"__schema": "InterfaceSchema",
|
@@ -4403,7 +4414,7 @@
|
|
4403
4414
|
"_legacy": {
|
4404
4415
|
"scope": "teambit.defender",
|
4405
4416
|
"name": "linter",
|
4406
|
-
"version": "1.0.
|
4417
|
+
"version": "1.0.411"
|
4407
4418
|
},
|
4408
4419
|
"_scope": "teambit.defender"
|
4409
4420
|
}
|
@@ -4833,7 +4844,7 @@
|
|
4833
4844
|
"_legacy": {
|
4834
4845
|
"scope": "teambit.defender",
|
4835
4846
|
"name": "linter",
|
4836
|
-
"version": "1.0.
|
4847
|
+
"version": "1.0.411"
|
4837
4848
|
},
|
4838
4849
|
"_scope": "teambit.defender"
|
4839
4850
|
}
|
@@ -5039,7 +5050,7 @@
|
|
5039
5050
|
"componentId": {
|
5040
5051
|
"scope": "teambit.defender",
|
5041
5052
|
"name": "linter",
|
5042
|
-
"version": "1.0.
|
5053
|
+
"version": "1.0.411"
|
5043
5054
|
},
|
5044
5055
|
"taggedModuleExports": []
|
5045
5056
|
}
|
@@ -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.411/dist/linter.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_linter@1.0.411/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.411",
|
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.411"
|
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.988",
|
18
|
+
"@teambit/component": "1.0.411",
|
19
|
+
"@teambit/envs": "1.0.411",
|
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.411",
|
22
|
+
"@teambit/builder": "1.0.411",
|
23
|
+
"@teambit/isolator": "1.0.411",
|
24
|
+
"@teambit/logger": "0.0.1081"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@types/lodash": "4.14.165",
|