@toptal/davinci-syntax 24.0.0 → 24.0.1-alpha-feature-typescript-5.5-f29e7d47.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-syntax",
3
- "version": "24.0.0",
3
+ "version": "24.0.1-alpha-feature-typescript-5.5-f29e7d47.9+f29e7d47",
4
4
  "keywords": [
5
5
  "lint"
6
6
  ],
@@ -25,16 +25,25 @@
25
25
  "docs",
26
26
  "CHANGELOG.md"
27
27
  ],
28
+ "scripts": {
29
+ "lint": "pnpm run lint:path .",
30
+ "lint:path": "eslint --ext=.js,.jsx,.ts,.tsx --color --fix",
31
+ "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' pnpm jest"
32
+ },
28
33
  "dependencies": {
29
34
  "@stylelint/postcss-css-in-js": "^0.38.0",
30
- "@typescript-eslint/eslint-plugin": "^6.7.3",
31
- "@typescript-eslint/parser": "^6.7.3",
32
- "eslint": "^8.34.0",
35
+ "@toptal/davinci-cli-shared": "^3.0.1-alpha-feature-typescript-5.5-f29e7d47.9+f29e7d47",
36
+ "@toptal/davinci-dir-lint": "^2.0.1-alpha-feature-typescript-5.5-f29e7d47.9+f29e7d47",
37
+ "@toptal/eslint-plugin-davinci": "^6.0.1-alpha-feature-typescript-5.5-f29e7d47.9+f29e7d47",
38
+ "@toptal/stylelint-plugin-davinci": "^2.0.1-alpha-feature-typescript-5.5-f29e7d47.9+f29e7d47",
39
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
40
+ "@typescript-eslint/parser": "^8.0.0",
41
+ "eslint": "^8.57.0",
33
42
  "eslint-config-prettier": "^8.5.0",
34
43
  "eslint-config-prettier-standard": "^4.0.1",
35
44
  "eslint-plugin-cypress": "^2.13.3",
36
45
  "eslint-plugin-import": "^2.29.1",
37
- "eslint-plugin-jest": "^27.6.2",
46
+ "eslint-plugin-jest": "^28.8.0",
38
47
  "eslint-plugin-jest-formatting": "^3.1.0",
39
48
  "eslint-plugin-no-inline-styles": "^1.0.5",
40
49
  "eslint-plugin-node": "^11.1.0",
@@ -43,7 +52,7 @@
43
52
  "eslint-plugin-react": "^7.30.1",
44
53
  "eslint-plugin-react-hooks": "^4.6.0",
45
54
  "eslint-plugin-todo-plz": "^1.3.0",
46
- "eslint-plugin-unused-imports": "3.0.0",
55
+ "eslint-plugin-unused-imports": "^4.1.0",
47
56
  "husky": "^8.0.2",
48
57
  "lint-staged": "^15.2.9",
49
58
  "postcss-syntax": "^0.36.2",
@@ -51,18 +60,14 @@
51
60
  "prettier-config-standard": "^5.0.0",
52
61
  "stylelint": "^15.11.0",
53
62
  "stylelint-config-standard": "^34.0.0",
54
- "stylelint-config-styled-components": "^0.1.1",
55
- "@toptal/davinci-cli-shared": "^3.0.0",
56
- "@toptal/eslint-plugin-davinci": "^6.0.0",
57
- "@toptal/davinci-dir-lint": "^2.0.0",
58
- "@toptal/stylelint-plugin-davinci": "^2.0.0"
63
+ "stylelint-config-styled-components": "^0.1.1"
59
64
  },
60
65
  "devDependencies": {
61
66
  "@jest/globals": "^29.7.0",
62
67
  "json5": "^2.2.3"
63
68
  },
64
69
  "peerDependencies": {
65
- "typescript": "^4.8.4"
70
+ "typescript": "^5.5.0"
66
71
  },
67
72
  "engines": {
68
73
  "node": ">=18.12.0"
@@ -70,9 +75,5 @@
70
75
  "publishConfig": {
71
76
  "access": "public"
72
77
  },
73
- "scripts": {
74
- "lint": "pnpm run lint:path .",
75
- "lint:path": "eslint --ext=.js,.jsx,.ts,.tsx --color --fix",
76
- "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' pnpm jest"
77
- }
78
- }
78
+ "gitHead": "f29e7d47bc671263a434ee69d6ad9744636531d0"
79
+ }
@@ -5,14 +5,6 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
5
5
  'space-before-function-paren': [
6
6
  'off',
7
7
  ],
8
- '@typescript-eslint/space-before-function-paren': [
9
- 'error',
10
- {
11
- anonymous: 'always',
12
- named: 'never',
13
- asyncArrow: 'always',
14
- },
15
- ],
16
8
  'padding-line-between-statements': [
17
9
  'error',
18
10
  {
@@ -236,7 +228,7 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
236
228
  '@typescript-eslint/explicit-member-accessibility': [
237
229
  'off',
238
230
  ],
239
- '@typescript-eslint/no-var-requires': [
231
+ '@typescript-eslint/no-require-imports': [
240
232
  'off',
241
233
  ],
242
234
  'no-use-before-define': [
@@ -260,9 +252,6 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
260
252
  '@typescript-eslint/no-empty-interface': [
261
253
  'off',
262
254
  ],
263
- '@typescript-eslint/member-delimiter-style': [
264
- 'off',
265
- ],
266
255
  'no-shadow': [
267
256
  'off',
268
257
  ],
@@ -284,9 +273,6 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
284
273
  'func-call-spacing': [
285
274
  'off',
286
275
  ],
287
- '@typescript-eslint/func-call-spacing': [
288
- 'error',
289
- ],
290
276
  'no-unused-expressions': [
291
277
  'off',
292
278
  ],
@@ -296,16 +282,11 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
296
282
  '@typescript-eslint/no-empty-function': [
297
283
  'off',
298
284
  ],
299
- '@typescript-eslint/ban-types': [
300
- 'error',
301
- {
302
- extendDefaults: true,
303
- types: {
304
- '{}': false,
305
- Function: false,
306
- object: false,
307
- },
308
- },
285
+ '@typescript-eslint/no-empty-object-type': [
286
+ 'off',
287
+ ],
288
+ '@typescript-eslint/no-unsafe-function-type': [
289
+ 'off',
309
290
  ],
310
291
  '@typescript-eslint/consistent-type-assertions': [
311
292
  'off',
@@ -416,19 +397,6 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
416
397
  'comma-dangle': [
417
398
  'off',
418
399
  ],
419
- '@typescript-eslint/comma-dangle': [
420
- 'error',
421
- {
422
- arrays: 'always-multiline',
423
- objects: 'always-multiline',
424
- imports: 'always-multiline',
425
- exports: 'always-multiline',
426
- functions: 'never',
427
- enums: 'always-multiline',
428
- generics: 'ignore',
429
- tuples: 'never',
430
- },
431
- ],
432
400
  '@typescript-eslint/consistent-type-imports': [
433
401
  'error',
434
402
  {
@@ -646,9 +614,15 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
646
614
  '@typescript-eslint/brace-style': [
647
615
  'off',
648
616
  ],
617
+ '@typescript-eslint/comma-dangle': [
618
+ 'off',
619
+ ],
649
620
  '@typescript-eslint/comma-spacing': [
650
621
  'off',
651
622
  ],
623
+ '@typescript-eslint/func-call-spacing': [
624
+ 'off',
625
+ ],
652
626
  '@typescript-eslint/indent': [
653
627
  'off',
654
628
  ],
@@ -658,6 +632,9 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
658
632
  '@typescript-eslint/keyword-spacing': [
659
633
  'off',
660
634
  ],
635
+ '@typescript-eslint/member-delimiter-style': [
636
+ 'off',
637
+ ],
661
638
  '@typescript-eslint/no-extra-parens': [
662
639
  'off',
663
640
  ],
@@ -673,6 +650,9 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
673
650
  '@typescript-eslint/space-before-blocks': [
674
651
  'off',
675
652
  ],
653
+ '@typescript-eslint/space-before-function-paren': [
654
+ 'off',
655
+ ],
676
656
  '@typescript-eslint/space-infix-ops': [
677
657
  'off',
678
658
  ],
@@ -976,9 +956,6 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
976
956
  '@typescript-eslint/prefer-function-type': [
977
957
  'error',
978
958
  ],
979
- '@typescript-eslint/prefer-namespace-keyword': [
980
- 'error',
981
- ],
982
959
  'no-array-constructor': [
983
960
  'off',
984
961
  ],
@@ -991,12 +968,6 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
991
968
  '@typescript-eslint/no-extra-non-null-assertion': [
992
969
  'error',
993
970
  ],
994
- 'no-loss-of-precision': [
995
- 'off',
996
- ],
997
- '@typescript-eslint/no-loss-of-precision': [
998
- 'error',
999
- ],
1000
971
  '@typescript-eslint/no-misused-new': [
1001
972
  'error',
1002
973
  ],
@@ -1012,9 +983,15 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
1012
983
  '@typescript-eslint/no-unsafe-declaration-merging': [
1013
984
  'error',
1014
985
  ],
986
+ '@typescript-eslint/no-wrapper-object-types': [
987
+ 'error',
988
+ ],
1015
989
  '@typescript-eslint/prefer-as-const': [
1016
990
  'error',
1017
991
  ],
992
+ '@typescript-eslint/prefer-namespace-keyword': [
993
+ 'error',
994
+ ],
1018
995
  '@typescript-eslint/triple-slash-reference': [
1019
996
  'error',
1020
997
  ],
@@ -1108,6 +1085,9 @@ exports[`eslint config verifies eslint rules are not updated silently 1`] = `
1108
1085
  'no-irregular-whitespace': [
1109
1086
  'error',
1110
1087
  ],
1088
+ 'no-loss-of-precision': [
1089
+ 'error',
1090
+ ],
1111
1091
  'no-misleading-character-class': [
1112
1092
  'error',
1113
1093
  ],
@@ -75,19 +75,6 @@ describe('eslint rules', () => {
75
75
  })
76
76
  }
77
77
 
78
- testRule({
79
- ruleId: '@typescript-eslint/space-before-function-paren',
80
- invalidCases: [
81
- 'function withoutSpace (x) {}',
82
- 'var anonymousWithoutSpace = function() {};',
83
- ],
84
- validCases: [
85
- 'function withoutSpace(x) {}',
86
- 'var anonymousWithoutSpace = function () {};',
87
- 'var anonymousWithoutSpace = function <T>() {};',
88
- ],
89
- })
90
-
91
78
  testRule({
92
79
  ruleId: 'padding-line-between-statements',
93
80
  invalidCases: [
@@ -242,12 +229,6 @@ describe('eslint rules', () => {
242
229
  ],
243
230
  })
244
231
 
245
- testRule({
246
- ruleId: '@typescript-eslint/func-call-spacing',
247
- invalidCases: ['foo ()', 'foo<T> ()'],
248
- validCases: ['foo()', 'foo<T>()'],
249
- })
250
-
251
232
  testRule({
252
233
  ruleId: '@typescript-eslint/no-unused-expressions',
253
234
  invalidCases: ['if (0) null'],
@@ -255,13 +236,18 @@ describe('eslint rules', () => {
255
236
  })
256
237
 
257
238
  testRule({
258
- ruleId: '@typescript-eslint/ban-types',
239
+ ruleId: '@typescript-eslint/no-wrapper-object-types',
259
240
  invalidCases: [`const foo: String = 'foo'`, 'const foo: Number = 1'],
260
- validCases: [
261
- 'const foo: Function = () => 1',
262
- 'const foo: object = {}',
263
- 'const foo: {} = {}',
264
- ],
241
+ })
242
+
243
+ testRule({
244
+ ruleId: '@typescript-eslint/no-unsafe-function-type',
245
+ validCases: ['const foo: Function = () => 1'],
246
+ })
247
+
248
+ testRule({
249
+ ruleId: '@typescript-eslint/no-empty-object-type',
250
+ validCases: ['const foo: {} = {}'],
265
251
  })
266
252
 
267
253
  testRule({
@@ -64,16 +64,7 @@ module.exports = {
64
64
  },
65
65
  },
66
66
  rules: {
67
- // override standard - allows function foo() {} instead of function foo () {}
68
67
  'space-before-function-paren': 'off',
69
- '@typescript-eslint/space-before-function-paren': [
70
- 'error',
71
- {
72
- anonymous: 'always',
73
- named: 'never',
74
- asyncArrow: 'always',
75
- },
76
- ],
77
68
  // newlines between variable declarations, returns, if blocks
78
69
  'padding-line-between-statements': [
79
70
  'error',
@@ -233,7 +224,7 @@ module.exports = {
233
224
  // already covered by @typescript-eslint/no-non-null-assertion
234
225
  '@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
235
226
  '@typescript-eslint/explicit-member-accessibility': 'off',
236
- '@typescript-eslint/no-var-requires': 'off',
227
+ '@typescript-eslint/no-require-imports': 'off',
237
228
  // must be turned off in favor of typescript-eslint/no-use-before-define
238
229
  'no-use-before-define': 'off',
239
230
  '@typescript-eslint/no-use-before-define': [
@@ -248,7 +239,6 @@ module.exports = {
248
239
  '@typescript-eslint/no-explicit-any': 'warn',
249
240
  '@typescript-eslint/ban-ts-comment': 'warn',
250
241
  '@typescript-eslint/no-empty-interface': 'off',
251
- '@typescript-eslint/member-delimiter-style': 'off',
252
242
  // must be turned off in favor of typescript-eslint/no-shadow
253
243
  'no-shadow': 'off',
254
244
  '@typescript-eslint/no-shadow': ['warn'],
@@ -258,24 +248,13 @@ module.exports = {
258
248
  // must be turned off in favor of typescript-eslint/no-unused-vars
259
249
  'no-unused-vars': 'off',
260
250
  '@typescript-eslint/no-unused-vars': 'error',
261
- // must be turned off in favor of typescript-eslint/func-call-spacing
262
251
  'func-call-spacing': 'off',
263
- '@typescript-eslint/func-call-spacing': 'error',
264
252
  // must be turned off in favor of typescript-eslint/no-unused-expressions
265
253
  'no-unused-expressions': 'off',
266
254
  '@typescript-eslint/no-unused-expressions': ['error'],
267
255
  '@typescript-eslint/no-empty-function': 'off',
268
- '@typescript-eslint/ban-types': [
269
- 'error',
270
- {
271
- extendDefaults: true,
272
- types: {
273
- '{}': false,
274
- Function: false,
275
- object: false,
276
- },
277
- },
278
- ],
256
+ '@typescript-eslint/no-empty-object-type': 'off',
257
+ '@typescript-eslint/no-unsafe-function-type': 'off',
279
258
  '@typescript-eslint/consistent-type-assertions': 'off',
280
259
  '@typescript-eslint/consistent-type-definitions': 'off',
281
260
  '@typescript-eslint/consistent-indexed-object-style': 'off',
@@ -351,20 +330,7 @@ module.exports = {
351
330
  'Please add either a full URL to Jira issue or a short form: [ABC-1234] ',
352
331
  },
353
332
  ],
354
- 'comma-dangle': 'off', // Turned off in favor of the typescript-eslint alternative
355
- '@typescript-eslint/comma-dangle': [
356
- 'error',
357
- {
358
- arrays: 'always-multiline',
359
- objects: 'always-multiline',
360
- imports: 'always-multiline',
361
- exports: 'always-multiline',
362
- functions: 'never',
363
- enums: 'always-multiline',
364
- generics: 'ignore',
365
- tuples: 'never',
366
- },
367
- ],
333
+ 'comma-dangle': 'off',
368
334
  '@typescript-eslint/consistent-type-imports': [
369
335
  'error',
370
336
  {
@@ -445,6 +411,7 @@ module.exports = {
445
411
  parser: 'eslint-plugin-markdownlint/parser',
446
412
  rules: {
447
413
  '@toptal/davinci/consistent-changesets': 'error',
414
+ '@typescript-eslint/consistent-type-imports': 'off',
448
415
  },
449
416
  },
450
417
  ],