From a0b2acf16ca184c1f96d435007c2bf596ecd047d Mon Sep 17 00:00:00 2001 From: Jeroen de Bruijn <62570005+jdbruijn@users.noreply.github.com> Date: Thu, 25 Feb 2021 19:03:56 +0100 Subject: [PATCH] style: add ESLint ignore file to enable linting of dotfiles (#103) Closes #100. --- .dockerignore | 1 + .eslintignore | 10 ++++++++++ .github/tasks/actionYamlUpdater.js | 3 ++- package.json | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .eslintignore diff --git a/.dockerignore b/.dockerignore index 3e05cf3..6b30889 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,4 +7,5 @@ coverage fixtures src/action.test.js src/testUtils.js +.eslintignore .eslintrc.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..db785b1 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,10 @@ +.git/ +.vscode +/build/ +/dist/ +/coverage/ +/LICENSE.md +/modules/ +/node_modules/ +/worktrees/ +!.* diff --git a/.github/tasks/actionYamlUpdater.js b/.github/tasks/actionYamlUpdater.js index 2119f2c..3dfdf00 100644 --- a/.github/tasks/actionYamlUpdater.js +++ b/.github/tasks/actionYamlUpdater.js @@ -1,10 +1,11 @@ +// eslint-disable-next-line import/no-extraneous-dependencies const yaml = require('yaml') yaml.scalarOptions.str.fold.lineWidth = 100 const versionRegex = /\d+\.\d+\.\d+/ -module.exports.readVersion = contents => +module.exports.readVersion = (contents) => yaml.parse(contents).runs.image.match(versionRegex)[0] module.exports.writeVersion = (contents, version) => { diff --git a/package.json b/package.json index e45afd5..9f19211 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "postinstall": "husky install", "test": "NODE_PATH=./node_modules jest", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", - "lint": "eslint --ignore-path .gitignore ." + "lint": "eslint ." }, "engines": { "node": ">=12.0.0"