diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..f3015ee --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,18 @@ +name: Linting + +on: + push: + branches: + - main + tags: + - '*' + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + lint: + uses: voxpelli/ghatemplates/.github/workflows/lint.yml@main diff --git a/.gitignore b/.gitignore index 13a5415..7a4d8b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,16 @@ -# Ignoring a .gitignore in /templates enables a user to add a .gitignore in there that ignores specific templates it -# doesn't want to commit without that meaning that it will have uncommitted changes always. -/templates/.gitignore - -# Of course we don't want to commit our dependencies +# Basic ones +/coverage +/coverage-ts /node_modules +/.env +/.nyc_output -# We're a library, so no yarn.lock either +# We're a library, so please, no lock files +/package-lock.json /yarn.lock -# These files we should skip as well -.DS_Store -npm-debug.log -yarn-error.log +# Library specific ones + +# Ignoring a .gitignore in /templates enables a user to add a .gitignore in there that ignores specific templates it +# doesn't want to commit without that meaning that it will have uncommitted changes always. +/templates/.gitignore diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eb97121..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - '12' - - '10' -sudo: false diff --git a/package.json b/package.json index 7fea0f4..13ad4c5 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "request": "^2.75.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=16.0.0" }, "repository": { "type": "git", @@ -31,11 +31,14 @@ "webmention-testpinger": "bin/cli" }, "scripts": { - "dependency-check": "JS_FILES=\"lib/*.js\" && dependency-check . $JS_FILES && dependency-check . $JS_FILES --unused --no-dev", - "test": "installed-check -e -i eslint && eslint . && npm run dependency-check" + "check:dependency-check": "dependency-check 'lib/*.js' --no-dev", + "check:installed-check": "installed-check", + "check:lint": "eslint --report-unused-disable-directives .", + "check": "run-p check:*", + "test": "run-s check" }, "devDependencies": { - "dependency-check": "3.4.1", + "dependency-check": "^4.1.0", "eslint": "6.8.0", "eslint-config-semistandard": "14.0.0", "eslint-config-standard": "13.0.1", @@ -43,6 +46,7 @@ "eslint-plugin-node": "9.2.0", "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", - "installed-check": "2.2.0" + "installed-check": "^7.0.0", + "npm-run-all2": "^6.0.5" } }