@alexlit/lint-kit 114.1.0 → 114.2.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/.eslintrc.cjs +1 -1
- package/package.json +1 -1
- package/packages/config-commitlint/package.json +4 -4
- package/packages/config-eslint/package.json +7 -7
- package/packages/config-prettier/package.json +3 -3
- package/prettier.config.js +1 -0
- package/scripts/.config.sh +14 -0
- package/scripts/check.editorconfig.sh +2 -3
- package/scripts/i.sh +2 -3
- package/scripts/lint.eslint.sh +4 -7
- package/scripts/lint.htmllint.sh +2 -5
- package/scripts/lint.markdownlint.sh +4 -7
- package/scripts/lint.npmlint.sh +3 -6
- package/scripts/lint.sh +3 -5
- package/scripts/lint.stylelint.sh +4 -7
- package/scripts/release.sh +5 -7
- package/scripts/semver.sh +5 -10
- package/scripts/up.sh +5 -12
package/.eslintrc.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-commitlint",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Commitlint config",
|
|
6
6
|
"keywords": [
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"up": "../../scripts/up.sh"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@commitlint/cli": "^19.2.
|
|
37
|
-
"@commitlint/config-conventional": "^19.
|
|
36
|
+
"@commitlint/cli": "^19.2.2",
|
|
37
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
38
38
|
"conventional-changelog-cli": "^4.1.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "81.
|
|
3
|
+
"version": "81.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@intlify/eslint-plugin-vue-i18n": "^2.0.0",
|
|
40
40
|
"@tanstack/eslint-plugin-query": "^5.28.11",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
42
|
-
"@typescript-eslint/parser": "^7.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
42
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
43
43
|
"eslint": "^8.57.0",
|
|
44
44
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
45
45
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
"eslint-plugin-promise": "^6.1.1",
|
|
70
70
|
"eslint-plugin-regexp": "^2.5.0",
|
|
71
71
|
"eslint-plugin-security": "^3.0.0",
|
|
72
|
-
"eslint-plugin-simple-import-sort": "^12.
|
|
72
|
+
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
73
73
|
"eslint-plugin-sonarjs": "^0.25.1",
|
|
74
74
|
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
75
75
|
"eslint-plugin-sort-destructure-keys": "^1.5.0",
|
|
76
76
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
77
77
|
"eslint-plugin-spellcheck": "^0.0.20",
|
|
78
78
|
"eslint-plugin-sql": "^2.5.0",
|
|
79
|
-
"eslint-plugin-testing-library": "^6.2.
|
|
79
|
+
"eslint-plugin-testing-library": "^6.2.2",
|
|
80
80
|
"eslint-plugin-typescript-sort-keys": "^3.2.0",
|
|
81
81
|
"eslint-plugin-unicorn": "^52.0.0",
|
|
82
82
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
83
83
|
"eslint-plugin-vitest": "^0.4.1",
|
|
84
|
-
"eslint-plugin-vue": "^9.
|
|
84
|
+
"eslint-plugin-vue": "^9.25.0",
|
|
85
85
|
"eslint-plugin-vuejs-accessibility": "^2.2.1",
|
|
86
86
|
"eslint-plugin-wc": "^2.1.0",
|
|
87
87
|
"eslint-plugin-write-good-comments": "^0.2.0",
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
"eslint-plugin-array-func": "^4.0.0",
|
|
96
96
|
"eslint-plugin-vitest": "^0.4.1"
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-prettier",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "prettier config",
|
|
6
6
|
"keywords": [
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"prettier-plugin-solidity": "^1.3.1",
|
|
46
46
|
"prettier-plugin-sort-json": "^4.0.0",
|
|
47
47
|
"prettier-plugin-sql": "^0.18.0",
|
|
48
|
-
"prettier-plugin-svelte": "^3.2.
|
|
49
|
-
"prettier-plugin-tailwindcss": "^0.5.
|
|
48
|
+
"prettier-plugin-svelte": "^3.2.3",
|
|
49
|
+
"prettier-plugin-tailwindcss": "^0.5.14",
|
|
50
50
|
"radash": "^12.1.0"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
package/prettier.config.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Colors
|
|
2
|
+
export BLUE='\e[94m'
|
|
3
|
+
export CYAN='\e[96m'
|
|
4
|
+
export GREEN='\e[32m'
|
|
5
|
+
export GREY='\e[90m'
|
|
6
|
+
export WHITE='\e[39m'
|
|
7
|
+
export YELLOW='\e[33m'
|
|
8
|
+
|
|
9
|
+
# Paths
|
|
10
|
+
export CURRENT_DIR=${PWD##*/}
|
|
11
|
+
export CURRENT_PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
12
|
+
export CURRENT_PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
13
|
+
export MAIN_PACKAGE="@alexlit/lint-kit"
|
|
14
|
+
export SKIPED_PACKAGES='eslint,eslint-plugin-vitest,eslint-plugin-array-func'
|
package/scripts/i.sh
CHANGED
package/scripts/lint.eslint.sh
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
# Launch scripts linter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
COLOR_ARROW='\e[90m'
|
|
7
|
-
COLOR_FILES='\e[96m'
|
|
8
|
-
COLOR_DEFAULT='\e[39m'
|
|
5
|
+
OPTION=${1}
|
|
9
6
|
|
|
10
7
|
FILES='.cjs,.mjs,.js,.jsx,.ts,.tsx,.vue'
|
|
11
8
|
|
|
12
|
-
echo -e "${
|
|
9
|
+
echo -e "${YELLOW}eslint ${GREY}-> ${CYAN}${FILES}${WHITE}"
|
|
13
10
|
|
|
14
11
|
if [ $OPTION ] && [ $OPTION = 'fix' ]; then
|
|
15
|
-
echo -e "${
|
|
12
|
+
echo -e "${GREY}autofix:${WHITE} true"
|
|
16
13
|
fi
|
|
17
14
|
|
|
18
15
|
eslint --ext ${FILES} --ignore-path .gitignore --ignore-path .eslintignore --ignore-path .prettierignore ./ --${OPTION}
|
package/scripts/lint.htmllint.sh
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
# Launch HTML linter
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
COLOR_ARROW='\e[90m'
|
|
5
|
-
COLOR_FILES='\e[96m'
|
|
6
|
-
COLOR_DEFAULT='\e[39m'
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
7
4
|
|
|
8
5
|
FILES='**/*.html'
|
|
9
6
|
|
|
10
|
-
echo -e "${
|
|
7
|
+
echo -e "${YELLOW}htmllint ${GREY}-> ${CYAN}${FILES}${WHITE}"
|
|
11
8
|
|
|
12
9
|
linthtml ${FILES}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
# Launch linter for .md files
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
COLOR_ARROW='\e[90m'
|
|
7
|
-
COLOR_FILES='\e[96m'
|
|
8
|
-
COLOR_DEFAULT='\e[39m'
|
|
5
|
+
OPTION=${1}
|
|
9
6
|
|
|
10
7
|
FILES='**/*.md'
|
|
11
8
|
|
|
12
|
-
echo -e "${
|
|
9
|
+
echo -e "${YELLOW}markdownlint ${GREY}-> ${CYAN}${FILES}${WHITE}"
|
|
13
10
|
|
|
14
11
|
if [ $OPTION ] && [ $OPTION = 'fix' ]; then
|
|
15
|
-
echo -e "${
|
|
12
|
+
echo -e "${GREY}autofix:${WHITE} true"
|
|
16
13
|
prettier --write ${FILES}
|
|
17
14
|
fi
|
|
18
15
|
|
package/scripts/lint.npmlint.sh
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
# Launch NPM linter
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
COLOR_ARROW='\e[90m'
|
|
5
|
-
COLOR_FILES='\e[96m'
|
|
6
|
-
COLOR_DEFAULT='\e[39m'
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
7
4
|
|
|
8
5
|
PACKAGE_FILES='. ./packages'
|
|
9
6
|
LOCK_FILE='package-lock.json'
|
|
10
7
|
|
|
11
|
-
echo -e "${
|
|
8
|
+
echo -e "${YELLOW}npmlint ${GREY}-> ${CYAN}${PACKAGE_FILES}${WHITE}"
|
|
12
9
|
|
|
13
10
|
npmPkgJsonLint ${PACKAGE_FILES}
|
|
14
11
|
|
|
15
|
-
echo -e "${
|
|
12
|
+
echo -e "${YELLOW}lockfilelint ${GREY}-> ${CYAN}${LOCK_FILE}${WHITE}"
|
|
16
13
|
|
|
17
14
|
lockfile-lint --type npm --path ${LOCK_FILE}
|
package/scripts/lint.sh
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# Запускает линтеры
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
GREEN='\e[92m'
|
|
7
|
-
YELLOW='\e[33m'
|
|
5
|
+
OPTION=${1}
|
|
8
6
|
|
|
9
|
-
echo -e "${YELLOW}Запускаю линтеры: ${GREEN}eslint, htmllint, markdownlint, npmlint, stylelint...${
|
|
7
|
+
echo -e "${YELLOW}Запускаю линтеры: ${GREEN}eslint, htmllint, markdownlint, npmlint, stylelint...${WHITE}"
|
|
10
8
|
|
|
11
9
|
npm run lint:eslint --if-present ${OPTION}
|
|
12
10
|
npm run lint:htmllint --if-present
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
# Launch styles linter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
COLOR_ARROW='\e[90m'
|
|
7
|
-
COLOR_FILES='\e[96m'
|
|
8
|
-
COLOR_DEFAULT='\e[39m'
|
|
5
|
+
OPTION=${1}
|
|
9
6
|
|
|
10
7
|
FILES='**/*.{css,pcss,postcss,sass,scss,vue}'
|
|
11
8
|
|
|
12
|
-
echo -e "${
|
|
9
|
+
echo -e "${YELLOW}stylelint ${GREY}-> ${CYAN}${FILES}${WHITE}"
|
|
13
10
|
|
|
14
11
|
if [ $OPTION ] && [ $OPTION = 'fix' ]; then
|
|
15
|
-
echo -e "${
|
|
12
|
+
echo -e "${GREY}autofix:${WHITE} true"
|
|
16
13
|
fi
|
|
17
14
|
|
|
18
15
|
stylelint ${FILES} --ignore-path .gitignore --allow-empty-input --${OPTION}
|
package/scripts/release.sh
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
# Релиз пакета (коммит в npm и git)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
GREEN='\e[32m'
|
|
7
|
-
YELLOW='\e[33m'
|
|
5
|
+
VERSION=${1:-patch} # patch | minor | major
|
|
8
6
|
|
|
9
7
|
npm run semver ${VERSION}
|
|
10
8
|
|
|
11
9
|
CURRENT_PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
12
10
|
CURRENT_PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
13
11
|
|
|
14
|
-
echo -e "${YELLOW}Релиз пакета ${GREEN}${CURRENT_PACKAGE_NAME}@${CURRENT_PACKAGE_VERSION}${YELLOW}...${
|
|
12
|
+
echo -e "${YELLOW}Релиз пакета ${GREEN}${CURRENT_PACKAGE_NAME}@${CURRENT_PACKAGE_VERSION}${YELLOW}...${WHITE}"
|
|
15
13
|
|
|
16
|
-
echo -e "${YELLOW}Коммит в ${GREEN}git${YELLOW}...${
|
|
14
|
+
echo -e "${YELLOW}Коммит в ${GREEN}git${YELLOW}...${WHITE}"
|
|
17
15
|
git push
|
|
18
16
|
|
|
19
|
-
echo -e "${YELLOW}Публикация в ${GREEN}npm${YELLOW}...${
|
|
17
|
+
echo -e "${YELLOW}Публикация в ${GREEN}npm${YELLOW}...${WHITE}"
|
|
20
18
|
npm pu
|
package/scripts/semver.sh
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
# Обновляет версию пакета
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
DEFAULT='\e[39m'
|
|
6
|
-
GREEN='\e[32m'
|
|
7
|
-
YELLOW='\e[33m'
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
CURRENT_PACKAGE=$(node -p "require('./package.json').name")
|
|
5
|
+
VERSION=${1:-patch} # <major | minor | patch | premajor | preminor | prepatch | prerelease>
|
|
11
6
|
|
|
12
|
-
echo -e "${YELLOW}Поднимаю ${GREEN}${VERSION}${YELLOW} версию пакета ${GREEN}${
|
|
7
|
+
echo -e "${YELLOW}Поднимаю ${GREEN}${VERSION}${YELLOW} версию пакета ${GREEN}${CURRENT_PACKAGE_NAME}${YELLOW}...${WHITE}"
|
|
13
8
|
|
|
14
9
|
changelogen --release --no-commit --${VERSION}
|
|
15
10
|
|
|
16
|
-
if [ $
|
|
11
|
+
if [ $CURRENT_PACKAGE_NAME != $MAIN_PACKAGE ]; then
|
|
17
12
|
rm CHANGELOG.md
|
|
18
13
|
fi
|
|
19
14
|
|
|
20
15
|
git add .
|
|
21
|
-
git commit -m "chore(${
|
|
16
|
+
git commit -m "chore(${CURRENT_PACKAGE_NAME}): bump version"
|
package/scripts/up.sh
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
# Обновляет зависимости до указанной версии (latest, newest, greatest, minor, patch)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
BLUE='\e[94m'
|
|
6
|
-
DEFAULT='\e[39m'
|
|
7
|
-
GREEN='\e[32m'
|
|
8
|
-
YELLOW='\e[33m'
|
|
3
|
+
source "$(dirname $0)"/.config.sh
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
SKIPED_PACKAGES='eslint,eslint-plugin-vitest,eslint-plugin-array-func'
|
|
5
|
+
VERSION=${1:-minor}
|
|
13
6
|
|
|
14
|
-
echo -e "${YELLOW}Обновляю зависимости пакета ${GREEN}${CURRENT_DIR}${YELLOW} до версии ${GREEN}${VERSION}${YELLOW}...${
|
|
7
|
+
echo -e "${YELLOW}Обновляю зависимости пакета ${GREEN}${CURRENT_DIR}${YELLOW} до версии ${GREEN}${VERSION}${YELLOW}...${WHITE}"
|
|
15
8
|
|
|
16
9
|
if [ ${SKIPED_PACKAGES} != '' ]; then
|
|
17
|
-
echo -e "${BLUE}--reject ${
|
|
10
|
+
echo -e "${BLUE}--reject ${GREY}${SKIPED_PACKAGES}"
|
|
18
11
|
fi
|
|
19
12
|
|
|
20
13
|
# root
|
|
@@ -27,7 +20,7 @@ if [ -d "packages" ]; then
|
|
|
27
20
|
cd packages
|
|
28
21
|
|
|
29
22
|
for PACKAGE in */; do
|
|
30
|
-
echo -e "${YELLOW}package: ${GREEN}${PACKAGE%*/}...${
|
|
23
|
+
echo -e "${YELLOW}package: ${GREEN}${PACKAGE%*/}...${WHITE}"
|
|
31
24
|
cd ${PACKAGE}
|
|
32
25
|
npx npm-check-updates --upgrade --target ${VERSION}
|
|
33
26
|
npm i --legacy-peer-deps
|