Skip to content

Commit

Permalink
fix: further updates for v6
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Jul 14, 2023
1 parent c0db6d8 commit 71ecdb5
Show file tree
Hide file tree
Showing 125 changed files with 1,091 additions and 1,234 deletions.
37 changes: 6 additions & 31 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"ignorePatterns": ["/build/", "/coverage/", "/lib/", "/cz-adapter/**/*.js"],
"rules": {
"functional/prefer-immutable-types": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/restrict-plus-operands": "off"
},
Expand Down Expand Up @@ -88,44 +89,18 @@
"parserOptions": {
"project": null
},
"extends": ["plugin:markdown/recommended", "plugin:functional/off"],
"extends": [
"plugin:markdown/recommended",
"plugin:@typescript-eslint/disable-type-checked",
"plugin:functional/off"
],
"rules": {
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-for-in-array": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/switch-exhaustiveness-check": "off",
"@typescript-eslint/unbound-method": "off",
"import/no-unresolved": "off",
"init-declarations": "off",
"jsdoc/require-jsdoc": "off",
Expand Down
12 changes: 6 additions & 6 deletions cz-adapter/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import wrap from "word-wrap";

import { rules } from "~/rules";

import type { Options } from "./options";
import { type Options } from "./options";

type Answers = Readonly<{
type: string;
Expand All @@ -22,7 +22,7 @@ type CZ = any;
* The engine.
*/
export default (
options: Options
options: Options,
): { prompter: (cz: CZ, commit: (msg: string) => unknown) => void } => {
return {
prompter: (cz, commit) =>
Expand All @@ -47,7 +47,7 @@ function promptUser(cz: CZ, options: Options) {
Object.keys(types).reduce(
(longest, current) =>
longest >= current.length ? longest : current.length,
0
0,
) + 1;
const typesChoices = Object.entries(types).map(([key, type]) => {
const label = `${key}:`.padEnd(typesLength);
Expand Down Expand Up @@ -117,7 +117,7 @@ function promptUser(cz: CZ, options: Options) {
message(answers: Answers) {
return `Write a short, imperative tense description of the change (max ${maxSummaryLength(
options,
answers
answers,
)} chars):\n`;
},
default: defaultSubject,
Expand All @@ -129,7 +129,7 @@ function promptUser(cz: CZ, options: Options) {
? true
: `Subject length must be less than or equal to ${maxSummaryLength(
options,
answers
answers,
)} characters. Current length is ${
filteredSubject.length
} characters.`;
Expand Down Expand Up @@ -174,7 +174,7 @@ function promptUser(cz: CZ, options: Options) {
*/
function doCommit(
commit: (msg: string) => unknown,
options: Options
options: Options,
): (answers: Answers) => unknown {
const wrapOptions = {
trim: true,
Expand Down
5 changes: 4 additions & 1 deletion knip.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "https://unpkg.com/knip@next/schema.json",
"entry": ["src/index.ts!", "tests/**/*.test.ts", "cz-adapter/index.ts"],
"project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"]
"project": ["src/**/*.ts!", "tests/**/*.ts", "cz-adapter/**/*.ts"],
"ignoreDependencies": [
"@typescript-eslint/eslint-plugin-disable-type-checked"
]
}
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"verify": "pnpm run lint && pnpm run type-check && pnpm run build-tests && pnpm run test-compiled && rimraf build"
},
"dependencies": {
"@typescript-eslint/type-utils": "^6.0.0",
"@typescript-eslint/utils": "^6.0.0",
"deepmerge-ts": "^5.1.0",
"escape-string-regexp": "^4.0.0",
Expand Down Expand Up @@ -100,20 +99,19 @@
"@semantic-release/release-notes-generator": "11.0.4",
"@types/dedent": "0.7.0",
"@types/eslint": "8.44.0",
"@types/json-schema": "7.0.12",
"@types/node": "16.18.23",
"@types/rollup-plugin-auto-external": "2.0.2",
"@types/semver": "7.5.0",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"@typescript-eslint/rule-tester": "6.0.0",
"ava": "5.3.1",
"chalk": "4.1.2",
"commitizen": "4.3.0",
"conventional-commit-types": "3.0.0",
"cspell": "6.31.1",
"dedent": "1.0.1",
"eslint": "8.44.0",
"eslint-ava-rule-tester": "4.0.0",
"eslint-config-prettier": "8.8.0",
"eslint-doc-generator": "1.4.3",
"eslint-import-resolver-typescript": "3.5.5",
Expand All @@ -123,16 +121,14 @@
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "46.4.3",
"eslint-plugin-markdown": "3.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-n": "16.0.1",
"eslint-plugin-optimize-regex": "1.2.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-sonarjs": "0.19.0",
"eslint-plugin-unicorn": "47.0.0",
"espree": "9.6.0",
"husky": "8.0.3",
"json-schema": "0.4.0",
"jsonc-parser": "3.2.0",
"knip": "2.15.5",
"lint-staged": "13.2.3",
"markdownlint-cli": "0.35.0",
Expand Down

0 comments on commit 71ecdb5

Please sign in to comment.