Skip to content

Commit 71ecdb5

Browse files
fix: further updates for v6
1 parent c0db6d8 commit 71ecdb5

File tree

125 files changed

+1091
-1234
lines changed

Some content is hidden

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

125 files changed

+1091
-1234
lines changed

.eslintrc.json

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/cz-adapter/**/*.js"],
1818
"rules": {
1919
"functional/prefer-immutable-types": "off",
20+
"@typescript-eslint/no-explicit-any": "warn",
2021
"@typescript-eslint/no-unnecessary-condition": "off",
2122
"@typescript-eslint/restrict-plus-operands": "off"
2223
},
@@ -88,44 +89,18 @@
8889
"parserOptions": {
8990
"project": null
9091
},
91-
"extends": ["plugin:markdown/recommended", "plugin:functional/off"],
92+
"extends": [
93+
"plugin:markdown/recommended",
94+
"plugin:@typescript-eslint/disable-type-checked",
95+
"plugin:functional/off"
96+
],
9297
"rules": {
93-
"@typescript-eslint/await-thenable": "off",
9498
"@typescript-eslint/consistent-type-definitions": "off",
95-
"@typescript-eslint/dot-notation": "off",
9699
"@typescript-eslint/explicit-member-accessibility": "off",
97-
"@typescript-eslint/naming-convention": "off",
98-
"@typescript-eslint/no-confusing-void-expression": "off",
99100
"@typescript-eslint/no-empty-function": "off",
100101
"@typescript-eslint/no-explicit-any": "off",
101-
"@typescript-eslint/no-floating-promises": "off",
102-
"@typescript-eslint/no-for-in-array": "off",
103-
"@typescript-eslint/no-implied-eval": "off",
104-
"@typescript-eslint/no-misused-promises": "off",
105-
"@typescript-eslint/no-throw-literal": "off",
106-
"@typescript-eslint/no-unnecessary-condition": "off",
107-
"@typescript-eslint/no-unnecessary-type-assertion": "off",
108-
"@typescript-eslint/no-unsafe-argument": "off",
109-
"@typescript-eslint/no-unsafe-assignment": "off",
110-
"@typescript-eslint/no-unsafe-call": "off",
111-
"@typescript-eslint/no-unsafe-member-access": "off",
112-
"@typescript-eslint/no-unsafe-return": "off",
113102
"@typescript-eslint/no-unused-expressions": "off",
114103
"@typescript-eslint/no-unused-vars": "off",
115-
"@typescript-eslint/non-nullable-type-assertion-style": "off",
116-
"@typescript-eslint/prefer-includes": "off",
117-
"@typescript-eslint/prefer-nullish-coalescing": "off",
118-
"@typescript-eslint/prefer-readonly-parameter-types": "off",
119-
"@typescript-eslint/prefer-readonly": "off",
120-
"@typescript-eslint/prefer-regexp-exec": "off",
121-
"@typescript-eslint/prefer-string-starts-ends-with": "off",
122-
"@typescript-eslint/promise-function-async": "off",
123-
"@typescript-eslint/require-await": "off",
124-
"@typescript-eslint/restrict-plus-operands": "off",
125-
"@typescript-eslint/restrict-template-expressions": "off",
126-
"@typescript-eslint/strict-boolean-expressions": "off",
127-
"@typescript-eslint/switch-exhaustiveness-check": "off",
128-
"@typescript-eslint/unbound-method": "off",
129104
"import/no-unresolved": "off",
130105
"init-declarations": "off",
131106
"jsdoc/require-jsdoc": "off",

cz-adapter/engine.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import wrap from "word-wrap";
33

44
import { rules } from "~/rules";
55

6-
import type { Options } from "./options";
6+
import { type Options } from "./options";
77

88
type Answers = Readonly<{
99
type: string;
@@ -22,7 +22,7 @@ type CZ = any;
2222
* The engine.
2323
*/
2424
export default (
25-
options: Options
25+
options: Options,
2626
): { prompter: (cz: CZ, commit: (msg: string) => unknown) => void } => {
2727
return {
2828
prompter: (cz, commit) =>
@@ -47,7 +47,7 @@ function promptUser(cz: CZ, options: Options) {
4747
Object.keys(types).reduce(
4848
(longest, current) =>
4949
longest >= current.length ? longest : current.length,
50-
0
50+
0,
5151
) + 1;
5252
const typesChoices = Object.entries(types).map(([key, type]) => {
5353
const label = `${key}:`.padEnd(typesLength);
@@ -117,7 +117,7 @@ function promptUser(cz: CZ, options: Options) {
117117
message(answers: Answers) {
118118
return `Write a short, imperative tense description of the change (max ${maxSummaryLength(
119119
options,
120-
answers
120+
answers,
121121
)} chars):\n`;
122122
},
123123
default: defaultSubject,
@@ -129,7 +129,7 @@ function promptUser(cz: CZ, options: Options) {
129129
? true
130130
: `Subject length must be less than or equal to ${maxSummaryLength(
131131
options,
132-
answers
132+
answers,
133133
)} characters. Current length is ${
134134
filteredSubject.length
135135
} characters.`;
@@ -174,7 +174,7 @@ function promptUser(cz: CZ, options: Options) {
174174
*/
175175
function doCommit(
176176
commit: (msg: string) => unknown,
177-
options: Options
177+
options: Options,
178178
): (answers: Answers) => unknown {
179179
const wrapOptions = {
180180
trim: true,

knip.jsonc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "https://unpkg.com/knip@next/schema.json",
33
"entry": ["src/index.ts!", "tests/**/*.test.ts", "cz-adapter/index.ts"],
4-
"project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"]
4+
"project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"],
5+
"ignoreDependencies": [
6+
"@typescript-eslint/eslint-plugin-disable-type-checked"
7+
]
58
}

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"verify": "pnpm run lint && pnpm run type-check && pnpm run build-tests && pnpm run test-compiled && rimraf build"
7272
},
7373
"dependencies": {
74-
"@typescript-eslint/type-utils": "^6.0.0",
7574
"@typescript-eslint/utils": "^6.0.0",
7675
"deepmerge-ts": "^5.1.0",
7776
"escape-string-regexp": "^4.0.0",
@@ -100,20 +99,19 @@
10099
"@semantic-release/release-notes-generator": "11.0.4",
101100
"@types/dedent": "0.7.0",
102101
"@types/eslint": "8.44.0",
103-
"@types/json-schema": "7.0.12",
104102
"@types/node": "16.18.23",
105103
"@types/rollup-plugin-auto-external": "2.0.2",
106104
"@types/semver": "7.5.0",
107105
"@typescript-eslint/eslint-plugin": "6.0.0",
108106
"@typescript-eslint/parser": "6.0.0",
107+
"@typescript-eslint/rule-tester": "6.0.0",
109108
"ava": "5.3.1",
110109
"chalk": "4.1.2",
111110
"commitizen": "4.3.0",
112111
"conventional-commit-types": "3.0.0",
113112
"cspell": "6.31.1",
114113
"dedent": "1.0.1",
115114
"eslint": "8.44.0",
116-
"eslint-ava-rule-tester": "4.0.0",
117115
"eslint-config-prettier": "8.8.0",
118116
"eslint-doc-generator": "1.4.3",
119117
"eslint-import-resolver-typescript": "3.5.5",
@@ -123,16 +121,14 @@
123121
"eslint-plugin-import": "2.27.5",
124122
"eslint-plugin-jsdoc": "46.4.3",
125123
"eslint-plugin-markdown": "3.0.0",
126-
"eslint-plugin-node": "11.1.0",
124+
"eslint-plugin-n": "16.0.1",
127125
"eslint-plugin-optimize-regex": "1.2.1",
128126
"eslint-plugin-prettier": "5.0.0",
129127
"eslint-plugin-promise": "6.1.1",
130128
"eslint-plugin-sonarjs": "0.19.0",
131129
"eslint-plugin-unicorn": "47.0.0",
132130
"espree": "9.6.0",
133131
"husky": "8.0.3",
134-
"json-schema": "0.4.0",
135-
"jsonc-parser": "3.2.0",
136132
"knip": "2.15.5",
137133
"lint-staged": "13.2.3",
138134
"markdownlint-cli": "0.35.0",

0 commit comments

Comments
 (0)