eslint-plugin-big-react-app-plugin 0.1.4 → 0.1.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.
- package/lib/rules/public-api-imports.js +18 -3
- package/package.json +2 -1
- package/tests/lib/rules/public-api-imports.js +13 -4
- package/.history/.gitignore_20251018083109 +0 -0
- package/.history/.gitignore_20251018083124 +0 -1
- package/.history/lib/helpers/index_20251018083334.js +0 -0
- package/.history/lib/helpers/index_20251018083357.js +0 -6
- package/.history/lib/helpers/index_20251018083414.js +0 -6
- package/.history/lib/helpers/index_20251018083417.js +0 -6
- package/.history/lib/helpers/index_20251018083618.js +0 -6
- package/.history/lib/helpers/index_20251018092620.js +0 -6
- package/.history/lib/helpers/index_20251018092627.js +0 -6
- package/.history/lib/rules/path-checker_20250906110609.js +0 -76
- package/.history/lib/rules/path-checker_20251016170231.js +0 -76
- package/.history/lib/rules/path-checker_20251016170238.js +0 -76
- package/.history/lib/rules/path-checker_20251016170240.js +0 -76
- package/.history/lib/rules/path-checker_20251016170512.js +0 -76
- package/.history/lib/rules/path-checker_20251016170543.js +0 -78
- package/.history/lib/rules/path-checker_20251016170608.js +0 -81
- package/.history/lib/rules/path-checker_20251016170627.js +0 -81
- package/.history/lib/rules/path-checker_20251016170714.js +0 -81
- package/.history/lib/rules/path-checker_20251016170716.js +0 -83
- package/.history/lib/rules/path-checker_20251016170723.js +0 -84
- package/.history/lib/rules/path-checker_20251016170726.js +0 -84
- package/.history/lib/rules/path-checker_20251016170750.js +0 -85
- package/.history/lib/rules/path-checker_20251016170808.js +0 -85
- package/.history/lib/rules/path-checker_20251016170811.js +0 -85
- package/.history/lib/rules/path-checker_20251016170821.js +0 -85
- package/.history/lib/rules/path-checker_20251016170941.js +0 -86
- package/.history/lib/rules/path-checker_20251016170953.js +0 -86
- package/.history/lib/rules/path-checker_20251016171234.js +0 -87
- package/.history/lib/rules/path-checker_20251016171235.js +0 -87
- package/.history/lib/rules/path-checker_20251016171244.js +0 -87
- package/.history/lib/rules/path-checker_20251016192227.js +0 -89
- package/.history/lib/rules/path-checker_20251016192245.js +0 -89
- package/.history/lib/rules/path-checker_20251018083151.js +0 -89
- package/.history/lib/rules/path-checker_20251018083710.js +0 -87
- package/.history/lib/rules/public-api-imports_20251018083042.js +0 -44
- package/.history/lib/rules/public-api-imports_20251018083211.js +0 -50
- package/.history/lib/rules/public-api-imports_20251018083235.js +0 -43
- package/.history/lib/rules/public-api-imports_20251018083244.js +0 -51
- package/.history/lib/rules/public-api-imports_20251018083454.js +0 -51
- package/.history/lib/rules/public-api-imports_20251018083640.js +0 -40
- package/.history/lib/rules/public-api-imports_20251018083748.js +0 -42
- package/.history/lib/rules/public-api-imports_20251018083818.js +0 -42
- package/.history/lib/rules/public-api-imports_20251018084540.js +0 -41
- package/.history/lib/rules/public-api-imports_20251018084843.js +0 -44
- package/.history/lib/rules/public-api-imports_20251018084847.js +0 -44
- package/.history/lib/rules/public-api-imports_20251018084906.js +0 -44
- package/.history/lib/rules/public-api-imports_20251018084913.js +0 -43
- package/.history/lib/rules/public-api-imports_20251018085014.js +0 -48
- package/.history/lib/rules/public-api-imports_20251018085807.js +0 -48
- package/.history/lib/rules/public-api-imports_20251018090400.js +0 -58
- package/.history/lib/rules/public-api-imports_20251018091033.js +0 -60
- package/.history/lib/rules/public-api-imports_20251018092312.js +0 -61
- package/.history/lib/rules/public-api-imports_20251018092340.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018093209.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018093226.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018093319.js +0 -63
- package/.history/lib/rules/public-api-imports_20251018094349.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094423.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094442.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094512.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094549.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094630.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094655.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094728.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094729.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018094801.js +0 -62
- package/.history/lib/rules/public-api-imports_20251018095046.js +0 -61
- package/.history/package_20250906110616.json +0 -32
- package/.history/package_20251016192249.json +0 -32
- package/.history/package_20251018085916.json +0 -32
- package/.history/package_20251018090415.json +0 -32
- package/.history/package_20251018091504.json +0 -32
- package/.history/package_20251018092723.json +0 -32
- package/.history/package_20251018095035.json +0 -32
- package/.history/tests/lib/rules/path-checker_20250906083402.js +0 -31
- package/.history/tests/lib/rules/path-checker_20251016165925.js +0 -33
- package/.history/tests/lib/rules/path-checker_20251016170059.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170109.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170128.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170147.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170208.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170246.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170253.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170255.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170323.js +0 -34
- package/.history/tests/lib/rules/path-checker_20251016170411.js +0 -38
- package/.history/tests/lib/rules/path-checker_20251016170459.js +0 -38
- package/.history/tests/lib/rules/path-checker_20251016171025.js +0 -43
- package/.history/tests/lib/rules/path-checker_20251016171041.js +0 -43
- package/.history/tests/lib/rules/path-checker_20251016171053.js +0 -43
- package/.history/tests/lib/rules/path-checker_20251016171136.js +0 -42
- package/.history/tests/lib/rules/path-checker_20251016171410.js +0 -44
- package/.history/tests/lib/rules/public-api-imports_20251018083042.js +0 -31
- package/.history/tests/lib/rules/public-api-imports_20251018085128.js +0 -34
- package/.history/tests/lib/rules/public-api-imports_20251018085249.js +0 -34
- package/.history/tests/lib/rules/public-api-imports_20251018085350.js +0 -40
- package/.history/tests/lib/rules/public-api-imports_20251018085726.js +0 -36
- package/.history/tests/lib/rules/public-api-imports_20251018090807.js +0 -86
- package/.history/tests/lib/rules/public-api-imports_20251018094915.js +0 -86
- package/.history/tests/lib/rules/public-api-imports_20251018094931.js +0 -78
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const {isPathRelative} = require("../helpers")
|
|
3
|
-
module.exports = {
|
|
4
|
-
meta: {
|
|
5
|
-
type: null,
|
|
6
|
-
docs: {
|
|
7
|
-
description: "description",
|
|
8
|
-
category: "Fill me in",
|
|
9
|
-
recommended: false,
|
|
10
|
-
url: null,
|
|
11
|
-
},
|
|
12
|
-
fixable: null,
|
|
13
|
-
schema: [
|
|
14
|
-
{
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
alias: {
|
|
18
|
-
type: 'string'
|
|
19
|
-
},
|
|
20
|
-
testFilesPatterns: {
|
|
21
|
-
type: 'array'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
create(context) {
|
|
30
|
-
const checkingLayers = {
|
|
31
|
-
"entities":"entities",
|
|
32
|
-
"features":"features",
|
|
33
|
-
"pages":"pages",
|
|
34
|
-
"widgets":"widgets",
|
|
35
|
-
}
|
|
36
|
-
const alias = context.options[0]?.alias ?? "";
|
|
37
|
-
return {
|
|
38
|
-
ImportDeclaration(node) {
|
|
39
|
-
// example app/entities/Article
|
|
40
|
-
const value = node.source.value;
|
|
41
|
-
const importTo = alias ? value.replace(`${alias}/`, "") : value;
|
|
42
|
-
//если путь относительный то выходим
|
|
43
|
-
if(isPathRelative(importTo)){
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
//[enteties, article, ... далее еще что-то может быть]
|
|
47
|
-
const segments = importTo.split('/')
|
|
48
|
-
const layer = segments[0]//получаем слой
|
|
49
|
-
// проверяем что есть слой из массива
|
|
50
|
-
if(!checkingLayers[layer]){
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
console.log("Работает" + segments.length)
|
|
54
|
-
const isImportNotFromPublicApi = segments.length > 2;
|
|
55
|
-
|
|
56
|
-
if(isImportNotFromPublicApi) {
|
|
57
|
-
context.report({node: node, message: 'Абсолютный импорт разрешен только из Public Api(index.ts)'});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const {isPathRelative} = require("../helpers")
|
|
3
|
-
module.exports = {
|
|
4
|
-
meta: {
|
|
5
|
-
type: null,
|
|
6
|
-
docs: {
|
|
7
|
-
description: "description",
|
|
8
|
-
category: "Fill me in",
|
|
9
|
-
recommended: false,
|
|
10
|
-
url: null,
|
|
11
|
-
},
|
|
12
|
-
fixable: null,
|
|
13
|
-
schema: [
|
|
14
|
-
{
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
alias: {
|
|
18
|
-
type: 'string'
|
|
19
|
-
},
|
|
20
|
-
testFilesPatterns: {
|
|
21
|
-
type: 'array'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
create(context) {
|
|
30
|
-
const checkingLayers = {
|
|
31
|
-
"entities":"entities",
|
|
32
|
-
"features":"features",
|
|
33
|
-
"pages":"pages",
|
|
34
|
-
"widgets":"widgets",
|
|
35
|
-
}
|
|
36
|
-
const alias = context.options[0]?.alias ?? "";
|
|
37
|
-
return {
|
|
38
|
-
ImportDeclaration(node) {
|
|
39
|
-
// example app/entities/Article
|
|
40
|
-
const value = node.source.value;
|
|
41
|
-
const importTo = alias ? value.replace(`${alias}/`, "") : value;
|
|
42
|
-
//если путь относительный то выходим
|
|
43
|
-
if(isPathRelative(importTo)){
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
//[enteties, article, ... далее еще что-то может быть]
|
|
47
|
-
const segments = importTo.split('/')
|
|
48
|
-
const layer = segments[0]//получаем слой
|
|
49
|
-
// проверяем что есть слой из массива
|
|
50
|
-
if(!checkingLayers[layer]){
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const isImportNotFromPublicApi = segments.length > 2;
|
|
54
|
-
|
|
55
|
-
if(isImportNotFromPublicApi) {
|
|
56
|
-
context.report({node: node, message: 'Абсолютный импорт разрешен только из Public Api(index.ts)'});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.0.7",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.0.8",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.1",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.2",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.3",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.4",
|
|
4
|
-
"description": "plugin for prod proj",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintplugin",
|
|
8
|
-
"eslint-plugin"
|
|
9
|
-
],
|
|
10
|
-
"author": "Vasilii",
|
|
11
|
-
"main": "lib/index.js",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"test": "mocha tests --recursive"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"requireindex": "^1.2.0"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"eslint": "^8.0.1",
|
|
21
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
22
|
-
"eslint-plugin-node": "^11.1.0",
|
|
23
|
-
"mocha": "^9.1.3"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": "12.x || 14.x || >= 16"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"eslint": ">=6"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC"
|
|
32
|
-
}
|
|
@@ -1,31 +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
|
-
ruleTester.run("path-checker", rule, {
|
|
21
|
-
valid: [
|
|
22
|
-
// give me some code that won't trigger a warning
|
|
23
|
-
],
|
|
24
|
-
|
|
25
|
-
invalid: [
|
|
26
|
-
{
|
|
27
|
-
code: "",
|
|
28
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
});
|
|
@@ -1,33 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "",
|
|
30
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "",
|
|
30
|
-
filename:'C:\Users\ADMIN\Documents\GitHub\ulbi\big-react-app\src\shared\ui\Popups\ui\ListBox\ListBox.tsx'
|
|
31
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "",
|
|
30
|
-
filename:'C:\Users\ADMIN\Documents\GitHub\\ulbi\big-react-app\src\shared\\ui\Popups\\ui\ListBox\ListBox.tsx'
|
|
31
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "",
|
|
30
|
-
filename:'C:\Users\ADMIN\Documents\GitHub\\ulbi\big-react-app\src\shared\\ui\Popups\\ui\ListBox\ListBox.tsx',
|
|
31
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "",
|
|
30
|
-
filename:'C:\\Users\\ADMIN\\Documents\\GitHub\\ulbi\big-react-app\\src\\shared\\ui\\Popups\\ui\ListBox\\ListBox.tsx',
|
|
31
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "import { HStack } from '@/shared/ui/Stack/index'",
|
|
30
|
-
filename:'C:\\Users\\ADMIN\\Documents\\GitHub\\ulbi\big-react-app\\src\\shared\\ui\\Popups\\ui\ListBox\\ListBox.tsx',
|
|
31
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "import { HStack } from '@/shared/ui/Stack/index'",
|
|
30
|
-
filename:'C:\\Users\\ADMIN\\Documents\\GitHub\\ulbi\big-react-app\\src\\shared\\ui\\Popups\\ui\ListBox\\ListBox.tsx',
|
|
31
|
-
errors: [{ message: "В рамках одного слайса все пути должны быть относительными", type: "Me too" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|
|
@@ -1,34 +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
|
-
// give me some code that won't trigger a warning
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
invalid: [
|
|
28
|
-
{
|
|
29
|
-
code: "import { HStack } from '@/shared/ui/Stack/index'",
|
|
30
|
-
filename:'C:\\Users\\ADMIN\\Documents\\GitHub\\ulbi\big-react-app\\src\\shared\\ui\\Popups\\ui\ListBox\\ListBox.tsx',
|
|
31
|
-
errors: [{ message: "В рамках одного слайса все пути должны быть относительными" }],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
});
|