Skip to content

Commit e8132e2

Browse files
authored
Merge pull request #1 from nmshd/upgrade-libs
Upgrade libs
2 parents 43231ca + 840174c commit e8132e2

Some content is hidden

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

51 files changed

+9917
-7479
lines changed

.bettercodehub.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
component_depth: 2
22
languages:
3-
- typescript
3+
- typescript

.ci/runChecks.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set -e
2+
3+
npm ci
4+
npm run build
5+
npm run lint
6+
npx license-check
7+
npx better-npm-audit audit --exclude=1096727,1097682

.eslintrc.js

+226
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
module.exports = {
2+
env: {
3+
es6: true,
4+
node: true
5+
},
6+
ignorePatterns: ['.eslintrc.js', 'jest.config.js'],
7+
extends: [
8+
'plugin:@typescript-eslint/recommended',
9+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
10+
'prettier'
11+
],
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
project: ['tsconfig.json', 'test/tsconfig.json'],
15+
sourceType: 'module'
16+
},
17+
plugins: ['eslint-plugin-jsdoc', 'eslint-plugin-prefer-arrow', '@typescript-eslint'],
18+
root: true,
19+
rules: {
20+
'@typescript-eslint/adjacent-overload-signatures': 'error',
21+
'@typescript-eslint/array-type': [
22+
'error',
23+
{
24+
default: 'generic'
25+
}
26+
],
27+
'@typescript-eslint/ban-types': 'off',
28+
'@typescript-eslint/consistent-type-assertions': 'error',
29+
'@typescript-eslint/dot-notation': 'off',
30+
'@typescript-eslint/explicit-function-return-type': 'off',
31+
'@typescript-eslint/explicit-module-boundary-types': 'off',
32+
'@typescript-eslint/indent': 'off',
33+
'@typescript-eslint/member-delimiter-style': [
34+
'error',
35+
{
36+
multiline: {
37+
delimiter: 'semi',
38+
requireLast: true
39+
},
40+
singleline: {
41+
delimiter: 'semi',
42+
requireLast: false
43+
}
44+
}
45+
],
46+
'@typescript-eslint/naming-convention': [
47+
'off',
48+
{
49+
selector: 'variable',
50+
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
51+
leadingUnderscore: 'allow',
52+
trailingUnderscore: 'forbid'
53+
}
54+
],
55+
'@typescript-eslint/no-empty-function': 'error',
56+
'@typescript-eslint/no-empty-interface': 'error',
57+
'@typescript-eslint/no-explicit-any': 'off',
58+
'@typescript-eslint/no-misused-new': 'error',
59+
'@typescript-eslint/no-namespace': 'error',
60+
'@typescript-eslint/no-parameter-properties': 'off',
61+
'@typescript-eslint/no-shadow': [
62+
'error',
63+
{
64+
hoist: 'all'
65+
}
66+
],
67+
'@typescript-eslint/no-unused-expressions': 'error',
68+
'@typescript-eslint/no-use-before-define': 'off',
69+
'@typescript-eslint/no-var-requires': 'off',
70+
'@typescript-eslint/prefer-for-of': 'error',
71+
'@typescript-eslint/prefer-function-type': 'error',
72+
'@typescript-eslint/prefer-namespace-keyword': 'error',
73+
'@typescript-eslint/semi': ['error', 'always'],
74+
'@typescript-eslint/triple-slash-reference': [
75+
'error',
76+
{
77+
path: 'always',
78+
types: 'prefer-import',
79+
lib: 'always'
80+
}
81+
],
82+
'@typescript-eslint/type-annotation-spacing': 'off',
83+
'@typescript-eslint/typedef': 'off',
84+
'@typescript-eslint/unified-signatures': 'error',
85+
'arrow-parens': ['off', 'always'],
86+
'brace-style': ['off', 'off'],
87+
'comma-dangle': 'off',
88+
complexity: 'off',
89+
'constructor-super': 'error',
90+
'dot-notation': 'off',
91+
'eol-last': 'off',
92+
eqeqeq: ['error', 'smart'],
93+
'guard-for-in': 'error',
94+
'id-denylist': [
95+
'error',
96+
'any',
97+
'Number',
98+
'number',
99+
'String',
100+
'string',
101+
'Boolean',
102+
'boolean',
103+
'Undefined',
104+
'undefined'
105+
],
106+
'id-match': 'error',
107+
indent: 'off',
108+
'jsdoc/check-alignment': 'error',
109+
'jsdoc/check-indentation': 'error',
110+
// "jsdoc/newline-after-description": "error",
111+
'linebreak-style': 'off',
112+
'max-classes-per-file': 'off',
113+
'max-len': 'off',
114+
'new-parens': 'off',
115+
'newline-per-chained-call': 'off',
116+
'no-bitwise': 'error',
117+
'no-caller': 'error',
118+
'no-cond-assign': 'error',
119+
'no-console': [
120+
'error',
121+
{
122+
allow: [
123+
'warn',
124+
'dir',
125+
'time',
126+
'timeEnd',
127+
'timeLog',
128+
'trace',
129+
'assert',
130+
'clear',
131+
'count',
132+
'countReset',
133+
'group',
134+
'groupEnd',
135+
'table',
136+
'debug',
137+
'info',
138+
'dirxml',
139+
'groupCollapsed',
140+
'Console',
141+
'profile',
142+
'profileEnd',
143+
'timeStamp',
144+
'context',
145+
'createTask'
146+
]
147+
}
148+
],
149+
'no-debugger': 'error',
150+
'no-empty': 'error',
151+
'no-empty-function': 'off',
152+
'no-eval': 'error',
153+
'no-extra-semi': 'off',
154+
'no-fallthrough': 'off',
155+
'no-invalid-this': 'off',
156+
'no-irregular-whitespace': 'off',
157+
'no-multiple-empty-lines': 'off',
158+
'no-new-wrappers': 'error',
159+
'no-shadow': 'off',
160+
'no-throw-literal': 'error',
161+
'no-trailing-spaces': 'off',
162+
'no-undef-init': 'error',
163+
'no-underscore-dangle': 'off',
164+
'no-unsafe-finally': 'error',
165+
'no-unused-expressions': 'off',
166+
'no-unused-labels': 'error',
167+
'no-use-before-define': 'off',
168+
'no-var': 'error',
169+
'object-shorthand': ['error', 'never'],
170+
'one-var': ['error', 'never'],
171+
'padded-blocks': [
172+
'off',
173+
{
174+
blocks: 'never'
175+
},
176+
{
177+
allowSingleLineBlocks: true
178+
}
179+
],
180+
'prefer-arrow/prefer-arrow-functions': [
181+
'error',
182+
{
183+
allowStandaloneDeclarations: true
184+
}
185+
],
186+
'prefer-const': 'error',
187+
'quote-props': 'off',
188+
radix: 'error',
189+
'react/jsx-curly-spacing': 'off',
190+
'react/jsx-equals-spacing': 'off',
191+
'react/jsx-tag-spacing': [
192+
'off',
193+
{
194+
afterOpening: 'allow',
195+
closingSlash: 'allow'
196+
}
197+
],
198+
'react/jsx-wrap-multilines': 'off',
199+
semi: 'off',
200+
'space-before-function-paren': 'off',
201+
'space-in-parens': ['off', 'never'],
202+
'spaced-comment': [
203+
'error',
204+
'always',
205+
{
206+
markers: ['/']
207+
}
208+
],
209+
'use-isnan': 'error',
210+
'valid-typeof': 'off',
211+
'@typescript-eslint/no-unsafe-argument': 'off',
212+
'@typescript-eslint/no-unsafe-member-access': 'off',
213+
'constructor-super': 'off',
214+
'@typescript-eslint/no-unsafe-assignment': 'off',
215+
'@typescript-eslint/no-unsafe-return': 'off',
216+
'@typescript-eslint/no-unsafe-call': 'off',
217+
'@typescript-eslint/unbound-method': 'off',
218+
'@typescript-eslint/no-unused-vars': [
219+
'error',
220+
{
221+
argsIgnorePattern: '^_',
222+
varsIgnorePattern: '^_'
223+
}
224+
]
225+
}
226+
};

.github/dependabot.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
groups:
8+
update-github-actions-dependencies:
9+
patterns:
10+
- '*'
11+
reviewers:
12+
- 'jkoenig134'
13+
labels:
14+
- 'dependencies'
15+
16+
- package-ecosystem: 'npm'
17+
directory: '/'
18+
schedule:
19+
interval: 'weekly'
20+
groups:
21+
update-npm-dependencies:
22+
patterns:
23+
- '*'
24+
reviewers:
25+
- 'jkoenig134'
26+
labels:
27+
- 'dependencies'

.github/workflows/master.yml

-32
This file was deleted.

.github/workflows/npm-publish.yml

-23
This file was deleted.

.github/workflows/publish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
run-checks:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: current
15+
- run: bash .ci/runChecks.sh
16+
17+
publish-npm:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
id-token: write
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: current
27+
registry-url: https://registry.npmjs.org/
28+
- run: npm ci
29+
- run: npm run build
30+
- run: npx enhanced-publish --if-possible --use-preid-as-tag
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
needs: ['run-checks']

.github/workflows/test.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
run-checks:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: current
20+
- run: bash .ci/runChecks.sh
21+
22+
test:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: current
29+
- run: npm ci
30+
- run: npm run build
31+
- run: npm run test

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
node_modules
22
dist
3-
.vscode
43
reports
54
.nyc_output
65
.DS_Store

0 commit comments

Comments
 (0)