Skip to content

Commit a6ea994

Browse files
committed
chore: sync config files
- https://gist.github.com/unicornware/1ecc41e7407de9d8c9e90e088cd88d6d Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent d174c50 commit a6ea994

50 files changed

Lines changed: 1314 additions & 1284 deletions

Some content is hidden

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

.cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@
1313
"failFast": false,
1414
"flagWords": [],
1515
"ignorePaths": [
16+
"**/*.log",
1617
"**/*.snap",
1718
"**/.*ignore",
1819
"**/.gitconfig",
1920
"**/CHANGELOG.md",
2021
"**/LICENSE.md",
2122
"**/RELEASE_NOTES.md",
2223
".cspell.json",
24+
".dictionary.txt",
2325
".git/",
2426
".husky/_/",
2527
".vscode/settings.json",
2628
".yarn/",
29+
"dist/",
2730
"patches/",
2831
"yarn.lock"
2932
],

.dictionary.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,15 @@ larsgw
2020
lcov
2121
lintstagedrc
2222
memfs
23-
micnncim
2423
mkbuild
2524
mlly
2625
nocheck
2726
npmrc
2827
nvmrc
29-
ohmyzsh
3028
pathe
3129
pkgs
32-
pnpm
3330
preid
34-
syncer
31+
tscu
3532
unstub
3633
vates
3734
yarnrc

.env.zsh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# References:
44
#
55
# - https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/dotenv
6+
# - https://homebrew-file.readthedocs.io/en/latest/usage.html
67

7-
[ -f $PWD/.env.local ] && source $PWD/.env.local
8+
[ -f $PWD/.env.repo ] && source $PWD/.env.repo
9+
HOMEBREW_BREWFILE=./Brewfile
810
NODE_NO_WARNINGS=1

.eslintrc.base.cjs

Lines changed: 85 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,12 @@ const config = {
4141
Chai: 'readonly',
4242
Console: 'readonly',
4343
JSX: jsx ? 'readonly' : false,
44-
LoadHook: 'readonly',
45-
LoadHookContext: 'readonly',
46-
LoadHookResult: 'readonly',
47-
LoaderHookFormat: 'readonly',
48-
NodeJS: 'readonly',
49-
ResolveHook: 'readonly',
50-
ResolveHookContext: 'readonly',
51-
ResolveHookResult: 'readonly'
44+
NodeJS: 'readonly'
5245
},
5346
parser: '@typescript-eslint/parser',
5447
parserOptions: {
5548
extraFileExtensions: [],
56-
project: './tsconfig.json',
49+
project: ['./tsconfig.json', 'tsconfig.cjs.json'],
5750
sourceType: require('./package.json').type,
5851
tsconfigRootDir: process.cwd(),
5952
warnOnUnsupportedTypeScriptVersion: true
@@ -147,23 +140,15 @@ const config = {
147140
default: {
148141
memberTypes: [
149142
'static-field',
150-
'decorated-field',
151143
'instance-field',
152-
'abstract-field',
153144
'constructor',
154145
'signature',
155146
'static-get',
156147
'static-set',
157148
'static-method',
158-
'decorated-get',
159-
'decorated-set',
160-
'decorated-method',
161149
'instance-get',
162150
'instance-set',
163-
'instance-method',
164-
'abstract-get',
165-
'abstract-set',
166-
'abstract-method'
151+
'instance-method'
167152
],
168153
order: 'alphabetically'
169154
}
@@ -431,7 +416,13 @@ const config = {
431416
'jsdoc/check-tag-names': [
432417
1,
433418
{
434-
definedTags: ['experimental', 'next', 'visibleName'],
419+
definedTags: [
420+
'experimental',
421+
'maximum',
422+
'minimum',
423+
'next',
424+
'visibleName'
425+
],
435426
jsxTags: false
436427
}
437428
],
@@ -579,6 +570,7 @@ const config = {
579570
'no-empty': [2, { allowEmptyCatch: true }],
580571
'no-empty-function': 0,
581572
'no-ex-assign': 0,
573+
'no-extra-parens': 0,
582574
'no-implied-eval': 0,
583575
'no-invalid-this': 0,
584576
'no-loop-func': 0,
@@ -688,7 +680,7 @@ const config = {
688680
],
689681
'unicorn/new-for-builtins': 2,
690682
'unicorn/no-abusive-eslint-disable': 2,
691-
'unicorn/no-array-callback-reference': 2,
683+
'unicorn/no-array-callback-reference': 0,
692684
'unicorn/no-array-for-each': 2,
693685
'unicorn/no-array-method-this-argument': 2,
694686
'unicorn/no-array-push-push': 2,
@@ -717,7 +709,7 @@ const config = {
717709
'unicorn/no-static-only-class': 0,
718710
'unicorn/no-thenable': 2,
719711
'unicorn/no-this-assignment': 2,
720-
'unicorn/no-unreadable-array-destructuring': 2,
712+
'unicorn/no-unreadable-array-destructuring': 0,
721713
'unicorn/no-unsafe-regex': 0,
722714
'unicorn/no-unused-properties': 2,
723715
'unicorn/no-useless-fallback-in-spread': 2,
@@ -766,14 +758,7 @@ const config = {
766758
'unicorn/relative-url-style': [2, 'never'],
767759
'unicorn/require-array-join-separator': 2,
768760
'unicorn/require-number-to-fixed-digits-argument': 2,
769-
'unicorn/string-content': [
770-
2,
771-
{
772-
patterns: {
773-
'^http:\\/\\/': '^https:\\/\\/'
774-
}
775-
}
776-
],
761+
'unicorn/string-content': [2, { patterns: {} }],
777762
'unicorn/template-indent': [2, { indent: 2 }],
778763
'unicorn/text-encoding-identifier-case': 2,
779764
'unicorn/throw-new-error': 2
@@ -822,8 +807,9 @@ const config = {
822807
}
823808
},
824809
{
825-
files: '**/__mocks__/*.ts',
810+
files: '**/__mocks__/**/*.ts',
826811
rules: {
812+
'@typescript-eslint/no-unused-vars': 0,
827813
'@typescript-eslint/require-await': 0
828814
}
829815
},
@@ -853,6 +839,7 @@ const config = {
853839
'@typescript-eslint/no-empty-function': 0,
854840
'@typescript-eslint/no-unused-expressions': 0,
855841
'@typescript-eslint/prefer-ts-expect-error': 0,
842+
'@typescript-eslint/require-await': 0,
856843
'@typescript-eslint/restrict-template-expressions': 0,
857844
'@typescript-eslint/unbound-method': 0,
858845
'chai-expect/missing-assertion': 2,
@@ -886,7 +873,8 @@ const config = {
886873
expectTypeOf: true
887874
},
888875
rules: {
889-
'@typescript-eslint/ban-types': 0
876+
'@typescript-eslint/ban-types': 0,
877+
'@typescript-eslint/no-redundant-type-constituents': 0
890878
}
891879
},
892880
{
@@ -905,7 +893,7 @@ const config = {
905893
}
906894
},
907895
{
908-
files: '**/*.+(json|jsonc)',
896+
files: '**/*.+(json|json5|jsonc)',
909897
parser: 'jsonc-eslint-parser',
910898
plugins: ['jsonc'],
911899
rules: {
@@ -980,7 +968,7 @@ const config = {
980968
}
981969
},
982970
{
983-
files: ['**/*.jsonc', 'tsconfig*.json'],
971+
files: ['**/*.+(json5|jsonc)', 'tsconfig*.json'],
984972
rules: {
985973
'jsonc/no-comments': 0
986974
}
@@ -991,6 +979,57 @@ const config = {
991979
plugins: ['markdown', 'markdownlint'],
992980
processor: 'markdown/markdown'
993981
},
982+
{
983+
files: '**/*.md/*.+(cjs|cts|js|jsx|mjs|mts|ts|tsx)',
984+
parserOptions: { project: false },
985+
rules: {
986+
'@typescript-eslint/await-thenable': 0,
987+
'@typescript-eslint/consistent-type-exports': 0,
988+
'@typescript-eslint/dot-notation': 0,
989+
'@typescript-eslint/naming-convention': 0,
990+
'@typescript-eslint/no-base-to-string': 0,
991+
'@typescript-eslint/no-confusing-void-expression': 0,
992+
'@typescript-eslint/no-floating-promises': 0,
993+
'@typescript-eslint/no-for-in-array': 0,
994+
'@typescript-eslint/no-implied-eval': 0,
995+
'@typescript-eslint/no-meaningless-void-operator': 0,
996+
'@typescript-eslint/no-misused-promises': 0,
997+
'@typescript-eslint/no-mixed-enums': 0,
998+
'@typescript-eslint/no-redundant-type-constituents': 0,
999+
'@typescript-eslint/no-throw-literal': 0,
1000+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 0,
1001+
'@typescript-eslint/no-unnecessary-condition': 0,
1002+
'@typescript-eslint/no-unnecessary-qualifier': 0,
1003+
'@typescript-eslint/no-unnecessary-type-arguments': 0,
1004+
'@typescript-eslint/no-unnecessary-type-assertion': 0,
1005+
'@typescript-eslint/no-unsafe-argument': 0,
1006+
'@typescript-eslint/no-unsafe-assignment': 0,
1007+
'@typescript-eslint/no-unsafe-call': 0,
1008+
'@typescript-eslint/no-unsafe-member-access': 0,
1009+
'@typescript-eslint/no-unsafe-return': 0,
1010+
'@typescript-eslint/no-unused-expressions': 0,
1011+
'@typescript-eslint/non-nullable-type-assertion-style': 0,
1012+
'@typescript-eslint/prefer-includes': 0,
1013+
'@typescript-eslint/prefer-nullish-coalescing': 0,
1014+
'@typescript-eslint/prefer-readonly': 0,
1015+
'@typescript-eslint/prefer-readonly-parameter-types': 0,
1016+
'@typescript-eslint/prefer-reduce-type-parameter': 0,
1017+
'@typescript-eslint/prefer-regexp-exec': 0,
1018+
'@typescript-eslint/prefer-return-this-type': 0,
1019+
'@typescript-eslint/prefer-string-starts-ends-with': 0,
1020+
'@typescript-eslint/promise-function-async': 0,
1021+
'@typescript-eslint/require-array-sort-compare': 0,
1022+
'@typescript-eslint/require-await': 0,
1023+
'@typescript-eslint/restrict-plus-operands': 0,
1024+
'@typescript-eslint/restrict-template-expressions': 0,
1025+
'@typescript-eslint/return-await': 0,
1026+
'@typescript-eslint/strict-boolean-expressions': 0,
1027+
'@typescript-eslint/switch-exhaustiveness-check': 0,
1028+
'@typescript-eslint/unbound-method': 0,
1029+
'jsdoc/require-file-overview': 0,
1030+
'unicorn/filename-case': 0
1031+
}
1032+
},
9941033
{
9951034
files: '**/*.yml',
9961035
parser: 'yaml-eslint-parser',
@@ -1095,7 +1134,7 @@ const config = {
10951134
}
10961135
},
10971136
{
1098-
files: ['.github/workflows/no-response-handler.yml', '.yarnrc.yml'],
1137+
files: ['.github/workflows/*.yml', '.yarnrc.yml'],
10991138
rules: {
11001139
'yml/key-name-casing': 0
11011140
}
@@ -1109,9 +1148,13 @@ const config = {
11091148
settings: {
11101149
jsdoc: {
11111150
augmentsExtendsReplacesDocs: true,
1151+
ignoreInternal: false,
11121152
ignorePrivate: false,
11131153
implementsReplacesDocs: true,
11141154
overrideReplacesDocs: true,
1155+
preferredTypes: {
1156+
'*': false
1157+
},
11151158
structuredTags: {
11161159
const: {
11171160
name: 'namepath-defining',
@@ -1132,10 +1175,18 @@ const config = {
11321175
name: 'namepath-defining',
11331176
required: ['type']
11341177
},
1178+
maximum: {
1179+
name: 'text',
1180+
required: ['name']
1181+
},
11351182
member: {
11361183
name: 'namepath-defining',
11371184
required: ['name', 'type']
11381185
},
1186+
minimum: {
1187+
name: 'text',
1188+
required: ['name']
1189+
},
11391190
next: {
11401191
name: 'namepath-defining',
11411192
required: ['type']

.eslintrc.cjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
*/
1111
const config = {
1212
extends: ['./.eslintrc.base.cjs'],
13-
overrides: [
14-
...require('./.eslintrc.base.cjs').overrides,
15-
{
16-
files: ['src/toggle.ts'],
17-
rules: {
18-
'unicorn/prefer-json-parse-buffer': 0
19-
}
20-
}
21-
],
2213
root: true
2314
}
2415

.github/.gitconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pou = "!f() { git push origin --no-verify -u $@; }; f"
3434
restart = "!f() { rm -rf .git; echo \"removed .git directory.\"; }; f"
3535

3636
# create new local repo and perform initial commit
37-
setup = "!f() { git init && git config branch.autosetuprebase always && git config core.ignorecase false && git config pull.rebase true && git config rebase.autoStash true && git ac \"initial commit\"; }; f"
37+
setup = "!f() { git init && git config branch.autosetuprebase always && git config core.ignorecase false && git config pull.rebase true && git config rebase.autoStash true && git ac \"chore: initial commit\"; }; f"
3838

3939
# undo last commit
4040
ulc = "!f() { git reset head~1 --soft; }; f"

.github/workflows/add-to-project.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
#
55
# References:
66
#
7+
# - https://docs.github.com/actions/learn-github-actions/contexts
8+
# - https://docs.github.com/actions/learn-github-actions/expressions
79
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#issues
810
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
11+
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#issues
12+
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
913
# - https://github.com/actions/add-to-project
1014

1115
---
@@ -22,8 +26,8 @@ jobs:
2226
add-to-project:
2327
runs-on: ubuntu-latest
2428
steps:
25-
- id: add
26-
name: Add ${{ format('#{0}', github.event.number || github.event.issue.number) }} to project
29+
- id: add-item
30+
name: Add ${{ format('#{0}', github.event.number) }} to project
2731
uses: actions/add-to-project@v0.5.0
2832
with:
2933
github-token: ${{ secrets.PAT_REPO }}

.github/workflows/approve-pr.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
# Automatically approve a pull request when a review is requested from @flexdevelopment by certain
44
# users.
55
#
6-
#
76
# References:
87
#
98
# - https://cli.github.com/manual/gh_pr_review
9+
# - https://docs.github.com/actions/learn-github-actions/contexts
1010
# - https://docs.github.com/actions/learn-github-actions/expressions
1111
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
12+
# - https://docs.github.com/actions/using-workflows/using-github-cli-in-workflows
13+
# - https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions
14+
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
1215
# - https://github.com/actions/checkout
1316
# - https://github.com/dependabot/fetch-metadata
1417
# - https://github.com/hmarr/debug-action
@@ -40,11 +43,14 @@ jobs:
4043
with:
4144
persist-credentials: false
4245
ref: ${{ github.head_ref }}
46+
- id: requested-reviewers
47+
name: Get requested reviewers
48+
run: |
49+
echo "result=${{ join(github.event.pull_request.requested_reviewers.*.login, ',') }}" >>$GITHUB_OUTPUT
4350
- id: approve
4451
name: Approve pull request
4552
if: |
46-
(github.event.requested_reviewer.login == 'flexdevelopment'
47-
|| contains(join(github.event.requested_reviewers.*.login, ','), 'flexdevelopment'))
53+
contains(steps.requested-reviewers.outputs.result, 'flexdevelopment')
4854
&& (github.actor == 'dependabot[bot]' || github.actor == 'unicornware')
4955
&& steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'
5056
run: gh pr review ${{ github.event.number }} --approve --body 'lgtm 👍🏾'

0 commit comments

Comments
 (0)