@itcase/config 1.0.74 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lint-staged/index.js +3 -2
- package/lint-staged-ts/index.js +13 -0
- package/package.json +4 -3
package/lint-staged/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
'*.(js|jsx|ts|tsx)':
|
|
3
|
-
'*.css':
|
|
2
|
+
'*.(js|jsx|ts|tsx)': (files) => `npx eslint --fix --color ${files.join(' ')}`,
|
|
3
|
+
'*.css': (files) =>
|
|
4
|
+
`npx stylelint --fix --color --formatter verbose ${files.join(' ')}`,
|
|
4
5
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'*.(ts|tsx)': (files) => {
|
|
3
|
+
const tsFiles = files.filter((f) => /\.(ts|tsx)$/.test(f))
|
|
4
|
+
const commands = []
|
|
5
|
+
if (tsFiles.length > 0) {
|
|
6
|
+
commands.push('tsc --noEmit --pretty')
|
|
7
|
+
}
|
|
8
|
+
commands.push(`npx eslint --fix ${files.join(' ')}`)
|
|
9
|
+
return commands
|
|
10
|
+
},
|
|
11
|
+
'*.css': (files) =>
|
|
12
|
+
`npx stylelint --fix --color --formatter verbose ${files.join(' ')}`,
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Config",
|
|
6
6
|
"engines": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"commitlint",
|
|
22
22
|
"lint-staged",
|
|
23
|
+
"lint-staged-ts",
|
|
23
24
|
"semantic-release",
|
|
24
25
|
"postcss",
|
|
25
26
|
"svgr",
|
|
@@ -76,8 +77,8 @@
|
|
|
76
77
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
77
78
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
78
79
|
"eslint": "^9.39.1",
|
|
79
|
-
"husky": "^9.1.
|
|
80
|
-
"inquirer": "^13.0.
|
|
80
|
+
"husky": "^9.1.6",
|
|
81
|
+
"inquirer": "^13.0.1",
|
|
81
82
|
"lint-staged": "^16.2.7",
|
|
82
83
|
"prettier": "^3.7.4",
|
|
83
84
|
"semantic-release": "^24.2.9",
|