@forge/lint 5.6.1-next.3 → 5.6.1-next.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 5.6.1-next.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 85663fe: Display filename, index, line, and column when linting results in a compilation error.
8
+ - Updated dependencies [85663fe]
9
+ - @forge/cli-shared@6.4.0-next.5
10
+
11
+ ## 5.6.1-next.4
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [319c5aa]
16
+ - Updated dependencies [88b77fc]
17
+ - @forge/manifest@8.1.0-next.3
18
+ - @forge/cli-shared@6.4.0-next.4
19
+
3
20
  ## 5.6.1-next.3
4
21
 
5
22
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/lint/lint.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,CAAC;AAIpB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAYxG,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,WAAY,UAAU,eAAe,UAAU,EAAE,4BAAuB,IA+CrG,CAAC;AAEF,eAAO,MAAM,YAAY,gBAAiB,UAAU,EAAE,KAAG,YAQxD,CAAC;AAEF,eAAO,MAAM,eAAe,aAChB,MAAM,UACR,eAAe,oBACN,OAAO,GAAG,QAAQ,CAAC,aAAa,KAChD,QAAQ,SAAS,CAOnB,CAAC;AAEF,eAAO,MAAM,IAAI,gBACF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U,EAAE,CAGtB,CAAC"}
package/out/lint/lint.js CHANGED
@@ -118,10 +118,23 @@ const lint = async (filesToLint, manifest, environment, logger, parseFunction =
118
118
  });
119
119
  }
120
120
  catch (e) {
121
- throw new cli_shared_1.ApplicationCompileError(e);
121
+ throw new cli_shared_1.ApplicationCompileError(formatCompileErrorMessage(e));
122
122
  }
123
123
  };
124
124
  exports.lint = lint;
125
+ function formatCompileErrorMessage(error) {
126
+ let errorMessage = error.message;
127
+ if (error.fileName) {
128
+ errorMessage += `\nin ${error.fileName}`;
129
+ }
130
+ if (error.index !== undefined) {
131
+ errorMessage += `\nat index ${error.index}`;
132
+ }
133
+ if (error.lineNumber !== undefined && error.column !== undefined) {
134
+ errorMessage += `\nat line ${error.lineNumber}, column ${error.column}`;
135
+ }
136
+ return errorMessage;
137
+ }
125
138
  const litelint = async (logger, linter = new basic_manifest_linter_1.BasicManifestLinter(logger)) => {
126
139
  await linter.bootstrap();
127
140
  return linter.batchExecute();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/lint",
3
- "version": "5.6.1-next.3",
3
+ "version": "5.6.1-next.5",
4
4
  "description": "Linting for forge apps",
5
5
  "main": "out/index.js",
6
6
  "license": "UNLICENSED",
@@ -19,9 +19,9 @@
19
19
  "eslint-plugin-import": "^2.29.1"
20
20
  },
21
21
  "dependencies": {
22
- "@forge/cli-shared": "6.4.0-next.3",
22
+ "@forge/cli-shared": "6.4.0-next.5",
23
23
  "@forge/egress": "1.2.13",
24
- "@forge/manifest": "8.1.0-next.2",
24
+ "@forge/manifest": "8.1.0-next.3",
25
25
  "@typescript-eslint/typescript-estree": "^5.62.0",
26
26
  "array.prototype.flatmap": "^1.3.2",
27
27
  "atlassian-openapi": "^1.0.18",