@naturalcycles/dev-lib 13.42.2 → 13.43.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 CHANGED
@@ -7,5 +7,10 @@ module.exports = {
7
7
  // everything that prettier supports:
8
8
  prettierExtensionsAll: 'ts,tsx,css,scss,js,jsx,json,md,graphql,yml,yaml,html,vue',
9
9
  stylelintExtensions: 'css,scss',
10
- lintExclude: ['./**/__exclude/**', './docs/.vuepress/dist/**', './CHANGELOG.md'],
10
+ lintExclude: [
11
+ './**/__exclude/**',
12
+ './docs/.vitepress/dist/**',
13
+ './docs/.vitepress/cache/**',
14
+ './CHANGELOG.md',
15
+ ],
11
16
  }
@@ -31,7 +31,11 @@ const eslintConfigPathRoot =
31
31
 
32
32
  const prettierCmd = `prettier --write --config ${prettierConfigPath}`
33
33
  const eslintCmd = `eslint --fix`
34
- const styleLintCmd = `stylelint --fix --config ${stylelintConfigPath}`
34
+
35
+ const stylelintExists =
36
+ fs.existsSync('node_modules/stylelint') &&
37
+ fs.existsSync('node_modules/stylelint-config-standard-scss')
38
+ const stylelintCmd = stylelintExists ? `stylelint --fix --config ${stylelintConfigPath}` : undefined
35
39
 
36
40
  const linters = {
37
41
  // *.{ts,tsx,vue} files: eslint, prettier
@@ -64,7 +68,7 @@ const linters = {
64
68
  [`./{${prettierDirs}}/**/*.{${stylelintExtensions}}`]: match => {
65
69
  const filesList = micromatch.not(match, lintExclude).join(' ')
66
70
  if (!filesList) return []
67
- return [styleLintCmd, prettierCmd].map(s => `${s} ${filesList}`)
71
+ return [stylelintCmd, prettierCmd].filter(Boolean).map(s => `${s} ${filesList}`)
68
72
  },
69
73
 
70
74
  // Files in root dir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "13.42.2",
3
+ "version": "13.43.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "tsn-debug": "tsn testScript.ts",
package/readme.md CHANGED
@@ -52,7 +52,7 @@ All files are linted and _prettified_ upon commit (using `husky`, `lint-staged`
52
52
  - `/jest/unit.xml`
53
53
  - `/jest/integration.xml`
54
54
  - `/coverage-integration`
55
- - `/docs` for Docs (convention followed by Github Pages, Conventional commits, Vuepress, etc)
55
+ - `/docs` for Docs (convention followed by Github Pages, Conventional commits, Vitepress, etc)
56
56
 
57
57
  ### Yarn commands
58
58