Skip to content

Commit e64cf5f

Browse files
chore: update repo files (#597)
1 parent 44520f5 commit e64cf5f

24 files changed

+189
-637
lines changed
File renamed without changes.

.cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"softwareTerms",
2424
"typescript"
2525
],
26-
"import": ["./node_modules/@cspell/dict-cryptocurrencies/cspell-ext.json"],
26+
"import": ["@cspell/dict-cryptocurrencies/cspell-ext.json"],
2727
"ignoreRegExpList": [
2828
"/[^\\s@]+@([^\\s@]+\\.)+[^\\s@]{2,4}/",
2929
"/[A-Fa-f0-9]{6}/",

.eslintrc.json

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,45 @@
1212
"prettier"
1313
],
1414
"parserOptions": {
15-
"ecmaVersion": 10,
1615
"project": [
1716
"./tsconfig.json",
1817
"./tests/tsconfig.json",
1918
"./cz-adapter/tsconfig.json"
20-
],
21-
"sourceType": "module"
19+
]
2220
},
23-
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/**/*.cjs", "/**/*.js"],
21+
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/cz-adapter/**/*.js"],
2422
"rules": {
25-
"functional/prefer-immutable-types": "off",
26-
"import/no-relative-parent-imports": "error"
23+
"functional/prefer-immutable-types": "off"
2724
},
2825
"overrides": [
29-
// Top level files.
3026
{
31-
"files": ["./*"],
32-
"extends": ["plugin:functional/off"]
33-
},
34-
// Source files.
35-
{
36-
"files": ["./src/**/*"],
27+
"files": ["./src/configs/", "./src/index.ts"],
3728
"extends": ["plugin:eslint-plugin/recommended"],
3829
"rules": {
39-
"functional/no-expression-statements": "error"
30+
"@typescript-eslint/naming-convention": "off"
4031
}
4132
},
4233
{
43-
"files": ["./src/configs/**/*", "./src/index.ts"],
44-
"extends": ["plugin:eslint-plugin/recommended"],
34+
"files": ["./src/utils/type-guards.ts", "./src/utils/node-types.ts"],
4535
"rules": {
46-
"@typescript-eslint/naming-convention": "off"
36+
"jsdoc/require-jsdoc": "off"
4737
}
4838
},
4939
{
50-
"files": ["./src/utils/type-guards.ts", "./src/utils/node-types.ts"],
40+
"files": ["./cz-adapter/"],
5141
"rules": {
42+
"@typescript-eslint/no-unsafe-argument": "off",
43+
"@typescript-eslint/no-unsafe-assignment": "off",
44+
"@typescript-eslint/no-unsafe-call": "off",
45+
"@typescript-eslint/no-unsafe-member-access": "off",
46+
"@typescript-eslint/no-unsafe-return": "off",
5247
"jsdoc/require-jsdoc": "off"
5348
}
5449
},
5550
{
56-
"files": ["./tests/**/*", "./cz-adapter/**/*"],
51+
"files": ["**/*.test.ts"],
52+
"plugins": ["ava"],
53+
"extends": ["plugin:ava/recommended"],
5754
"rules": {
5855
"@typescript-eslint/no-unsafe-argument": "off",
5956
"@typescript-eslint/no-unsafe-assignment": "off",
@@ -64,7 +61,7 @@
6461
}
6562
},
6663
{
67-
"files": ["./typings/**/*"],
64+
"files": ["./typings/"],
6865
"extends": ["plugin:functional/off"],
6966
"rules": {
7067
"@typescript-eslint/no-unused-vars": "off",

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto eol=lf
2+
3+
*.js linguist-detectable=false
4+
*.mjs linguist-detectable=false
5+
*.cjs linguist-detectable=false
6+
/.husky/** linguist-detectable=false
7+
8+
**/tsconfig.json linguist-language=jsonc
9+
**/tsconfig.*.json linguist-language=jsonc
10+
/.lintstagedrc linguist-language=json
11+
/.vscode/*.json linguist-language=jsonc
12+
13+
/CHANGELOG.md linguist-generated
14+
15+
/docs/** linguist-documentation

.github/workflows/build-docs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build Docs
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
workflow_call:
7+
8+
jobs:
9+
build_node:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: ./.github/actions/prepare
14+
- run: pnpm run build:node
15+
- run: pnpm run build:docs
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: Lint Knip
1+
name: Build
22

33
on:
44
pull_request:
55
workflow_dispatch:
66
workflow_call:
77

88
jobs:
9-
lint_knip:
9+
build_node:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v3
1313
- uses: ./.github/actions/prepare
14-
- run: pnpm run lint:knip
14+
- run: pnpm run build:node

.github/workflows/lint-docs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint Code
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
workflow_call:
7+
8+
jobs:
9+
lint_js:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: ./.github/actions/prepare
14+
- run: pnpm run lint:eslint-docs

.github/workflows/lint-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313
- uses: ./.github/actions/prepare
14-
- run: pnpm run build
14+
- run: pnpm run build:node
1515
- run: pnpm run lint:js

.github/workflows/lint-knip-dev.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint Knip (Development)
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
workflow_call:
7+
8+
jobs:
9+
lint_knip_dev:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: ./.github/actions/prepare
14+
- run: pnpm run lint:knip:development

.github/workflows/lint-knip-prod.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint Knip (Production)
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
workflow_call:
7+
8+
jobs:
9+
lint_knip_prod:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: ./.github/actions/prepare
14+
- run: pnpm run lint:knip:production

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ concurrency:
1818
jobs:
1919
lint_js:
2020
uses: ./.github/workflows/lint-js.yml
21-
lint_knip:
22-
uses: ./.github/workflows/lint-knip.yml
21+
lint_docs:
22+
uses: ./.github/workflows/lint-docs.yml
23+
lint_knip_prod:
24+
uses: ./.github/workflows/lint-knip-prod.yml
2325
lint_markdown:
2426
uses: ./.github/workflows/lint-markdown.yml
2527
lint_spelling:
@@ -34,7 +36,8 @@ jobs:
3436
release:
3537
needs:
3638
- lint_js
37-
- lint_knip
39+
- lint_docs
40+
- lint_knip_prod
3841
- lint_markdown
3942
- lint_spelling
4043
- lint_prettier
@@ -52,7 +55,7 @@ jobs:
5255
run: pnpm run build
5356

5457
- name: Release
55-
run: pnpm semantic-release
58+
run: pnpm run release
5659
env:
5760
GITHUB_TOKEN: ${{ github.token }}
5861
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- uses: ./.github/actions/prepare
3131

3232
- name: Build
33-
run: pnpm build
33+
run: pnpm run build:node
3434

3535
- name: Compile Tests
3636
run: pnpm run build-tests
File renamed without changes.

cz-adapter/engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ function filterSubject(options: Options) {
287287
m_subject.charAt(0).toLowerCase() +
288288
m_subject.slice(1, m_subject.length);
289289
}
290-
// eslint-disable-next-line functional/no-loop-statements
290+
291291
while (m_subject.endsWith(".")) {
292292
m_subject = m_subject.slice(0, -1);
293293
}

knip.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://unpkg.com/knip@next/schema.json",
3-
"entry": ["src/**/index.ts!"],
4-
"project": ["src/**/*.ts!", "!tests/**/*.ts!", "!**/*.test.ts!"]
3+
"entry": ["src/index.ts!", "tests/**/*.test.ts", "cz-adapter/index.ts"],
4+
"project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"]
55
}

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
"lint:eslint-docs": "eslint-doc-generator --check",
5555
"lint:js": "eslint .",
5656
"lint:js-fix": "eslint . --fix",
57-
"lint:knip": "knip --config knip.jsonc --production --exclude exports",
57+
"lint:knip": "pnpm run lint:knip:development && pnpm run lint:knip:production",
58+
"lint:knip:development": "knip --exclude exports,nsExports,types,nsTypes",
59+
"lint:knip:production": "knip --production --strict --exclude exports,nsExports,types,nsTypes",
5860
"lint:md": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
5961
"lint:prettier": "prettier \"**/*\" --ignore-unknown --list-different",
6062
"lint:prettier-fix": "prettier \"**/*\" --ignore-unknown --write",
@@ -84,7 +86,7 @@
8486
"@cspell/dict-cryptocurrencies": "3.0.1",
8587
"@google/semantic-release-replace-plugin": "1.2.0",
8688
"@istanbuljs/nyc-config-typescript": "1.0.2",
87-
"@rebeccastevens/eslint-config": "1.5.3",
89+
"@rebeccastevens/eslint-config": "1.6.6",
8890
"@rollup/plugin-commonjs": "24.0.1",
8991
"@rollup/plugin-json": "6.0.0",
9092
"@rollup/plugin-node-resolve": "15.0.1",
@@ -97,7 +99,6 @@
9799
"@semantic-release/release-notes-generator": "10.0.3",
98100
"@types/dedent": "0.7.0",
99101
"@types/eslint": "8.21.3",
100-
"@types/estree": "1.0.0",
101102
"@types/json-schema": "7.0.11",
102103
"@types/node": "16.18.16",
103104
"@types/rollup-plugin-auto-external": "2.0.2",
@@ -106,14 +107,13 @@
106107
"@typescript-eslint/parser": "5.56.0",
107108
"ava": "5.2.0",
108109
"chalk": "4.1.2",
109-
"codecov": "3.8.2",
110110
"commitizen": "4.3.0",
111111
"conventional-commit-types": "3.0.0",
112112
"cspell": "6.30.2",
113113
"dedent": "0.7.0",
114114
"eslint": "8.36.0",
115115
"eslint-ava-rule-tester": "4.0.0",
116-
"eslint-config-prettier": "8.7.0",
116+
"eslint-config-prettier": "8.8.0",
117117
"eslint-doc-generator": "1.4.3",
118118
"eslint-import-resolver-typescript": "3.5.3",
119119
"eslint-plugin-ava": "14.0.0",
@@ -126,17 +126,17 @@
126126
"eslint-plugin-optimize-regex": "1.2.1",
127127
"eslint-plugin-prettier": "4.2.1",
128128
"eslint-plugin-promise": "6.1.1",
129-
"eslint-plugin-sonarjs": "0.18.0",
129+
"eslint-plugin-sonarjs": "0.19.0",
130130
"eslint-plugin-unicorn": "46.0.0",
131131
"espree": "9.5.0",
132132
"husky": "8.0.3",
133133
"json-schema": "0.4.0",
134134
"jsonc-parser": "3.2.0",
135-
"knip": "1.16.0",
135+
"knip": "2.0.0-beta.1",
136136
"lint-staged": "13.2.0",
137137
"markdownlint-cli": "0.33.0",
138138
"nyc": "15.1.0",
139-
"prettier": "2.8.4",
139+
"prettier": "2.8.5",
140140
"prettier-plugin-packagejson": "2.4.3",
141141
"rimraf": "4.4.0",
142142
"rollup": "3.20.0",

0 commit comments

Comments
 (0)