arui-presets-lint 6.1.0 → 6.2.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 6.2.1 (2024-06-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **stylelint:** remove arui-cssvars 94223a3
7
+
8
+ # 6.2.0 (2023-05-24)
9
+
10
+
11
+ ### Features
12
+
13
+ * **eslint:** forbid import of lodash 7df02af
14
+
1
15
  # 6.1.0 (2022-12-09)
2
16
 
3
17
 
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # Alfa Laboratory UI Presets
1
+ Проект развивается и поддерживается на [github](https://github.com/core-ds/arui-presets-lint).
2
+
3
+ # Общая конфигурация линтеров
2
4
 
3
5
  [![npm][npm-img]][npm]
4
6
  [![license][license-img]][license]
@@ -68,9 +70,9 @@ yarn info arui-presets-lint peerDependencies
68
70
  "scripts": {
69
71
  "lint:css": "stylelint **/*.css",
70
72
  "lint:scripts": "eslint \"**/*.{js,jsx,ts,tsx}\" --ext .js,.jsx,.ts,.tsx",
71
- "lint": "yarn lint:css && yarn lint:scripts",
73
+ "lint": "yarn lint:css && yarn lint:scripts && prettier --check \"./**/*.{ts,tsx,js,jsx,css,json}\"",
72
74
  "lint:fix": "yarn lint:scripts --fix && yarn lint:css --fix",
73
- "format": "prettier --write \"./**/*.{ts,tsx,js,jsx,css,json,md}\""
75
+ "format": "prettier --write \"./**/*.{ts,tsx,js,jsx,css,json}\""
74
76
  }
75
77
  }
76
78
  ```
@@ -80,6 +82,8 @@ yarn info arui-presets-lint peerDependencies
80
82
 
81
83
  > ⚠️ Внимание, .eslintignore [по умолчанию не подтягиватся в lint-staged](https://github.com/okonet/lint-staged#how-can-i-ignore-files-from-eslintignore)!
82
84
 
85
+ Так же можно добавить к командам аргумент `--ignore-path` со значением `.gitignore`, в этом случае конфиг из дефолтных файлов (.eslintignore, .stylelintignore, .prettierignore) не будет применятся, но можно добавить специфичные правила в конфиг ([eslintConfig.ignorePatterns](https://eslint.org/docs/latest/use/configure/ignore#ignorepatterns-in-config-files), [stylelintConfig.ignoreFiles](https://stylelint.io/user-guide/configure#ignorefiles)).
86
+
83
87
  Для запуска eslint/stylelint рекомендуется использовать флаг [--max-warnings](https://eslint.org/docs/latest/user-guide/command-line-interface#--max-warnings), который позволяет ограничить количество возникающих предупреждений.
84
88
 
85
89
  ## Конфигурация `husky` и `lint-staged`:
@@ -109,9 +113,9 @@ yarn info arui-presets-lint peerDependencies
109
113
  "scripts": {
110
114
  "lint:css": "stylelint **/*.css",
111
115
  "lint:scripts": "eslint \"**/*.{js,jsx,ts,tsx}\" --ext .js,.jsx,.ts,.tsx",
112
- "lint": "yarn lint:css && yarn lint:scripts",
116
+ "lint": "yarn lint:css && yarn lint:scripts && prettier --check \"./**/*.{ts,tsx,js,jsx,css,json}\"",
113
117
  "lint:fix": "yarn lint:scripts --fix && yarn lint:css --fix",
114
- "format": "prettier --write \"./**/*.{ts,tsx,js,jsx,css,json,md}\""
118
+ "format": "prettier --write \"./**/*.{ts,tsx,js,jsx,css,json}\""
115
119
  },
116
120
  "husky": {
117
121
  "hooks": {
@@ -144,7 +148,7 @@ yarn info arui-presets-lint peerDependencies
144
148
  ```
145
149
  The MIT License (MIT)
146
150
 
147
- Copyright (c) 2022 Alfa-Bank
151
+ Copyright (c) 2023 core-ds contributors
148
152
 
149
153
  Permission is hereby granted, free of charge, to any person obtaining a copy
150
154
  of this software and associated documentation files (the "Software"), to deal
package/eslint/index.js CHANGED
@@ -171,6 +171,10 @@ module.exports = {
171
171
  },
172
172
  ],
173
173
  'import/no-import-module-exports': 'off',
174
+ 'no-restricted-imports': [
175
+ 'error',
176
+ { name:'lodash', message: 'Please use single imports of lodash functions, e.g `import isEqual from "lodash/isEqual"` instead of `"import { isEqual } from "lodash"`'},
177
+ ],
174
178
  },
175
179
  overrides: [
176
180
  {
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "arui-presets-lint",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
4
4
  "description": "Config files for arui-apps",
5
- "author": "Good guys from Alfa-Bank",
5
+ "author": "core-ds contributors",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
8
  "@alfalab/stylelint-core-vars": "1.5.0",
9
9
  "@commitlint/cli": "16.3.0",
10
10
  "@commitlint/config-conventional": "16.2.4",
11
- "arui-cssvars": "1.2.0",
12
11
  "command-line-args": "5.2.1",
13
12
  "conventional-changelog-cli": "2.2.2"
14
13
  },
@@ -43,7 +42,6 @@
43
42
  "@semantic-release/release-notes-generator": "9.0.3",
44
43
  "@typescript-eslint/eslint-plugin": "5.30.6",
45
44
  "@typescript-eslint/parser": "5.30.6",
46
- "arui-feather": "19.2.2",
47
45
  "eslint": "8.20.0",
48
46
  "eslint-config-airbnb": "19.0.4",
49
47
  "eslint-config-airbnb-typescript": "17.0.0",
@@ -1,6 +1,5 @@
1
1
  module.exports = {
2
2
  rules: {
3
- 'arui-cssvars/use-variables': true,
4
3
  'block-no-empty': true,
5
4
  'color-hex-length': 'short',
6
5
  'color-no-invalid-hex': true,
@@ -48,6 +47,5 @@ module.exports = {
48
47
  },
49
48
  plugins: [
50
49
  require.resolve('@alfalab/stylelint-core-vars'),
51
- require.resolve('arui-cssvars/lint/stylelint'),
52
50
  ],
53
51
  };
package/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @alfa-laboratory/frontstandards