@naturalcycles/dev-lib 15.14.0 → 15.16.0
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.js +2 -7
- package/cfg/biome.jsonc +1 -1
- package/cfg/lint-staged.config.js +3 -3
- package/dist/lint.util.js +14 -4
- package/package.json +2 -2
package/cfg/_cnst.js
CHANGED
|
@@ -5,12 +5,7 @@ module.exports = {
|
|
|
5
5
|
// ts,tsx,css,scss excluded, cause they need to run in special order (overlap between >1 tool):
|
|
6
6
|
prettierExtensionsExclusive: 'js,jsx,json,md,graphql,yml,yaml,html',
|
|
7
7
|
// everything that prettier supports:
|
|
8
|
-
prettierExtensionsAll: 'ts,tsx,css,scss,js,jsx,json,md,graphql,yml,yaml,html,vue',
|
|
8
|
+
prettierExtensionsAll: 'ts,tsx,cts,mts,css,scss,js,jsx,cjs,mjs,json,md,graphql,yml,yaml,html,vue',
|
|
9
9
|
stylelintExtensions: 'css,scss',
|
|
10
|
-
lintExclude: [
|
|
11
|
-
'./**/__exclude/**',
|
|
12
|
-
'./docs/.vitepress/dist/**',
|
|
13
|
-
'./docs/.vitepress/cache/**',
|
|
14
|
-
'./CHANGELOG.md',
|
|
15
|
-
],
|
|
10
|
+
lintExclude: ['./**/__exclude/**', './**/dist/**', './**/cache/**', './CHANGELOG.md'],
|
|
16
11
|
}
|
package/cfg/biome.jsonc
CHANGED
|
@@ -60,7 +60,7 @@ if (!stylelintCmd) {
|
|
|
60
60
|
|
|
61
61
|
const linters = {
|
|
62
62
|
// *.{ts,tsx,vue} files: biome, eslint, prettier
|
|
63
|
-
'./src/**/*.{ts,tsx,vue}': match => {
|
|
63
|
+
'./src/**/*.{ts,tsx,cts,mts,vue}': match => {
|
|
64
64
|
const filesList = getFilesList(match)
|
|
65
65
|
if (!filesList) return []
|
|
66
66
|
return [
|
|
@@ -141,7 +141,7 @@ if (fs.existsSync(`./scripts`)) {
|
|
|
141
141
|
)
|
|
142
142
|
Object.assign(linters, {
|
|
143
143
|
// biome, eslint, Prettier
|
|
144
|
-
'./scripts/**/*.{ts,tsx}': match => {
|
|
144
|
+
'./scripts/**/*.{ts,tsx,cts,mts}': match => {
|
|
145
145
|
const filesList = getFilesList(match)
|
|
146
146
|
if (!filesList) return []
|
|
147
147
|
return [
|
|
@@ -164,7 +164,7 @@ if (fs.existsSync(`./e2e`)) {
|
|
|
164
164
|
|
|
165
165
|
Object.assign(linters, {
|
|
166
166
|
// biome, eslint, Prettier
|
|
167
|
-
'./e2e/**/*.{ts,tsx}': match => {
|
|
167
|
+
'./e2e/**/*.{ts,tsx,cts,mts}': match => {
|
|
168
168
|
const filesList = getFilesList(match)
|
|
169
169
|
if (!filesList) return []
|
|
170
170
|
return [
|
package/dist/lint.util.js
CHANGED
|
@@ -87,9 +87,19 @@ async function eslintAll(opt) {
|
|
|
87
87
|
...opt,
|
|
88
88
|
};
|
|
89
89
|
const extensions = ext.split(',');
|
|
90
|
-
const eslintConfigPathRoot = ['./eslint.config.js'].find(p => node_fs_1.default.existsSync(p));
|
|
91
|
-
const eslintConfigPathScripts = [
|
|
92
|
-
|
|
90
|
+
const eslintConfigPathRoot = ['./eslint.config.js', './eslint.config.cjs'].find(p => node_fs_1.default.existsSync(p));
|
|
91
|
+
const eslintConfigPathScripts = [
|
|
92
|
+
'./scripts/eslint.config.js',
|
|
93
|
+
'./scripts/eslint.config.cjs',
|
|
94
|
+
'./eslint.config.js',
|
|
95
|
+
'./eslint.config.cjs',
|
|
96
|
+
].find(p => node_fs_1.default.existsSync(p));
|
|
97
|
+
const eslintConfigPathE2e = [
|
|
98
|
+
'./e2e/eslint.config.js',
|
|
99
|
+
'./e2e/eslint.config.cjs',
|
|
100
|
+
'./eslint.config.js',
|
|
101
|
+
'./eslint.config.cjs',
|
|
102
|
+
].find(p => node_fs_1.default.existsSync(p));
|
|
93
103
|
const eslintConfigPathPlaywright = ['./playwright/eslint.config.js', './eslint.config.js'].find(p => node_fs_1.default.existsSync(p));
|
|
94
104
|
const tsconfigPathScripts = [`./scripts/tsconfig.json`].find(p => node_fs_1.default.existsSync(p)) || `${paths_1.scriptsDir}/tsconfig.json`;
|
|
95
105
|
const tsconfigPathE2e = `./e2e/tsconfig.json`;
|
|
@@ -145,7 +155,7 @@ const prettierPaths = [
|
|
|
145
155
|
...lintExclude.map((s) => `!${s}`),
|
|
146
156
|
];
|
|
147
157
|
function runPrettier() {
|
|
148
|
-
const prettierConfigPath = [`./prettier.config.js`].find(f => node_fs_1.default.existsSync(f));
|
|
158
|
+
const prettierConfigPath = [`./prettier.config.js`, `./prettier.config.cjs`].find(f => node_fs_1.default.existsSync(f));
|
|
149
159
|
if (!prettierConfigPath)
|
|
150
160
|
return;
|
|
151
161
|
// prettier --write 'src/**/*.{js,ts,css,scss,graphql}'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.16.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky",
|
|
6
6
|
"tsn-debug": "tsn testScript.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@commitlint/cli": "^19.0.0",
|
|
22
22
|
"@commitlint/config-conventional": "^19.0.0",
|
|
23
23
|
"@eslint/js": "^9.7.0",
|
|
24
|
-
"@inquirer/prompts": "^
|
|
24
|
+
"@inquirer/prompts": "^6.0.1",
|
|
25
25
|
"@naturalcycles/cli": "^1.0.0",
|
|
26
26
|
"@naturalcycles/js-lib": "^14.0.0",
|
|
27
27
|
"@naturalcycles/nodejs-lib": "^13.0.1",
|