Skip to content

Commit

Permalink
Fix shared comment names
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte committed Sep 30, 2019
1 parent fbe45c6 commit 92fe334
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.6.0

- Fix various `shared` comments which had `generic` instead of `general` in their name.
- Fix a bug with the parser that caused some solutions to blow up
- Add `makeParseErrorOutput` and `makeNoSourceOutput` to redirect to a mentor with helpful information

## 0.5.3

- Fix `resistor-color` constant lookup, when name doesn't match "probably"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@exercism/javascript-analyzer",
"version": "0.5.3",
"version": "0.6.0",
"description": "Exercism analyzer for javascript",
"repository": "https://github.com/exercism/javascript-analyzer",
"author": "Derk-Jan Karrenbeld <[email protected]>",
Expand Down
10 changes: 5 additions & 5 deletions src/comments/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Instead, in Javascript, prefixing a parameter with an underscore will stop
most IDEs from highlighting that parameter if it's unused, which is actually a
tool you probably want to keep in this case. Remove the underscore \`_\` from
${'parameter.name'} in order to fix this.
`('javascript.generic.prefer_unprefixed_underscore_parameters')
`('javascript.general.prefer_unprefixed_underscore_parameters')

export const PARSE_ERROR = factory<'error' | 'details'>`
There is something wrong with your submission, most likely a Syntax Error:
Expand All @@ -84,14 +84,14 @@ Message: "${'error'}"
\`\`\`
${'details'}
\`\`\`
`('javascript.generic.parse_error')
`('javascript.general.parse_error')

export const PREFER_CONST_OVER_LET_AND_VAR = factory<'kind' | 'name'>`
Instead of \`${'kind'} ${'name'}\`, consider using \`const\`.
\`const\` is a signal that the identifier won't be reassigned, which SHOULD be
true for this top-level constant. (Not to be confused with _immutable values_).
`('javascript.generic.prefer_const_over_let_and_var')
`('javascript.general.prefer_const_over_let_and_var')

export const BETA_COMMENTARY_PREFIX = factory`
🧪 This solution's output contains a new format of comments that is currently
Expand All @@ -107,8 +107,8 @@ please open an issue [here](https://github.com/exercism/javascript-analyzer/issu
this to the student directly. Use it to determine what you want to say.
- If there is no icon, the commentary has not been updated to the latest
standard. Proceed with caution.
`('javascript.generic.beta_disapprove_commentary_prefix')
`('javascript.general.beta_disapprove_commentary_prefix')

export const ERROR_CAPTURED_NO_SOURCE = factory<'expected' | 'available'>`
Expected source file "${'expected'}", found: ${'available'}.
`('javascript.generic.error_captured_no_source')
`('javascript.general.error_captured_no_source')
2 changes: 1 addition & 1 deletion test/analyzers/gigasecond/__snapshots__/snapshot.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ exports[`When running analysis on gigasecond fixtures and expecting it to approv
IsolatedAnalyzerOutput {
"comments": Array [
CommentImpl {
"externalTemplate": "javascript.generic.prefer_const_over_let_and_var",
"externalTemplate": "javascript.general.prefer_const_over_let_and_var",
"message": "Instead of \`var GIGASECOND\`, consider using \`const\`.

\`const\` is a signal that the identifier won't be reassigned, which SHOULD be
Expand Down

0 comments on commit 92fe334

Please sign in to comment.