@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 +6 -1
- package/cfg/lint-staged.config.js +6 -2
- package/package.json +1 -1
- package/readme.md +1 -1
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: [
|
|
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
|
-
|
|
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 [
|
|
71
|
+
return [stylelintCmd, prettierCmd].filter(Boolean).map(s => `${s} ${filesList}`)
|
|
68
72
|
},
|
|
69
73
|
|
|
70
74
|
// Files in root dir
|
package/package.json
CHANGED
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,
|
|
55
|
+
- `/docs` for Docs (convention followed by Github Pages, Conventional commits, Vitepress, etc)
|
|
56
56
|
|
|
57
57
|
### Yarn commands
|
|
58
58
|
|