arui-presets-lint 8.5.0 → 8.7.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/README.md +9 -13
- package/cli/index.mjs +1 -1
- package/eslint/index.js +2 -1
- package/lefthook/index.yml +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<br />
|
|
12
12
|
|
|
13
|
-
Набор
|
|
13
|
+
Набор конфигурационных файлов для валидации react/node/typescript-проектов.
|
|
14
14
|
|
|
15
15
|
[Как я могу улучшить стандарты?](./.github/CONTRIBUTING.md)
|
|
16
16
|
|
|
@@ -31,15 +31,9 @@
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
33
|
"prettier": "arui-presets-lint/prettier",
|
|
34
|
-
"eslintConfig": {
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
"stylelint": {
|
|
38
|
-
"extends": "arui-presets-lint/stylelint"
|
|
39
|
-
},
|
|
40
|
-
"commitlint": {
|
|
41
|
-
"extends": "./node_modules/arui-presets-lint/commitlint"
|
|
42
|
-
}
|
|
34
|
+
"eslintConfig": { "extends": "./node_modules/arui-presets-lint/eslint" },
|
|
35
|
+
"stylelint": { "extends": "arui-presets-lint/stylelint" },
|
|
36
|
+
"commitlint": { "extends": "./node_modules/arui-presets-lint/commitlint" }
|
|
43
37
|
}
|
|
44
38
|
```
|
|
45
39
|
|
|
@@ -58,7 +52,9 @@
|
|
|
58
52
|
}
|
|
59
53
|
```
|
|
60
54
|
|
|
61
|
-
Чтобы eslint / stylelint / prettier не проверял конкретные файлы и папки, можно исключить их с помощью файлов .
|
|
55
|
+
Чтобы eslint / stylelint / prettier не проверял конкретные файлы и папки, можно исключить их с помощью файлов .stylelintignore / .prettierignore. Прописывать там файлы, которые уже есть в .gitignore не требуется!
|
|
56
|
+
|
|
57
|
+
> Файл .eslintignore не поддерживается, используйте вместо этого eslintConfig.ignorePatterns
|
|
62
58
|
|
|
63
59
|
Для запуска eslint/stylelint рекомендуется использовать флаг [--max-warnings](https://eslint.org/docs/latest/user-guide/command-line-interface#--max-warnings), который позволяет ограничить количество возникающих предупреждений.
|
|
64
60
|
|
|
@@ -120,7 +116,7 @@ npx --no-install lefthook install
|
|
|
120
116
|
npx --no-install prettier --write "./**/*.{js,jsx}" --no-error-on-unmatched-pattern --cache
|
|
121
117
|
|
|
122
118
|
# Вызов eslint, для того чтобы проверить только js и jsx файлы:
|
|
123
|
-
npx --no-install eslint "**/*.{js,jsx}" --ext .js,.jsx --ignore-
|
|
119
|
+
npx --no-install eslint "**/*.{js,jsx}" --ext .js,.jsx --ignore-path .gitignore --cache --cache-location="./node_modules/.cache/eslint/.eslintcache"
|
|
124
120
|
```
|
|
125
121
|
|
|
126
122
|
Таким образом можно гибко настраивать поведение линтеров для вашего проекта, если по какой-то причине стандартная конфигурация вам не подходит.
|
|
@@ -170,7 +166,7 @@ npx --no-install commitlint --print-config > commitlintconfig.txt
|
|
|
170
166
|
```
|
|
171
167
|
The MIT License (MIT)
|
|
172
168
|
|
|
173
|
-
Copyright (c)
|
|
169
|
+
Copyright (c) 2025 core-ds contributors
|
|
174
170
|
|
|
175
171
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
176
172
|
of this software and associated documentation files (the "Software"), to deal
|
package/cli/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ const cacheFolder = './node_modules/.cache';
|
|
|
8
8
|
|
|
9
9
|
const commandsMap = {
|
|
10
10
|
styles: `stylelint "**/*.css" --allow-empty-input --ignore-path .gitignore --ignore-path .stylelintignore --cache --cache-location="${cacheFolder}/stylelint/.stylelintcache"`,
|
|
11
|
-
scripts: `eslint "**/*.{js,jsx,ts,tsx,mjs,mts,cjs,cts}" --ext .js,.jsx,.ts,.tsx,.mjs,.mts,.cjs,.cts --ignore-
|
|
11
|
+
scripts: `eslint "**/*.{js,jsx,ts,tsx,mjs,mts,cjs,cts}" --ext .js,.jsx,.ts,.tsx,.mjs,.mts,.cjs,.cts --ignore-path .gitignore --cache --cache-location="${cacheFolder}/eslint/.eslintcache"`,
|
|
12
12
|
format: `prettier --write ${prettierParams} --list-different`,
|
|
13
13
|
'format:check': `prettier --check ${prettierParams}`,
|
|
14
14
|
};
|
package/eslint/index.js
CHANGED
|
@@ -125,7 +125,7 @@ module.exports = {
|
|
|
125
125
|
'error',
|
|
126
126
|
{ functions: false, classes: true, variables: true },
|
|
127
127
|
],
|
|
128
|
-
'@typescript-eslint/default-param-last': '
|
|
128
|
+
'@typescript-eslint/default-param-last': 'warn',
|
|
129
129
|
'@typescript-eslint/consistent-type-imports': [
|
|
130
130
|
'error',
|
|
131
131
|
{
|
|
@@ -139,6 +139,7 @@ module.exports = {
|
|
|
139
139
|
fixMixedExportsWithInlineTypeSpecifier: true,
|
|
140
140
|
},
|
|
141
141
|
],
|
|
142
|
+
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
142
143
|
|
|
143
144
|
// Imports, file extensions
|
|
144
145
|
'import/no-extraneous-dependencies': [
|
package/lefthook/index.yml
CHANGED
|
@@ -9,7 +9,7 @@ pre-commit:
|
|
|
9
9
|
run: npx --no-install prettier --write {staged_files} --cache && npx --no-install eslint {staged_files} --cache --cache-location="./node_modules/.cache/eslint/.eslintcache" && git add {staged_files}
|
|
10
10
|
check-styles:
|
|
11
11
|
glob: '*.{css}'
|
|
12
|
-
run: npx --no-install prettier --write {staged_files} --cache && npx --no-install stylelint {staged_files} --cache --cache-location="./node_modules/.cache/stylelint/.stylelintcache" && git add {staged_files}
|
|
12
|
+
run: npx --no-install prettier --write {staged_files} --cache && npx --no-install stylelint {staged_files} --allow-empty-input --cache --cache-location="./node_modules/.cache/stylelint/.stylelintcache" && git add {staged_files}
|
|
13
13
|
check-json:
|
|
14
14
|
glob: '*.{json}'
|
|
15
15
|
run: npx --no-install prettier --write {staged_files} --cache && git add {staged_files}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arui-presets-lint",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.0",
|
|
4
4
|
"description": "Config files for arui-apps",
|
|
5
5
|
"author": "core-ds contributors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
"@commitlint/config-conventional": "18.4.4",
|
|
12
12
|
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
13
13
|
"@typescript-eslint/parser": "7.18.0",
|
|
14
|
-
"eslint": "8.57.
|
|
14
|
+
"eslint": "8.57.1",
|
|
15
15
|
"eslint-config-airbnb": "19.0.4",
|
|
16
16
|
"eslint-config-airbnb-typescript": "18.0.0",
|
|
17
|
-
"eslint-config-prettier": "
|
|
18
|
-
"eslint-import-resolver-typescript": "3.
|
|
17
|
+
"eslint-config-prettier": "10.1.1",
|
|
18
|
+
"eslint-import-resolver-typescript": "4.3.1",
|
|
19
19
|
"eslint-plugin-cypress": "3.6.0",
|
|
20
20
|
"eslint-plugin-dirnames": "1.0.3",
|
|
21
21
|
"eslint-plugin-import": "2.31.0",
|
|
22
22
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
23
|
-
"eslint-plugin-react": "7.37.
|
|
23
|
+
"eslint-plugin-react": "7.37.5",
|
|
24
24
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
25
25
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
26
26
|
"eslint-plugin-unicorn": "56.0.1",
|
|
27
27
|
"execa": "9.5.2",
|
|
28
28
|
"kebab-case": "1.0.0",
|
|
29
|
-
"lefthook": "1.
|
|
30
|
-
"prettier": "3.
|
|
31
|
-
"stylelint": "16.
|
|
29
|
+
"lefthook": "1.11.6",
|
|
30
|
+
"prettier": "3.5.3",
|
|
31
|
+
"stylelint": "16.12.0"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=18.12.0"
|