diff options
Diffstat (limited to '.config')
| -rw-r--r-- | .config/eslint/annotations_formatter.js | 14 | ||||
| -rw-r--r-- | .config/husky/.gitignore | 1 | ||||
| -rw-r--r-- | .config/husky/pre-commit | 4 | 
3 files changed, 19 insertions, 0 deletions
diff --git a/.config/eslint/annotations_formatter.js b/.config/eslint/annotations_formatter.js new file mode 100644 index 0000000..b3a421d --- /dev/null +++ b/.config/eslint/annotations_formatter.js @@ -0,0 +1,14 @@ +module.exports = function (results) { +    let output = ""; + +    for (const file of results.filter(r => r.messages.length > 0)) { +        for (const message of file.messages) { +            const path = file.filePath.substr(process.cwd().length + 1); +            const severity = message.fatal || message.severity === 2 ? "error" : "warning"; +            const text = `[ESLint] ${message.ruleId}: ${message.message}`; +            output += `::${severity} file=${path},line=${message.line},col=${message.column}::${text}\n`; +        } +    } + +    return output; +}; diff --git a/.config/husky/.gitignore b/.config/husky/.gitignore new file mode 100644 index 0000000..c9cdc63 --- /dev/null +++ b/.config/husky/.gitignore @@ -0,0 +1 @@ +_
\ No newline at end of file diff --git a/.config/husky/pre-commit b/.config/husky/pre-commit new file mode 100644 index 0000000..101f7b9 --- /dev/null +++ b/.config/husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint
\ No newline at end of file  |