@toptal/davinci-syntax 16.1.2 → 16.1.3
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,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 16.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1548](https://github.com/toptal/davinci/pull/1548) [`482789e8`](https://github.com/toptal/davinci/commit/482789e80815e60aa241f60dea814b7c0515aeb0) Thanks [@LashaJini](https://github.com/LashaJini)! - ---
|
|
8
|
+
|
|
9
|
+
- Add eslint rule to restict `palette` import from `@toptal/picasso-provider`
|
|
10
|
+
|
|
3
11
|
## 16.1.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -196,6 +196,20 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
|
|
|
196
196
|
'@toptal/picasso-shared/**/*',
|
|
197
197
|
],
|
|
198
198
|
],
|
|
199
|
+
'no-restricted-imports': [
|
|
200
|
+
'error',
|
|
201
|
+
{
|
|
202
|
+
paths: [
|
|
203
|
+
{
|
|
204
|
+
name: '@toptal/picasso-provider',
|
|
205
|
+
importNames: [
|
|
206
|
+
'palette',
|
|
207
|
+
],
|
|
208
|
+
message: \\"Please import 'palette' from '@toptal/picasso-utils' instead.\\",
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
],
|
|
199
213
|
'@typescript-eslint/array-type': [
|
|
200
214
|
'error',
|
|
201
215
|
{
|
|
@@ -344,4 +344,16 @@ describe('eslint rules', () => {
|
|
|
344
344
|
import type componentType1 from './module'`,
|
|
345
345
|
],
|
|
346
346
|
})
|
|
347
|
+
|
|
348
|
+
testRule({
|
|
349
|
+
ruleId: 'no-restricted-imports',
|
|
350
|
+
invalidCases: [
|
|
351
|
+
`import { palette } from '@toptal/picasso-provider';`,
|
|
352
|
+
`import {
|
|
353
|
+
palette
|
|
354
|
+
} from '@toptal/picasso-provider';`,
|
|
355
|
+
`import Picasso, { useScreenSize, palette } from '@toptal/picasso-provider';`,
|
|
356
|
+
],
|
|
357
|
+
validCases: [`import { palette } from '@toptal/picasso-utils';`],
|
|
358
|
+
})
|
|
347
359
|
})
|
package/src/configs/.eslintrc.js
CHANGED
|
@@ -185,6 +185,19 @@ module.exports = {
|
|
|
185
185
|
'error',
|
|
186
186
|
['@toptal/picasso-shared', '@toptal/picasso-shared/**/*'],
|
|
187
187
|
],
|
|
188
|
+
'no-restricted-imports': [
|
|
189
|
+
'error',
|
|
190
|
+
{
|
|
191
|
+
paths: [
|
|
192
|
+
{
|
|
193
|
+
name: '@toptal/picasso-provider',
|
|
194
|
+
importNames: ['palette'],
|
|
195
|
+
message:
|
|
196
|
+
"Please import 'palette' from '@toptal/picasso-utils' instead.",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
],
|
|
188
201
|
// typescript
|
|
189
202
|
'@typescript-eslint/array-type': [
|
|
190
203
|
'error',
|