eslint-plugin-big-react-app-plugin 0.2.4 → 0.2.6

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.
Files changed (98) hide show
  1. package/lib/rules/path-checker.js +18 -4
  2. package/package.json +1 -1
  3. package/.history/lib/rules/layer-imports_20251101143845.js +0 -44
  4. package/.history/lib/rules/layer-imports_20251101144032.js +0 -106
  5. package/.history/lib/rules/layer-imports_20251101144044.js +0 -106
  6. package/.history/lib/rules/layer-imports_20251101144137.js +0 -106
  7. package/.history/lib/rules/layer-imports_20251101144214.js +0 -110
  8. package/.history/lib/rules/public-api-imports_20251028164625.js +0 -76
  9. package/.history/lib/rules/public-api-imports_20251028165757.js +0 -75
  10. package/.history/lib/rules/public-api-imports_20251028165803.js +0 -75
  11. package/.history/lib/rules/public-api-imports_20251029144637.js +0 -74
  12. package/.history/lib/rules/public-api-imports_20251029144640.js +0 -75
  13. package/.history/lib/rules/public-api-imports_20251029144926.js +0 -75
  14. package/.history/lib/rules/public-api-imports_20251029144953.js +0 -75
  15. package/.history/lib/rules/public-api-imports_20251029145009.js +0 -75
  16. package/.history/lib/rules/public-api-imports_20251029145022.js +0 -75
  17. package/.history/lib/rules/public-api-imports_20251029145049.js +0 -75
  18. package/.history/lib/rules/public-api-imports_20251030070810.js +0 -76
  19. package/.history/lib/rules/public-api-imports_20251030070822.js +0 -76
  20. package/.history/lib/rules/public-api-imports_20251030072017.js +0 -77
  21. package/.history/lib/rules/public-api-imports_20251030072333.js +0 -76
  22. package/.history/lib/rules/public-api-imports_20251030072413.js +0 -76
  23. package/.history/lib/rules/public-api-imports_20251030072442.js +0 -76
  24. package/.history/lib/rules/public-api-imports_20251030072512.js +0 -76
  25. package/.history/lib/rules/public-api-imports_20251030073010.js +0 -77
  26. package/.history/lib/rules/public-api-imports_20251030073013.js +0 -77
  27. package/.history/lib/rules/public-api-imports_20251030073246.js +0 -77
  28. package/.history/lib/rules/public-api-imports_20251205122825.js +0 -77
  29. package/.history/lib/rules/public-api-imports_20251205122909.js +0 -80
  30. package/.history/lib/rules/public-api-imports_20251205123003.js +0 -83
  31. package/.history/lib/rules/public-api-imports_20251205123008.js +0 -83
  32. package/.history/lib/rules/public-api-imports_20251205123034.js +0 -84
  33. package/.history/lib/rules/public-api-imports_20251205123130.js +0 -84
  34. package/.history/lib/rules/public-api-imports_20251205123148.js +0 -84
  35. package/.history/lib/rules/public-api-imports_20251205123152.js +0 -84
  36. package/.history/lib/rules/public-api-imports_20251205123439.js +0 -89
  37. package/.history/lib/rules/public-api-imports_20251205123459.js +0 -91
  38. package/.history/lib/rules/public-api-imports_20251205123526.js +0 -91
  39. package/.history/lib/rules/public-api-imports_20251205123607.js +0 -91
  40. package/.history/lib/rules/public-api-imports_20251205123716.js +0 -92
  41. package/.history/lib/rules/public-api-imports_20251205123800.js +0 -92
  42. package/.history/lib/rules/public-api-imports_20251205124519.js +0 -92
  43. package/.history/lib/rules/public-api-imports_20251205124522.js +0 -92
  44. package/.history/lib/rules/public-api-imports_20251205124613.js +0 -92
  45. package/.history/lib/rules/public-api-imports_20251205124633.js +0 -92
  46. package/.history/lib/rules/public-api-imports_20251205124639.js +0 -92
  47. package/.history/lib/rules/public-api-imports_20251205124641.js +0 -92
  48. package/.history/lib/rules/public-api-imports_20251205134735.js +0 -94
  49. package/.history/lib/rules/public-api-imports_20251205134740.js +0 -95
  50. package/.history/lib/rules/public-api-imports_20251205141848.js +0 -95
  51. package/.history/package_20251028164641.json +0 -33
  52. package/.history/package_20251028165941.json +0 -33
  53. package/.history/package_20251029164755.json +0 -33
  54. package/.history/package_20251030070953.json +0 -33
  55. package/.history/package_20251030073306.json +0 -33
  56. package/.history/package_20251102101931.json +0 -33
  57. package/.history/package_20251102101944.json +0 -33
  58. package/.history/package_20251205123841.json +0 -33
  59. package/.history/package_20251205124820.json +0 -33
  60. package/.history/package_20251205134812.json +0 -33
  61. package/.history/package_20251205141859.json +0 -33
  62. package/.history/tests/lib/rules/layer-imports_20251101143845.js +0 -31
  63. package/.history/tests/lib/rules/layer-imports_20251101144101.js +0 -77
  64. package/.history/tests/lib/rules/layer-imports_20251101144110.js +0 -81
  65. package/.history/tests/lib/rules/layer-imports_20251101144121.js +0 -83
  66. package/.history/tests/lib/rules/layer-imports_20251101144130.js +0 -97
  67. package/.history/tests/lib/rules/path-checker_19851026131459.js +0 -44
  68. package/.history/tests/lib/rules/path-checker_20251029145043.js +0 -44
  69. package/.history/tests/lib/rules/path-checker_20251029145120.js +0 -44
  70. package/.history/tests/lib/rules/path-checker_20251029145122.js +0 -44
  71. package/.history/tests/lib/rules/path-checker_20251029145130.js +0 -44
  72. package/.history/tests/lib/rules/path-checker_20251029145140.js +0 -44
  73. package/.history/tests/lib/rules/path-checker_20251030070901.js +0 -44
  74. package/.history/tests/lib/rules/path-checker_20251101143521.js +0 -34
  75. package/.history/tests/lib/rules/public-api-imports_20251028164324.js +0 -87
  76. package/.history/tests/lib/rules/public-api-imports_20251029145051.js +0 -87
  77. package/.history/tests/lib/rules/public-api-imports_20251029145116.js +0 -87
  78. package/.history/tests/lib/rules/public-api-imports_20251029145250.js +0 -87
  79. package/.history/tests/lib/rules/public-api-imports_20251029145328.js +0 -96
  80. package/.history/tests/lib/rules/public-api-imports_20251029145415.js +0 -96
  81. package/.history/tests/lib/rules/public-api-imports_20251029145417.js +0 -96
  82. package/.history/tests/lib/rules/public-api-imports_20251029145434.js +0 -96
  83. package/.history/tests/lib/rules/public-api-imports_20251029150710.js +0 -96
  84. package/.history/tests/lib/rules/public-api-imports_20251029150715.js +0 -96
  85. package/.history/tests/lib/rules/public-api-imports_20251029150734.js +0 -96
  86. package/.history/tests/lib/rules/public-api-imports_20251029150749.js +0 -96
  87. package/.history/tests/lib/rules/public-api-imports_20251029153345.js +0 -96
  88. package/.history/tests/lib/rules/public-api-imports_20251029153548.js +0 -96
  89. package/.history/tests/lib/rules/public-api-imports_20251030070849.js +0 -96
  90. package/.history/tests/lib/rules/public-api-imports_20251030071316.js +0 -96
  91. package/.history/tests/lib/rules/public-api-imports_20251030071331.js +0 -96
  92. package/.history/tests/lib/rules/public-api-imports_20251030073042.js +0 -96
  93. package/.history/tests/lib/rules/public-api-imports_20251030073103.js +0 -96
  94. package/.history/tests/lib/rules/public-api-imports_20251030073107.js +0 -96
  95. package/.history/tests/lib/rules/public-api-imports_20251030073112.js +0 -96
  96. package/.history/tests/lib/rules/public-api-imports_20251101143401.js +0 -95
  97. package/.history/tests/lib/rules/public-api-imports_20251101143431.js +0 -95
  98. package/.history/tests/lib/rules/public-api-imports_20251101143526.js +0 -87
@@ -1,87 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- // valid: [
31
- // {
32
- // code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- // errors: [],
34
- // },
35
- // {
36
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
37
- // errors: [],
38
- // options: aliasOptions,
39
- // },
40
- // {
41
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
42
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
43
- // errors: [],
44
- // options: [{
45
- // alias: '@',
46
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
47
- // }],
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // }
58
- // ],
59
-
60
- invalid: [
61
- {
62
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
63
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
64
- options: aliasOptions,
65
- },
66
- {
67
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
68
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
69
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
70
- options: [{
71
- alias: '@',
72
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
73
- }],
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.ts',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
78
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- }
84
-
85
- ],
86
- });
87
-
@@ -1,87 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- valid: [
31
- {
32
- code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- errors: [],
34
- },
35
- // {
36
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
37
- // errors: [],
38
- // options: aliasOptions,
39
- // },
40
- // {
41
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
42
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
43
- // errors: [],
44
- // options: [{
45
- // alias: '@',
46
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
47
- // }],
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // }
58
- ],
59
-
60
- invalid: [
61
- {
62
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
63
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
64
- options: aliasOptions,
65
- },
66
- {
67
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
68
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
69
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
70
- options: [{
71
- alias: '@',
72
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
73
- }],
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.ts',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
78
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- }
84
-
85
- ],
86
- });
87
-
@@ -1,87 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- valid: [
31
- {
32
- code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- errors: [],
34
- },
35
- // {
36
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
37
- // errors: [],
38
- // options: aliasOptions,
39
- // },
40
- // {
41
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
42
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
43
- // errors: [],
44
- // options: [{
45
- // alias: '@',
46
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
47
- // }],
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // }
58
- ],
59
-
60
- invalid: [
61
- {
62
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
63
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
64
- options: aliasOptions,
65
- },
66
- {
67
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
68
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
69
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
70
- options: [{
71
- alias: '@',
72
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
73
- }],
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.test.ts',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
78
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- }
84
-
85
- ],
86
- });
87
-
@@ -1,96 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- valid: [
31
- {
32
- code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- errors: [],
34
- },
35
- {
36
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.test.ts',
37
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
38
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
39
- options: [{
40
- alias: '@',
41
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
42
- }],
43
- }
44
- // {
45
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
46
- // errors: [],
47
- // options: aliasOptions,
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // },
58
- // {
59
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
60
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
61
- // errors: [],
62
- // options: [{
63
- // alias: '@',
64
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
65
- // }],
66
- // }
67
- ],
68
-
69
- invalid: [
70
- {
71
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
72
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
73
- options: aliasOptions,
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
78
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- },
84
- {
85
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.ts',
86
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
87
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
88
- options: [{
89
- alias: '@',
90
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
91
- }],
92
- }
93
-
94
- ],
95
- });
96
-
@@ -1,96 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- valid: [
31
- {
32
- code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- errors: [],
34
- },
35
- {
36
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.test.ts',
37
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
38
- errors: [],
39
- options: [{
40
- alias: '@',
41
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
42
- }],
43
- }
44
- // {
45
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
46
- // errors: [],
47
- // options: aliasOptions,
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // },
58
- // {
59
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
60
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
61
- // errors: [],
62
- // options: [{
63
- // alias: '@',
64
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
65
- // }],
66
- // }
67
- ],
68
-
69
- invalid: [
70
- {
71
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
72
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
73
- options: aliasOptions,
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
78
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- },
84
- {
85
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.ts',
86
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
87
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
88
- options: [{
89
- alias: '@',
90
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
91
- }],
92
- }
93
-
94
- ],
95
- });
96
-
@@ -1,96 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- valid: [
31
- {
32
- code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- errors: [],
34
- },
35
- {
36
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.test.ts',
37
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
38
- errors: [],
39
- options: [{
40
- alias: '@',
41
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
42
- }],
43
- }
44
- // {
45
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
46
- // errors: [],
47
- // options: aliasOptions,
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // },
58
- // {
59
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
60
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
61
- // errors: [],
62
- // options: [{
63
- // alias: '@',
64
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
65
- // }],
66
- // }
67
- ],
68
-
69
- invalid: [
70
- {
71
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
72
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
73
- options: aliasOptions,
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
78
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- },
84
- {
85
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.ts',
86
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
87
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
88
- options: [{
89
- alias: '@',
90
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
91
- }],
92
- }
93
-
94
- ],
95
- });
96
-
@@ -1,96 +0,0 @@
1
- /**
2
- * @fileoverview public API path checker
3
- * @author vasilii
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- const rule = require("../../../lib/rules/public-api-imports"),
12
- RuleTester = require("eslint").RuleTester;
13
-
14
-
15
- //------------------------------------------------------------------------------
16
- // Tests
17
- //------------------------------------------------------------------------------
18
-
19
- const ruleTester = new RuleTester({
20
- parserOptions: {ecmaVersion: 6, sourceType: 'module'}
21
- });
22
-
23
- const aliasOptions = [
24
- {
25
- alias: '@'
26
- }
27
- ]
28
-
29
- ruleTester.run("public-api-imports", rule, {
30
- valid: [
31
- {
32
- code: "import { addCommentFormActions, addCommentFormReducer } from '../../model/slices/addCommentFormSlice'",
33
- errors: [],
34
- },
35
- {
36
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
37
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
38
- errors: [],
39
- options: [{
40
- alias: '@',
41
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
42
- }],
43
- }
44
- // {
45
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
46
- // errors: [],
47
- // options: aliasOptions,
48
- // },
49
- // {
50
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\file.test.ts',
51
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
52
- // errors: [],
53
- // options: [{
54
- // alias: '@',
55
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
56
- // }],
57
- // },
58
- // {
59
- // filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
60
- // code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
61
- // errors: [],
62
- // options: [{
63
- // alias: '@',
64
- // testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
65
- // }],
66
- // }
67
- ],
68
-
69
- invalid: [
70
- {
71
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/model/file.ts'",
72
- errors: [{ message: "Абсолютный импорт разрешен только из Public API (index.ts)"}],
73
- options: aliasOptions,
74
- },
75
- {
76
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\StoreDecorator.tsx',
77
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing/file.tsx'",
78
- errors: [{message: 'Абсолютный импорт разрешен только из Public API (index.ts)'}],
79
- options: [{
80
- alias: '@',
81
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
82
- }],
83
- },
84
- {
85
- filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\forbidden.ts',
86
- code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article/testing'",
87
- errors: [{message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'}],
88
- options: [{
89
- alias: '@',
90
- testFilesPatterns: ['**/*.test.ts', '**/*.test.ts', '**/StoreDecorator.tsx']
91
- }],
92
- }
93
-
94
- ],
95
- });
96
-