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

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