Skip to content

Commit 34522cf

Browse files
committed
chore: initialise from vidavidorra/repo-template@v1.0.42
Vidavidorra repo template release/tag: https://github.com/vidavidorra/repo-template/releases/tag/v1.0.42.
1 parent fef545a commit 34522cf

20 files changed

+10866
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.git/
2+
.vscode
3+
build/
4+
dist/
5+
coverage/
6+
LICENSE.md
7+
CHANGELOG.md
8+
modules/
9+
node_modules/

.eslintrc.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const defaultConfig = {
2+
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
3+
plugins: [],
4+
parserOptions: {
5+
sourceType: 'module',
6+
},
7+
env: {
8+
es2020: true,
9+
node: true,
10+
},
11+
rules: {
12+
'prettier/prettier': 'error',
13+
'sort-imports': 'error',
14+
},
15+
};
16+
17+
/**
18+
* Add to `extends` of `defaultConfig`.
19+
*
20+
* The Prettier recommended configuration must be the last extension. See
21+
* https://github.com/prettier/eslint-plugin-prettier#recommended-configuration.
22+
*
23+
* @param {...configurations} configurations Configuration(s) to add.
24+
* @return Superset of the `extends` with the given configuration(s) added.
25+
*/
26+
function addToDefaultExtends(...configurations) {
27+
const prettierConfiguration = 'plugin:prettier/recommended';
28+
const extendsSuperset = defaultConfig.extends
29+
.concat(configurations)
30+
.sort((a, b) => {
31+
if (b === prettierConfiguration) {
32+
return -1;
33+
}
34+
if (a === prettierConfiguration) {
35+
return 1;
36+
}
37+
return 0;
38+
});
39+
40+
return extendsSuperset;
41+
}
42+
43+
const config = defaultConfig;
44+
config.overrides = [
45+
{
46+
files: ['**/*.json'],
47+
extends: addToDefaultExtends('plugin:json/recommended'),
48+
},
49+
];
50+
51+
module.exports = config;

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/renovate.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":masterIssue",
5+
":pinDependencies",
6+
":timezone(Europe/Amsterdam)"
7+
],
8+
"ignorePresets": [":prHourlyLimit2"],
9+
"lockFileMaintenance": {
10+
"enabled": true,
11+
"masterIssueApproval": true
12+
},
13+
"major": {
14+
"stabilityDays": 3
15+
},
16+
"packageRules": [
17+
{
18+
"description": "Auto-merge dependencies",
19+
"depTypeList": ["devDependencies", "dependencies"],
20+
"updateTypes": ["pin", "digest", "patch", "minor"],
21+
"automerge": true
22+
}
23+
],
24+
"prCreation": "not-pending"
25+
}

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- 'renovate/**'
7+
- 'github-renovate/**'
8+
pull_request:
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 5
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2.3.2
16+
- name: Setup node
17+
uses: actions/setup-node@v2.1.1
18+
with:
19+
node-version: 12
20+
- name: Install project
21+
run: npm ci --ignore-scripts
22+
- name: Lint
23+
run: npm run lint-es
24+
- name: Check formatting
25+
run: npm run format:check
26+
release:
27+
needs: lint
28+
runs-on: ubuntu-latest
29+
# GitHub API requests can easy take a couple of seconds and the release can
30+
# make lots of API requests when a release has a lot of commits. If every
31+
# requests takes five seconds, which is on the high side for a request, this
32+
# could perform 180 requests. This should be enough for most use cases.
33+
timeout-minutes: 15
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2.3.2
37+
with:
38+
# Make sure the release step uses its own credentials.
39+
persist-credentials: false
40+
- name: Setup node
41+
uses: actions/setup-node@v2.1.1
42+
with:
43+
node-version: 12
44+
- name: Install project
45+
run: npm ci --ignore-scripts
46+
- name: Release
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
49+
GIT_AUTHOR_NAME: vidavidorra-release
50+
GIT_AUTHOR_EMAIL: 65564857+vidavidorra-release@users.noreply.github.com
51+
GIT_COMMITTER_NAME: vidavidorra-release
52+
GIT_COMMITTER_EMAIL: 65564857+vidavidorra-release@users.noreply.github.com
53+
run: npx --no-install semantic-release
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint commit messages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- 'renovate/**'
7+
- 'github-renovate/**'
8+
pull_request:
9+
jobs:
10+
commitlint:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 5
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2.3.2
16+
with:
17+
fetch-depth: 0
18+
- name: Lint commit messages
19+
uses: wagoid/commitlint-github-action@v2.0.2
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)