diff --git a/__fixtures__/javascript.js b/__fixtures__/javascript.js index d2517fb..26819b3 100644 --- a/__fixtures__/javascript.js +++ b/__fixtures__/javascript.js @@ -42,4 +42,4 @@ export function shadow() { nonExistent(); -// There is intentionally no new line at the end of this file to hit [eol-last](https://eslint.org/docs/rules/eol-last). +// There is intentionally no new line at the end of this file to hit [eol-last](https://eslint.org/docs/rules/eol-last). \ No newline at end of file diff --git a/__tests__/__snapshots__/check-fixtures.js.snap b/__tests__/__snapshots__/check-fixtures.js.snap index f897730..61a4a8b 100644 --- a/__tests__/__snapshots__/check-fixtures.js.snap +++ b/__tests__/__snapshots__/check-fixtures.js.snap @@ -147,11 +147,70 @@ exports[`linting javascript.js fixture matches snapshot 1`] = ` "ruleId": "no-undef", "severity": 2, }, + { + "column": 121, + "endColumn": 121, + "endLine": 45, + "fix": { + "range": [ + 894, + 894, + ], + "text": " +", + }, + "line": 45, + "message": "Insert \`⏎\`", + "messageId": "insert", + "nodeType": null, + "ruleId": "prettier/prettier", + "severity": 2, + }, ] `; exports[`linting typescript.ts fixture matches snapshot 1`] = ` [ + { + "column": 48, + "endColumn": 61, + "endLine": 1, + "line": 1, + "message": "'three' is defined but never used.", + "messageId": "unusedVar", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-unused-vars", + "severity": 2, + }, + { + "column": 55, + "endColumn": 61, + "endLine": 1, + "fix": { + "range": [ + 54, + 60, + ], + "text": "string", + }, + "line": 1, + "message": "Don't use \`String\` as a type. Use string instead", + "messageId": "bannedTypeMessage", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/ban-types", + "severity": 2, + }, + { + "column": 1, + "endColumn": 14, + "endLine": 5, + "line": 5, + "message": "Do not use "@ts-ignore" because it alters compilation errors.", + "messageId": "tsDirectiveComment", + "nodeType": "Line", + "ruleId": "@typescript-eslint/ban-ts-comment", + "severity": 2, + }, { "column": 1, "endColumn": 14, @@ -168,7 +227,7 @@ exports[`linting typescript.ts fixture matches snapshot 1`] = ` "messageId": "preferExpectErrorComment", "nodeType": "Line", "ruleId": "@typescript-eslint/prefer-ts-expect-error", - "severity": 1, + "severity": 2, }, { "column": 21, @@ -227,5 +286,16 @@ exports[`linting typescript.ts fixture matches snapshot 1`] = ` "ruleId": "@typescript-eslint/no-shadow", "severity": 2, }, + { + "column": 49, + "endColumn": 54, + "endLine": 29, + "line": 29, + "message": "'value' is defined but never used.", + "messageId": "unusedVar", + "nodeType": "Identifier", + "ruleId": "@typescript-eslint/no-unused-vars", + "severity": 2, + }, ] `;