@naturalcycles/dev-lib 20.44.0 → 20.44.1
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/cfg/_cnst.d.ts +0 -1
- package/cfg/_cnst.js +2 -5
- package/cfg/lint-staged.config.js +13 -4
- package/package.json +2 -2
package/cfg/_cnst.d.ts
CHANGED
package/cfg/_cnst.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
const prettierDirs = ['src,scripts,e2e,docs,cfg,resources,.github,public,static']
|
|
2
|
-
// ts,tsx,css,scss excluded, cause they need to run in special order (overlap between >1 tool):
|
|
3
|
-
const prettierExtensionsExclusive = 'js,jsx,json,md,graphql,yml,yaml,html'
|
|
4
2
|
// everything that prettier supports:
|
|
5
3
|
const prettierExtensionsAll =
|
|
6
4
|
'ts,tsx,cts,mts,css,scss,js,jsx,cjs,mjs,json,md,graphql,yml,yaml,html,vue'
|
|
7
|
-
const eslintExtensions = 'ts,tsx,
|
|
5
|
+
const eslintExtensions = 'ts,tsx,html'
|
|
8
6
|
const stylelintExtensions = 'css,scss'
|
|
9
|
-
const lintExclude = ['
|
|
7
|
+
const lintExclude = ['**/__exclude/**']
|
|
10
8
|
const minActionlintVersion = '1.7.12'
|
|
11
9
|
|
|
12
10
|
export {
|
|
13
11
|
prettierDirs,
|
|
14
|
-
prettierExtensionsExclusive,
|
|
15
12
|
prettierExtensionsAll,
|
|
16
13
|
eslintExtensions,
|
|
17
14
|
stylelintExtensions,
|
|
@@ -81,10 +81,14 @@ const linters = {
|
|
|
81
81
|
export function runOxlintEslintStylelintOxfmt(match) {
|
|
82
82
|
const filesList = getFilesList(match)
|
|
83
83
|
if (!filesList) return []
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
const eslintFilesList = eslintCmd && getEslintFilesList(match)
|
|
85
|
+
|
|
86
|
+
return [
|
|
87
|
+
oxlintCmd && `${oxlintCmd} ${filesList}`,
|
|
88
|
+
eslintFilesList && `${eslintCmd} ${eslintFilesList}`,
|
|
89
|
+
stylelintCmd && `${stylelintCmd} ${filesList}`,
|
|
90
|
+
oxfmtCmd && `${oxfmtCmd} ${filesList}`,
|
|
91
|
+
].filter(Boolean)
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
export function runOxlintOxfmt(match) {
|
|
@@ -153,6 +157,11 @@ function getFilesList(match) {
|
|
|
153
157
|
return match.filter(f => !isExcluded(f)).join(' ')
|
|
154
158
|
}
|
|
155
159
|
|
|
160
|
+
function getEslintFilesList(match) {
|
|
161
|
+
const isIncluded = picomatch('./{src,scripts,e2e}/**/*.{ts,tsx,html}')
|
|
162
|
+
return match.filter(f => isIncluded(f)).join(' ')
|
|
163
|
+
}
|
|
164
|
+
|
|
156
165
|
function canRunBinary(name) {
|
|
157
166
|
try {
|
|
158
167
|
execSync(`which ${name}`)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "20.44.
|
|
4
|
+
"version": "20.44.1",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@naturalcycles/js-lib": "^15",
|
|
7
7
|
"@naturalcycles/nodejs-lib": "^15",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^25",
|
|
50
50
|
"@types/prompts": "^2",
|
|
51
|
-
"@typescript/native-preview": "
|
|
51
|
+
"@typescript/native-preview": "beta"
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
54
54
|
"./cfg/": "./cfg/",
|