Skip to content

Commit

Permalink
Merge pull request #125 from rrd108/david/feature/docs-links
Browse files Browse the repository at this point in the history
refactor: update links in all rules output to our docs site fix #103
  • Loading branch information
rrd108 authored Aug 10, 2024
2 parents 5e9df4f + e46a57f commit 5ea3f88
Show file tree
Hide file tree
Showing 55 changed files with 90 additions and 91 deletions.
4 changes: 2 additions & 2 deletions src/rules/rrd/cyclomaticComplexity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('checkCyclomaticComplexity', () => {
expect(reportCyclomaticComplexity()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ cyclomatic complexity${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/cyclomatic-complexity.html`,
message: `${BG_WARN}(6)${BG_RESET} 🚨`,
}])
})
Expand All @@ -46,7 +46,7 @@ describe('checkCyclomaticComplexity', () => {
expect(reportCyclomaticComplexity()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ cyclomatic complexity${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/cyclomatic-complexity.html`,
message: `${BG_ERR}(11)${BG_RESET} 🚨`,
}])
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/cyclomaticComplexity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const checkCyclomaticComplexity = (script: SFCScriptBlock | null, filePath: stri
if (cyclomaticComplexity > COMPLEXITY_MODERATE) {
results.push({ filePath, message: `${cyclomaticComplexity > COMPLEXITY_HIGH ? BG_ERR : BG_WARN}(${
cyclomaticComplexity
})${BG_RESET}`, })
})${BG_RESET}` })
}
}

Expand All @@ -57,7 +57,7 @@ const reportCyclomaticComplexity = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ cyclomatic complexity${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to reduce complexity.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/cyclomatic-complexity.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/deepIndentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('checkDeepIndentation', () => {
expect(reportDeepIndentation()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ deep indentation${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your component to child components, to avoid deep indentations..${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your component to child components, to avoid deep indentations.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/deep-indentation.html`,
message: `line #1 ${BG_WARN}indentation: 5${BG_RESET} 🚨`,
}])
})
Expand All @@ -43,7 +43,7 @@ describe('checkDeepIndentation', () => {
expect(reportDeepIndentation()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ deep indentation${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your component to child components, to avoid deep indentations..${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your component to child components, to avoid deep indentations.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/deep-indentation.html`,
message: `line #1 ${BG_WARN}indentation: 15${BG_RESET} 🚨`,
}])
})
Expand Down
2 changes: 1 addition & 1 deletion src/rules/rrd/deepIndentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const reportDeepIndentation = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ deep indentation${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your component to child components, to avoid deep indentations..${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your component to child components, to avoid deep indentations.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/deep-indentation.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/rules/rrd/elseCondition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('checkElseCondition', () => {
expect(reportElseCondition()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ else conditions${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to rewrite the conditions in a way that the else clause is not necessary.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to rewrite the conditions in a way that the else clause is not necessary.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/else-condition.html`,
message: `else clauses found ${BG_ERR}(1)${BG_RESET} 🚨`,
}])
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/elseCondition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const checkElseCondition = (script: SFCScriptBlock | null, filePath: string) =>
const matches = script.content.match(regex)

if (matches?.length) {
results.push({ filePath, message: `else clauses found ${BG_ERR}(${matches.length})${BG_RESET}`, })
results.push({ filePath, message: `else clauses found ${BG_ERR}(${matches.length})${BG_RESET}` })
}
}

Expand All @@ -25,7 +25,7 @@ const reportElseCondition = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ else conditions${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to rewrite the conditions in a way that the else clause is not necessary.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to rewrite the conditions in a way that the else clause is not necessary.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/else-condition.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
10 changes: 5 additions & 5 deletions src/rules/rrd/functionSize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('checkFunctionSize', () => {
expect(reportFunctionSize()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ function size${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/function-size.html`,
message: `function ${BG_ERR}(${funcName})${BG_RESET} is too long 🚨`,
}])
})
Expand Down Expand Up @@ -150,14 +150,14 @@ describe('checkFunctionSize', () => {
expect(reportFunctionSize()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ function size${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/function-size.html`,
message: `function ${BG_ERR}(dummyRegularFunction)${BG_RESET} is too long 🚨`,
}/* TODO temporary disabled for #116
}, /* TODO temporary disabled for #116
, {
file: fileName,
rule: `${TEXT_INFO}rrd ~ function size${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/function-size.html`,
message: `function ${BG_ERR}(dummyArrowFunction)${BG_RESET} 🚨`,
}*/])
} */])
})
})
4 changes: 2 additions & 2 deletions src/rules/rrd/functionSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const addFunctionToFiles = (match: RegExpExecArray, filePath: string) => {
// Check if the function block has more than `MAX_FUNCTION_LENGTH` lines
const lineCount = funcBody.split('\n').length
if (lineCount > MAX_FUNCTION_LENGTH) {
results.push({ filePath, message: `function ${BG_ERR}(${funcName})${BG_RESET} is too long`, })
results.push({ filePath, message: `function ${BG_ERR}(${funcName})${BG_RESET} is too long` })
}
}

Expand Down Expand Up @@ -49,7 +49,7 @@ const reportFunctionSize = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ function size${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Functions must be shorter than ${MAX_FUNCTION_LENGTH} lines.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/function-size.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/magicNumbers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('checkMagicNumbers', () => {
expect(reportMagicNumbers()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ magic numbers${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Extract magic numbers to a constant.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Extract magic numbers to a constant.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/magic-numbers.html`,
message: `magic numbers found (line #1 ${BG_WARN}magic number: 2${BG_RESET}) 🚨`,
}])
})
Expand All @@ -39,7 +39,7 @@ describe('checkMagicNumbers', () => {
expect(reportMagicNumbers()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ magic numbers${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Extract magic numbers to a constant.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Extract magic numbers to a constant.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/magic-numbers.html`,
message: `magic numbers found (line #3 ${BG_WARN}magic number: 2${BG_RESET}) 🚨`,
}])
})
Expand Down
7 changes: 3 additions & 4 deletions src/rules/rrd/magicNumbers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SFCScriptBlock } from '@vue/compiler-sfc'
import { anyOf, createRegExp, digit, global, linefeed, } from 'magic-regexp'
import { anyOf, createRegExp, digit, global, linefeed } from 'magic-regexp'
import { BG_RESET, BG_WARN, TEXT_INFO, TEXT_RESET, TEXT_WARN } from '../asceeCodes'
import type { FileCheckResult, Offense } from '../../types'
import getLineNumber from '../getLineNumber'
Expand All @@ -10,7 +10,7 @@ const checkMagicNumbers = (script: SFCScriptBlock | null, filePath: string) => {
if (!script) {
return
}
const regex = createRegExp(digit, anyOf(')', linefeed), [global,])
const regex = createRegExp(digit, anyOf(')', linefeed), [global])
const matches = script.content.match(regex)

matches?.forEach((match) => {
Expand All @@ -20,7 +20,6 @@ const checkMagicNumbers = (script: SFCScriptBlock | null, filePath: string) => {
message: `line #${lineNumber} ${BG_WARN}magic number: ${match.length}${BG_RESET}`,
})
})

}

const reportMagicNumbers = () => {
Expand All @@ -31,7 +30,7 @@ const reportMagicNumbers = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ magic numbers${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Extract magic numbers to a constant.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Extract magic numbers to a constant.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/magic-numbers.html`,
message: `magic numbers found (${result.message}) 🚨`,
})
})
Expand Down
6 changes: 3 additions & 3 deletions src/rules/rrd/parameterCount.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('checkParameterCount', () => {
expect(reportParameterCount()).toStrictEqual([{
file: filename,
rule: `${TEXT_INFO}rrd ~ parameter count${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/parameter-count.html`,
message: `function ${BG_WARN}${funcName}${BG_RESET} has ${BG_WARN}${paramsCount}${BG_RESET} parameters 🚨`,
}])
})
Expand Down Expand Up @@ -74,12 +74,12 @@ describe('checkParameterCount', () => {
expect(reportParameterCount()).toStrictEqual([{
file: filename,
rule: `${TEXT_INFO}rrd ~ parameter count${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/parameter-count.html`,
message: `function ${BG_WARN}dummyFuncOne${BG_RESET} has ${BG_WARN}5${BG_RESET} parameters 🚨`,
}, {
file: filename,
rule: `${TEXT_INFO}rrd ~ parameter count${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/parameter-count.html`,
message: `function ${BG_WARN}dummyFuncTwo${BG_RESET} has ${BG_WARN}4${BG_RESET} parameters 🚨`,
}])
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/parameterCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const checkParameters = (funcName: string, params: string, filePath: string) =>
.map(param => param.trim())
.filter(param => param.length > 0)
if (paramsArray.length > MAX_PARAMETER_COUNT) {
results.push({ filePath, message: `function ${BG_WARN}${funcName}${BG_RESET} has ${BG_WARN}${paramsArray.length}${BG_RESET} parameters`, })
results.push({ filePath, message: `function ${BG_WARN}${funcName}${BG_RESET} has ${BG_WARN}${paramsArray.length}${BG_RESET} parameters` })
}
}

Expand Down Expand Up @@ -46,7 +46,7 @@ const reportParameterCount = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ parameter count${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Max number of function parameters should be ${MAX_PARAMETER_COUNT}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/parameter-count.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/plainScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const checkPlainScript = (script: SFCScriptBlock | null, filePath: string) => {
if (!script || !script.setup) {
return
}
results.push({filePath, message: `${BG_WARN}Plain <script> block${BG_RESET} found`})
results.push({ filePath, message: `${BG_WARN}Plain <script> block${BG_RESET} found` })
}

const reportPlainScript = () => {
Expand All @@ -19,7 +19,7 @@ const reportPlainScript = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ Plain <script> blocks${TEXT_RESET}`,
description: `👉 ${TEXT_WARN} Consider using <script setup> to leverage the new SFC <script> syntax.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN} Consider using <script setup> to leverage the new SFC <script> syntax.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/plain-script.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/rules/rrd/scriptLength.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('checkScriptLength', () => {
expect(reportScriptLength()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ Long <script> blocks${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor out the logic into composable functions or other files and keep the script block's length under ${MAX_SCRIPT_LENGTH} lines.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor out the logic into composable functions or other files and keep the script block's length under ${MAX_SCRIPT_LENGTH} lines.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/script-length.html`,
message: `${BG_WARN}(104 lines)${BG_RESET} 🚨`,
}])
})
Expand Down
2 changes: 1 addition & 1 deletion src/rules/rrd/scriptLength.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const reportScriptLength = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ Long <script> blocks${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor out the logic into composable functions or other files and keep the script block's length under ${MAX_SCRIPT_LENGTH} lines.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor out the logic into composable functions or other files and keep the script block's length under ${MAX_SCRIPT_LENGTH} lines.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/script-length.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
8 changes: 4 additions & 4 deletions src/rules/rrd/shortVariableName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('shortVariableName', () => {
expect(reportShortVariableName()).toStrictEqual([{
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(${variable})${BG_RESET} 🚨`,
}])
})
Expand All @@ -62,17 +62,17 @@ describe('shortVariableName', () => {
expect(reportShortVariableName()).toStrictEqual([{
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(age)${BG_RESET} 🚨`,
}, {
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(gps)${BG_RESET} 🚨`,
}, {
file: filename,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${BG_ERR}(lng)${BG_RESET} 🚨`,
}])
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/shortVariableName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const checkShortVariableName = (script: SFCScriptBlock | null, filePath: string)
const variable = match[1]

if (variable.length < MIN_VARIABLE_NAME) {
results.push({ filePath, message: `${BG_ERR}(${variable})${BG_RESET}`, })
results.push({ filePath, message: `${BG_ERR}(${variable})${BG_RESET}` })
}
}
}
Expand All @@ -32,7 +32,7 @@ const reportShortVariableName = () => {
offenses.push({
file: result.filePath,
rule: `${TEXT_INFO}rrd ~ short variable names${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Variable names must have a minimum length of ${MIN_VARIABLE_NAME}.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/short-variable-name.html`,
message: `${result.message} 🚨`,
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/rules/rrd/tooManyProps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('checkTooManyProps', () => {
expect(reportTooManyProps()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ too many props${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your code to use less properties.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your code to use less properties.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/too-many-props.html`,
message: `props found ${BG_ERR}(6)${BG_RESET} 🚨`,
}])
})
Expand All @@ -57,7 +57,7 @@ describe('checkTooManyProps', () => {
expect(reportTooManyProps()).toStrictEqual([{
file: fileName,
rule: `${TEXT_INFO}rrd ~ too many props${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your code to use less properties.${TEXT_RESET}`,
description: `👉 ${TEXT_WARN}Try to refactor your code to use less properties.${TEXT_RESET} See: https://vue-mess-detector.webmania.cc/rules/rrd/too-many-props.html`,
message: `props found ${BG_ERR}(6)${BG_RESET} 🚨`,
}])
})
Expand Down
Loading

0 comments on commit 5ea3f88

Please sign in to comment.