Skip to content

Commit 62e4220

Browse files
author
farfromrefug
committed
chore: using new repo template
1 parent fc35da4 commit 62e4220

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+15813
-613
lines changed

.eslintrc.js

+1-179
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,3 @@
11
module.exports = {
2-
extends: ['plugin:prettier/recommended'],
3-
plugins: ['prettier', '@typescript-eslint'],
4-
parser: '@typescript-eslint/parser',
5-
parserOptions: {
6-
ecmaVersion: 2018,
7-
sourceType: 'module',
8-
parser: '@typescript-eslint/parser',
9-
project: 'tsconfig.eslint.json',
10-
warnOnUnsupportedTypeScriptVersion: false,
11-
tsconfigRootDir: __dirname,
12-
},
13-
rules: {
14-
'prettier/prettier': 'warn',
15-
'@typescript-eslint/adjacent-overload-signatures': 'error',
16-
'@typescript-eslint/array-type': 'error',
17-
'@typescript-eslint/await-thenable': 'error',
18-
'@typescript-eslint/ban-types': 'off',
19-
'@typescript-eslint/class-name-casing': 'off',
20-
'@typescript-eslint/consistent-type-assertions': 'error',
21-
'@typescript-eslint/consistent-type-definitions': 'error',
22-
'@typescript-eslint/explicit-member-accessibility': [
23-
'off',
24-
{
25-
accessibility: 'explicit',
26-
},
27-
],
28-
'@typescript-eslint/indent': [
29-
'error',
30-
4,
31-
{
32-
FunctionDeclaration: {
33-
parameters: 'first',
34-
},
35-
FunctionExpression: {
36-
parameters: 'first',
37-
},
38-
SwitchCase: 1,
39-
},
40-
],
41-
'@typescript-eslint/interface-name-prefix': 'off',
42-
'@typescript-eslint/member-delimiter-style': 'error',
43-
'@typescript-eslint/member-ordering': 'off',
44-
'@typescript-eslint/no-empty-function': 'off',
45-
'@typescript-eslint/no-empty-interface': 'off',
46-
'@typescript-eslint/no-explicit-any': 'off',
47-
'@typescript-eslint/no-floating-promises': 'off',
48-
'@typescript-eslint/no-inferrable-types': 'off',
49-
'@typescript-eslint/no-misused-new': 'off',
50-
'@typescript-eslint/no-namespace': 'off',
51-
'@typescript-eslint/no-parameter-properties': 'off',
52-
'@typescript-eslint/no-require-imports': 'off',
53-
'@typescript-eslint/no-unnecessary-qualifier': 'error',
54-
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
55-
'@typescript-eslint/no-use-before-declare': 'off',
56-
'@typescript-eslint/no-var-requires': 'off',
57-
'@typescript-eslint/prefer-for-of': 'off',
58-
'@typescript-eslint/prefer-function-type': 'error',
59-
'@typescript-eslint/prefer-namespace-keyword': 'error',
60-
'@typescript-eslint/quotes': [
61-
'error',
62-
'single',
63-
{
64-
avoidEscape: true,
65-
},
66-
],
67-
'@typescript-eslint/semi': ['error'],
68-
'@typescript-eslint/space-within-parens': ['off', 'never'],
69-
'@typescript-eslint/triple-slash-reference': 'off',
70-
'@typescript-eslint/type-annotation-spacing': 'error',
71-
'@typescript-eslint/unified-signatures': 'error',
72-
'arrow-body-style': 'error',
73-
'arrow-parens': ['off', 'as-needed'],
74-
camelcase: 'off',
75-
'capitalized-comments': 'off',
76-
complexity: 'off',
77-
'constructor-super': 'error',
78-
curly: ['error', 'multi-line'],
79-
'dot-notation': 'off',
80-
'eol-last': 'error',
81-
eqeqeq: ['error', 'smart'],
82-
'guard-for-in': 'off',
83-
'id-blacklist': ['error', 'any', 'string', 'boolean', 'Undefined'],
84-
'id-match': 'error',
85-
'sort-imports': [
86-
'error',
87-
{
88-
ignoreCase: false,
89-
ignoreDeclarationSort: true,
90-
ignoreMemberSort: false,
91-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
92-
},
93-
],
94-
'linebreak-style': 'off',
95-
'max-classes-per-file': 'off',
96-
'max-len': [
97-
'off',
98-
{
99-
ignorePattern: '^import |^export {(.*?)}',
100-
code: 200,
101-
},
102-
],
103-
'new-parens': 'off',
104-
'newline-per-chained-call': 'off',
105-
'no-bitwise': 'off',
106-
'no-caller': 'error',
107-
'no-cond-assign': 'off',
108-
'no-console': [
109-
'off',
110-
{
111-
allow: [
112-
'log',
113-
'warn',
114-
'dir',
115-
'timeLog',
116-
'assert',
117-
'clear',
118-
'count',
119-
'countReset',
120-
'group',
121-
'groupEnd',
122-
'table',
123-
'debug',
124-
'dirxml',
125-
'error',
126-
'groupCollapsed',
127-
'Console',
128-
'profile',
129-
'profileEnd',
130-
'timeStamp',
131-
'context',
132-
],
133-
},
134-
],
135-
'no-constant-condition': 'error',
136-
'no-control-regex': 'off',
137-
'no-debugger': 'error',
138-
'no-duplicate-imports': 'error',
139-
'no-empty': 'off',
140-
'no-eval': 'off',
141-
'no-extra-semi': 'off',
142-
'no-fallthrough': 'error',
143-
'no-invalid-regexp': 'error',
144-
'no-invalid-this': 'off',
145-
'no-irregular-whitespace': 'off',
146-
'no-multiple-empty-lines': 'off',
147-
'no-new-wrappers': 'error',
148-
'no-redeclare': ['error', { builtinGlobals: false }],
149-
'no-regex-spaces': 'error',
150-
'no-return-await': 'error',
151-
'no-shadow': [
152-
'off',
153-
{
154-
hoist: 'all',
155-
},
156-
],
157-
'no-throw-literal': 'error',
158-
'no-trailing-spaces': 'error',
159-
'no-undef-init': 'error',
160-
'no-underscore-dangle': 'off',
161-
'no-unsafe-finally': 'error',
162-
'no-unused-expressions': [
163-
'error',
164-
{
165-
allowTaggedTemplates: true,
166-
allowShortCircuit: true,
167-
},
168-
],
169-
'no-unused-labels': 'error',
170-
'no-var': 'error',
171-
'object-shorthand': 'error',
172-
'one-var': ['off', 'never'],
173-
'prefer-arrow/prefer-arrow-functions': 'off',
174-
'prefer-const': 'error',
175-
'quote-props': 'off',
176-
radix: 'error',
177-
'space-before-function-paren': 'off',
178-
'use-isnan': 'error',
179-
'valid-typeof': 'off',
180-
},
2+
extends: './tools/.eslintrc.js'
1813
};

.gitattributes

-17
This file was deleted.

.github/FUNDING.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
github: [farfromrefug]
2-
liberapay: farfromrefuge
3-
patreon: farfromrefuge

.github/workflows/release.yml

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: 'release'
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
type: choice
8+
default: auto
9+
description: What kind of version upgrade
10+
options:
11+
- auto
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: "0"
24+
submodules: true
25+
26+
- name: setup node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: lts/*
30+
registry-url: 'https://registry.npmjs.org'
31+
32+
33+
- uses: oNaiPs/secrets-to-env-action@v1
34+
with:
35+
secrets: ${{ toJSON(secrets) }}
36+
37+
38+
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
39+
with:
40+
token: '${{ secrets.GITHUB_TOKEN }}'
41+
name: Martin Guillon
42+
43+
44+
- name: install jq
45+
run: sudo apt install jq
46+
47+
- name: Enable CorePack
48+
run: |
49+
corepack enable
50+
yarn config get globalFolder # the yarn command will ensure the correct yarn version is downloaded and installed
51+
52+
- name: Get yarn cache directory path
53+
id: yarn-cache-dir-path
54+
run: echo "::set-output name=dir::$(yarn config get globalFolder)"
55+
56+
- name: Remove package.json resolutions
57+
run: echo "`jq 'delpaths([["resolutions"]])' package.json`" > package.json
58+
59+
- uses: actions/cache@v4
60+
name: Handle node_modules Cache
61+
id: yarn-node_modules # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
62+
with:
63+
path: node_modules
64+
key: ${{ runner.os }}-yarn-node_modules-${{ hashFiles('**/yarn.lock') }}
65+
restore-keys: |
66+
${{ runner.os }}-node_modules-
67+
68+
- uses: actions/cache@v4
69+
if: steps.yarn-node_modules.outputs.cache-hit != 'true'
70+
name: Handle Yarn cache
71+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
72+
with:
73+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
74+
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
75+
restore-keys: |
76+
${{ runner.os }}-yarn-
77+
78+
- name: Install deps
79+
if: steps.yarn-node_modules.outputs.cache-hit != 'true'
80+
uses: bahmutov/npm-install@v1
81+
with:
82+
install-command: yarn install --silent
83+
env:
84+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
85+
86+
- name: run setup
87+
run: |
88+
npm run setup
89+
90+
- name: "NPM Identity"
91+
env:
92+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
93+
run: |
94+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
95+
96+
- name: publish auto
97+
if: github.event.inputs.release_type == 'auto'
98+
run: |
99+
npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes
100+
env:
101+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
102+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
105+
- name: publish
106+
if: github.event.inputs.release_type != 'auto'
107+
run: |
108+
npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes --bump ${{ github.event.inputs.release_type }}
109+
env:
110+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
111+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)