@teambit/linter 1.0.7 → 1.0.9
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/dist/lint.task.js
CHANGED
@@ -19,8 +19,8 @@ function _component() {
|
|
19
19
|
return data;
|
20
20
|
}
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
22
|
-
function ownKeys(
|
23
|
-
function _objectSpread(
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
24
24
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
25
25
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
26
26
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
package/dist/lint.task.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_path","data","_interopRequireDefault","require","_component","obj","__esModule","default","ownKeys","
|
1
|
+
{"version":3,"names":["_path","data","_interopRequireDefault","require","_component","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","LintTask","constructor","aspectId","name","execute","context","linter","env","getLinter","rootDir","capsuleNetwork","capsulesRootDir","componentsDirMap","getComponentsDirectory","components","graphCapsules","linterContext","results","lint","componentsResults","map","lintResult","component","metadata","output","errors","capsuleRootDir","capsuleList","ComponentMap","as","_capsuleList$getCapsu","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 { Component, 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, readonly name = 'lint') {}\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(\n rootDir,\n context.components,\n context.capsuleNetwork.graphCapsules\n );\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(\n capsuleRootDir: string,\n components: Component[],\n capsuleList: CapsuleList\n ): ComponentMap<string> {\n return ComponentMap.as<string>(components, (component) => {\n const fullPath = capsuleList.getCapsule(component.id)?.path || '';\n const relativePath = path.relative(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c0e05b598a5a55af/teambit.defender_linter@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.9/dist/linter.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_linter@1.0.9/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.9",
|
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.9"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -17,13 +17,13 @@
|
|
17
17
|
"core-js": "^3.0.0",
|
18
18
|
"@babel/runtime": "7.20.0",
|
19
19
|
"@teambit/harmony": "0.4.6",
|
20
|
-
"@teambit/cli": "0.0.
|
21
|
-
"@teambit/component": "1.0.
|
22
|
-
"@teambit/envs": "1.0.
|
23
|
-
"@teambit/workspace": "1.0.
|
24
|
-
"@teambit/builder": "1.0.
|
25
|
-
"@teambit/isolator": "1.0.
|
26
|
-
"@teambit/logger": "0.0.
|
20
|
+
"@teambit/cli": "0.0.791",
|
21
|
+
"@teambit/component": "1.0.9",
|
22
|
+
"@teambit/envs": "1.0.9",
|
23
|
+
"@teambit/workspace": "1.0.9",
|
24
|
+
"@teambit/builder": "1.0.9",
|
25
|
+
"@teambit/isolator": "1.0.9",
|
26
|
+
"@teambit/logger": "0.0.884"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@types/lodash": "4.14.165",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"@teambit/defender.content.linter-overview": "1.95.0"
|
37
37
|
},
|
38
38
|
"peerDependencies": {
|
39
|
-
"@teambit/legacy": "1.0.
|
39
|
+
"@teambit/legacy": "1.0.571",
|
40
40
|
"react": "^16.8.0 || ^17.0.0",
|
41
41
|
"react-dom": "^16.8.0 || ^17.0.0"
|
42
42
|
},
|