eslint-plugin-big-react-app-plugin 0.2.0 → 0.2.2

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 (24) hide show
  1. package/.history/lib/rules/public-api-imports_20251205122825.js +77 -0
  2. package/.history/lib/rules/public-api-imports_20251205122909.js +80 -0
  3. package/.history/lib/rules/public-api-imports_20251205123003.js +83 -0
  4. package/.history/lib/rules/public-api-imports_20251205123008.js +83 -0
  5. package/.history/lib/rules/public-api-imports_20251205123034.js +84 -0
  6. package/.history/lib/rules/public-api-imports_20251205123130.js +84 -0
  7. package/.history/lib/rules/public-api-imports_20251205123148.js +84 -0
  8. package/.history/lib/rules/public-api-imports_20251205123152.js +84 -0
  9. package/.history/lib/rules/public-api-imports_20251205123439.js +89 -0
  10. package/.history/lib/rules/public-api-imports_20251205123459.js +91 -0
  11. package/.history/lib/rules/public-api-imports_20251205123526.js +91 -0
  12. package/.history/lib/rules/public-api-imports_20251205123607.js +91 -0
  13. package/.history/lib/rules/public-api-imports_20251205123716.js +92 -0
  14. package/.history/lib/rules/public-api-imports_20251205123800.js +92 -0
  15. package/.history/lib/rules/public-api-imports_20251205124519.js +92 -0
  16. package/.history/lib/rules/public-api-imports_20251205124522.js +92 -0
  17. package/.history/lib/rules/public-api-imports_20251205124613.js +92 -0
  18. package/.history/lib/rules/public-api-imports_20251205124633.js +92 -0
  19. package/.history/lib/rules/public-api-imports_20251205124639.js +92 -0
  20. package/.history/lib/rules/public-api-imports_20251205124641.js +92 -0
  21. package/.history/package_20251205123841.json +33 -0
  22. package/.history/package_20251205124820.json +33 -0
  23. package/lib/rules/public-api-imports.js +18 -3
  24. package/package.json +1 -1
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+ module.exports = {
6
+ meta: {
7
+ type: null,
8
+ docs: {
9
+ description: "description",
10
+ category: "Fill me in",
11
+ recommended: false,
12
+ url: null,
13
+ },
14
+ fixable: code,
15
+ schema: [
16
+ {
17
+ type: 'object',
18
+ properties: {
19
+ alias: {
20
+ type: 'string'
21
+ },
22
+ testFilesPatterns: {
23
+ type: 'array'
24
+ }
25
+ }
26
+ }
27
+ ],
28
+ },
29
+
30
+
31
+ create(context) {
32
+ const checkingLayers = {
33
+ "entities":"entities",
34
+ "features":"features",
35
+ "pages":"pages",
36
+ "widgets":"widgets",
37
+ }
38
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
39
+ return {
40
+ ImportDeclaration(node) {
41
+ // example app/entities/Article
42
+ const value = node.source.value;
43
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
44
+
45
+ //если путь относительный то выходим
46
+ if(isPathRelative(importTo)){
47
+ return;
48
+ }
49
+ //[enteties, article, ... далее еще что-то может быть]
50
+ const segments = importTo.split('/')
51
+ const layer = segments[0]//получаем слой
52
+ // проверяем что есть слой из массива
53
+
54
+ //[enteties, article, testing]
55
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
56
+
57
+ if(!checkingLayers[layer]){
58
+ return;
59
+ }
60
+ const isImportNotFromPublicApi = segments.length > 2;
61
+
62
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
63
+ context.report({node: node, message: 'Абсолютный импорт разрешен только из Public API (index.ts)'});
64
+ }
65
+
66
+ if(isTestingPublicApi){
67
+ const currentFilePath = context.getFilename();
68
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
69
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
70
+ if(!isCurrentFileTesting){
71
+ context.report({node: node, message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'});
72
+ }
73
+ }
74
+ }
75
+ };
76
+ },
77
+ };
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ schema: [
19
+ {
20
+ type: 'object',
21
+ properties: {
22
+ alias: {
23
+ type: 'string'
24
+ },
25
+ testFilesPatterns: {
26
+ type: 'array'
27
+ }
28
+ }
29
+ }
30
+ ],
31
+ },
32
+
33
+
34
+ create(context) {
35
+ const checkingLayers = {
36
+ "entities":"entities",
37
+ "features":"features",
38
+ "pages":"pages",
39
+ "widgets":"widgets",
40
+ }
41
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
42
+ return {
43
+ ImportDeclaration(node) {
44
+ // example app/entities/Article
45
+ const value = node.source.value;
46
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
47
+
48
+ //если путь относительный то выходим
49
+ if(isPathRelative(importTo)){
50
+ return;
51
+ }
52
+ //[enteties, article, ... далее еще что-то может быть]
53
+ const segments = importTo.split('/')
54
+ const layer = segments[0]//получаем слой
55
+ // проверяем что есть слой из массива
56
+
57
+ //[enteties, article, testing]
58
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
59
+
60
+ if(!checkingLayers[layer]){
61
+ return;
62
+ }
63
+ const isImportNotFromPublicApi = segments.length > 2;
64
+
65
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
66
+ context.report({node: node, message: 'Абсолютный импорт разрешен только из Public API (index.ts)'});
67
+ }
68
+
69
+ if(isTestingPublicApi){
70
+ const currentFilePath = context.getFilename();
71
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
72
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
73
+ if(!isCurrentFileTesting){
74
+ context.report({node: node, message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'});
75
+ }
76
+ }
77
+ }
78
+ };
79
+ },
80
+ };
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ messages:{
19
+ [PUBLIC_ERROR]:'Абсолютный импорт разрешен только из Public API (index.ts'
20
+ },
21
+ schema: [
22
+ {
23
+ type: 'object',
24
+ properties: {
25
+ alias: {
26
+ type: 'string'
27
+ },
28
+ testFilesPatterns: {
29
+ type: 'array'
30
+ }
31
+ }
32
+ }
33
+ ],
34
+ },
35
+
36
+
37
+ create(context) {
38
+ const checkingLayers = {
39
+ "entities":"entities",
40
+ "features":"features",
41
+ "pages":"pages",
42
+ "widgets":"widgets",
43
+ }
44
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
45
+ return {
46
+ ImportDeclaration(node) {
47
+ // example app/entities/Article
48
+ const value = node.source.value;
49
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
50
+
51
+ //если путь относительный то выходим
52
+ if(isPathRelative(importTo)){
53
+ return;
54
+ }
55
+ //[enteties, article, ... далее еще что-то может быть]
56
+ const segments = importTo.split('/')
57
+ const layer = segments[0]//получаем слой
58
+ // проверяем что есть слой из массива
59
+
60
+ //[enteties, article, testing]
61
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
62
+
63
+ if(!checkingLayers[layer]){
64
+ return;
65
+ }
66
+ const isImportNotFromPublicApi = segments.length > 2;
67
+
68
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
69
+ context.report({node: node, message: 'Абсолютный импорт разрешен только из Public API (index.ts)'});
70
+ }
71
+
72
+ if(isTestingPublicApi){
73
+ const currentFilePath = context.getFilename();
74
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
75
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
76
+ if(!isCurrentFileTesting){
77
+ context.report({node: node, message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'});
78
+ }
79
+ }
80
+ }
81
+ };
82
+ },
83
+ };
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ messages:{
19
+ [PUBLIC_ERROR]:'Абсолютный импорт разрешен только из Public API (index.ts'
20
+ },
21
+ schema: [
22
+ {
23
+ type: 'object',
24
+ properties: {
25
+ alias: {
26
+ type: 'string'
27
+ },
28
+ testFilesPatterns: {
29
+ type: 'array'
30
+ }
31
+ }
32
+ }
33
+ ],
34
+ },
35
+
36
+
37
+ create(context) {
38
+ const checkingLayers = {
39
+ "entities":"entities",
40
+ "features":"features",
41
+ "pages":"pages",
42
+ "widgets":"widgets",
43
+ }
44
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
45
+ return {
46
+ ImportDeclaration(node) {
47
+ // example app/entities/Article
48
+ const value = node.source.value;
49
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
50
+
51
+ //если путь относительный то выходим
52
+ if(isPathRelative(importTo)){
53
+ return;
54
+ }
55
+ //[enteties, article, ... далее еще что-то может быть]
56
+ const segments = importTo.split('/')
57
+ const layer = segments[0]//получаем слой
58
+ // проверяем что есть слой из массива
59
+
60
+ //[enteties, article, testing]
61
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
62
+
63
+ if(!checkingLayers[layer]){
64
+ return;
65
+ }
66
+ const isImportNotFromPublicApi = segments.length > 2;
67
+
68
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
69
+ context.report({node: node, message: 'Абсолютный импорт разрешен только из Public API (index.ts)'});
70
+ }
71
+
72
+ if(isTestingPublicApi){
73
+ const currentFilePath = context.getFilename();
74
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
75
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
76
+ if(!isCurrentFileTesting){
77
+ context.report({node: node, message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'});
78
+ }
79
+ }
80
+ }
81
+ };
82
+ },
83
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ messages:{
19
+ [PUBLIC_ERROR]:'Абсолютный импорт разрешен только из Public API (index.ts',
20
+ [TEST_PUBLIC_ERROR]:'Тестовые данные необходимо импортировать из publicApi/testing.ts'
21
+ },
22
+ schema: [
23
+ {
24
+ type: 'object',
25
+ properties: {
26
+ alias: {
27
+ type: 'string'
28
+ },
29
+ testFilesPatterns: {
30
+ type: 'array'
31
+ }
32
+ }
33
+ }
34
+ ],
35
+ },
36
+
37
+
38
+ create(context) {
39
+ const checkingLayers = {
40
+ "entities":"entities",
41
+ "features":"features",
42
+ "pages":"pages",
43
+ "widgets":"widgets",
44
+ }
45
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
46
+ return {
47
+ ImportDeclaration(node) {
48
+ // example app/entities/Article
49
+ const value = node.source.value;
50
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
51
+
52
+ //если путь относительный то выходим
53
+ if(isPathRelative(importTo)){
54
+ return;
55
+ }
56
+ //[enteties, article, ... далее еще что-то может быть]
57
+ const segments = importTo.split('/')
58
+ const layer = segments[0]//получаем слой
59
+ // проверяем что есть слой из массива
60
+
61
+ //[enteties, article, testing]
62
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
63
+
64
+ if(!checkingLayers[layer]){
65
+ return;
66
+ }
67
+ const isImportNotFromPublicApi = segments.length > 2;
68
+
69
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
70
+ context.report({node: node, message: 'Абсолютный импорт разрешен только из Public API (index.ts)'});
71
+ }
72
+
73
+ if(isTestingPublicApi){
74
+ const currentFilePath = context.getFilename();
75
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
76
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
77
+ if(!isCurrentFileTesting){
78
+ context.report({node: node, message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'});
79
+ }
80
+ }
81
+ }
82
+ };
83
+ },
84
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ messages:{
19
+ [PUBLIC_ERROR]:'Абсолютный импорт разрешен только из Public API (index.ts',
20
+ [TEST_PUBLIC_ERROR]:'Тестовые данные необходимо импортировать из publicApi/testing.ts'
21
+ },
22
+ schema: [
23
+ {
24
+ type: 'object',
25
+ properties: {
26
+ alias: {
27
+ type: 'string'
28
+ },
29
+ testFilesPatterns: {
30
+ type: 'array'
31
+ }
32
+ }
33
+ }
34
+ ],
35
+ },
36
+
37
+
38
+ create(context) {
39
+ const checkingLayers = {
40
+ "entities":"entities",
41
+ "features":"features",
42
+ "pages":"pages",
43
+ "widgets":"widgets",
44
+ }
45
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
46
+ return {
47
+ ImportDeclaration(node) {
48
+ // example app/entities/Article
49
+ const value = node.source.value;
50
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
51
+
52
+ //если путь относительный то выходим
53
+ if(isPathRelative(importTo)){
54
+ return;
55
+ }
56
+ //[enteties, article, ... далее еще что-то может быть]
57
+ const segments = importTo.split('/')
58
+ const layer = segments[0]//получаем слой
59
+ // проверяем что есть слой из массива
60
+
61
+ //[enteties, article, testing]
62
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
63
+
64
+ if(!checkingLayers[layer]){
65
+ return;
66
+ }
67
+ const isImportNotFromPublicApi = segments.length > 2;
68
+
69
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
70
+ context.report({node, messageId:PUBLIC_ERROR});
71
+ }
72
+
73
+ if(isTestingPublicApi){
74
+ const currentFilePath = context.getFilename();
75
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
76
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
77
+ if(!isCurrentFileTesting){
78
+ context.report({node: node, message: 'Тестовые данные необходимо импортировать из publicApi/testing.ts'});
79
+ }
80
+ }
81
+ }
82
+ };
83
+ },
84
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ messages:{
19
+ [PUBLIC_ERROR]:'Абсолютный импорт разрешен только из Public API (index.ts',
20
+ [TEST_PUBLIC_ERROR]:'Тестовые данные необходимо импортировать из publicApi/testing.ts'
21
+ },
22
+ schema: [
23
+ {
24
+ type: 'object',
25
+ properties: {
26
+ alias: {
27
+ type: 'string'
28
+ },
29
+ testFilesPatterns: {
30
+ type: 'array'
31
+ }
32
+ }
33
+ }
34
+ ],
35
+ },
36
+
37
+
38
+ create(context) {
39
+ const checkingLayers = {
40
+ "entities":"entities",
41
+ "features":"features",
42
+ "pages":"pages",
43
+ "widgets":"widgets",
44
+ }
45
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
46
+ return {
47
+ ImportDeclaration(node) {
48
+ // example app/entities/Article
49
+ const value = node.source.value;
50
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
51
+
52
+ //если путь относительный то выходим
53
+ if(isPathRelative(importTo)){
54
+ return;
55
+ }
56
+ //[enteties, article, ... далее еще что-то может быть]
57
+ const segments = importTo.split('/')
58
+ const layer = segments[0]//получаем слой
59
+ // проверяем что есть слой из массива
60
+
61
+ //[enteties, article, testing]
62
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
63
+
64
+ if(!checkingLayers[layer]){
65
+ return;
66
+ }
67
+ const isImportNotFromPublicApi = segments.length > 2;
68
+
69
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
70
+ context.report({node, messageId:PUBLIC_ERROR});
71
+ }
72
+
73
+ if(isTestingPublicApi){
74
+ const currentFilePath = context.getFilename();
75
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
76
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
77
+ if(!isCurrentFileTesting){
78
+ context.report({node, messsageId:TEST_PUBLIC_ERROR});
79
+ }
80
+ }
81
+ }
82
+ };
83
+ },
84
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ const micromatch = require("micromatch");
3
+ const {isPathRelative} = require("../helpers")
4
+ const path = require("path");
5
+
6
+ const PUBLIC_ERROR = 'PUBLIC_ERROR'
7
+ const TEST_PUBLIC_ERROR = 'TEST_PUBLIC_ERROR'
8
+ module.exports = {
9
+ meta: {
10
+ type: null,
11
+ docs: {
12
+ description: "description",
13
+ category: "Fill me in",
14
+ recommended: false,
15
+ url: null,
16
+ },
17
+ fixable: code,
18
+ messages:{
19
+ [PUBLIC_ERROR]:'Абсолютный импорт разрешен только из Public API (index.ts',
20
+ [TEST_PUBLIC_ERROR]:'Тестовые данные необходимо импортировать из publicApi/testing.ts'
21
+ },
22
+ schema: [
23
+ {
24
+ type: 'object',
25
+ properties: {
26
+ alias: {
27
+ type: 'string'
28
+ },
29
+ testFilesPatterns: {
30
+ type: 'array'
31
+ }
32
+ }
33
+ }
34
+ ],
35
+ },
36
+
37
+
38
+ create(context) {
39
+ const checkingLayers = {
40
+ "entities":"entities",
41
+ "features":"features",
42
+ "pages":"pages",
43
+ "widgets":"widgets",
44
+ }
45
+ const {alias='', testFilesPatterns=[]} = context.options[0] ?? {};
46
+ return {
47
+ ImportDeclaration(node) {
48
+ // example app/entities/Article
49
+ const value = node.source.value;
50
+ const importTo = alias ? value.replace(`${alias}/`, "") : value;
51
+
52
+ //если путь относительный то выходим
53
+ if(isPathRelative(importTo)){
54
+ return;
55
+ }
56
+ //[enteties, article, ... далее еще что-то может быть]
57
+ const segments = importTo.split('/')
58
+ const layer = segments[0]//получаем слой
59
+ // проверяем что есть слой из массива
60
+
61
+ //[enteties, article, testing]
62
+ const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
63
+
64
+ if(!checkingLayers[layer]){
65
+ return;
66
+ }
67
+ const isImportNotFromPublicApi = segments.length > 2;
68
+
69
+ if(isImportNotFromPublicApi && !isTestingPublicApi ) {
70
+ context.report({node, messageId:PUBLIC_ERROR});
71
+ }
72
+
73
+ if(isTestingPublicApi){
74
+ const currentFilePath = context.getFilename();
75
+ const normalizedPath = currentFilePath.split(path.sep).join('/');
76
+ const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
77
+ if(!isCurrentFileTesting){
78
+ context.report({node, messsageId:TEST_PUBLIC_ERROR});
79
+ }
80
+ }
81
+ }
82
+ };
83
+ },
84
+ };