Skip to content

refactor: add define-config function #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ on:
branches:
- main
paths:
- index.d.ts
- index.js
- index.ts
- package.json
push:
branches:
- main
paths:
- index.d.ts
- index.js
- index.ts
- package.json

Expand Down
14 changes: 14 additions & 0 deletions define-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { UserConfig } from '@commitlint/types';

/**
* Define an Commitlint config.
*
* @param {object} config Commitlint config.
*
* @returns Commitlint config.
*/
const defineConfig = (config: UserConfig): UserConfig => {
return config;
};

export { defineConfig };
15 changes: 1 addition & 14 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
import type { UserConfig } from '@commitlint/types';

/**
* Define an Commitlint config.
*
* @param {object} config Commitlint config.
*
* @returns Commitlint config.
*/
const defineConfig = (config: UserConfig): UserConfig => {
return config;
};

export { defineConfig };
const n=e=>e;export{n as defineConfig};
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
'**/*': 'prettier --write',
'index.ts': 'eslint --fix',
'define-config.ts': 'eslint --fix',
};
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
"type": "module",
"types": "index.d.ts",
"exports": {
".": "./index.js"
".": "./index.js",
"./index.ts": "./index.ts"
},
"files": [
"index.d.ts",
"index.js"
"index.js",
"index.ts"
],
"scripts": {
"init": "pnpm i && husky && git submodule update",
Expand All @@ -54,22 +56,22 @@
"lint:editorconfig": "editorconfig-checker",
"lint:formatting": "prettier . --check",
"lint:md": "remark . --quiet",
"lint:ts": "eslint index.ts --fix",
"lint:ts": "eslint define-config.ts --fix",
"prettify": "prettier . --write",
"commit": "cz"
},
"dependencies": {
"@commitlint/types": "^19.0.3"
},
"devDependencies": {
"@archoleat/semantic-release-define-config": "^1.1.0",
"@archoleat/semantic-release-define-config": "^1.1.1",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@rollup/plugin-typescript": "^11.1.6",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitest/coverage-v8": "^1.4.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
Expand All @@ -80,7 +82,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^51.0.1",
"globals": "^14.0.0",
"globals": "^15.0.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
Expand All @@ -89,7 +91,7 @@
"remark-preset-lint-consistent": "^5.1.2",
"remark-preset-lint-markdown-style-guide": "^5.1.3",
"remark-preset-lint-recommended": "^6.1.3",
"rollup": "^4.13.0",
"rollup": "^4.13.1",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.1",
"semantic-release": "^23.0.6",
Expand Down
Loading