Skip to content

Commit dbb1da2

Browse files
refactor: replace yml config files with js
1 parent ae6184b commit dbb1da2

7 files changed

Lines changed: 37 additions & 21 deletions

File tree

.commitlintrc.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.lintstagedrc.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.prettierrc.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

commitlint.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @see https://commitlint.js.org/reference/configuration.html
3+
* @type { import('@commitlint/types').UserConfig }
4+
*/
5+
const config = {
6+
extends: ["@commitlint/config-conventional"],
7+
rules: {
8+
"header-max-length": [2, "always", 100],
9+
},
10+
};
11+
12+
export default config;

lint-staged.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#typescript
3+
* @type { import('lint-staged').Configuration }
4+
*/
5+
const config = {
6+
"package.json": ["npx sort-package-json"],
7+
"*": ["eslint --fix --cache", "npx prettier --write --ignore-unknown"],
8+
};
9+
10+
export default config;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
},
5757
"devDependencies": {
5858
"@aws-sdk/client-dynamodb": "^3.214.0",
59-
"@commitlint/cli": "^17.4.2",
60-
"@commitlint/config-conventional": "^17.4.2",
61-
"@commitlint/prompt-cli": "^17.4.2",
59+
"@commitlint/cli": "^20.5.0",
60+
"@commitlint/config-conventional": "^20.5.0",
61+
"@commitlint/prompt-cli": "^20.5.0",
6262
"@types/jest": "^29.2.5",
6363
"@types/node": "^24.12.0",
6464
"colors": "^1.4.0",

prettier.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @see https://prettier.io/docs/configuration
3+
* @type { import('prettier').Config }
4+
*/
5+
const config = {
6+
printWidth: 120,
7+
singleQuote: true,
8+
semi: false,
9+
trailingComma: "all",
10+
};
11+
12+
export default config;

0 commit comments

Comments
 (0)