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.
- package/package.json +1 -1
- package/.history/lib/rules/layer-imports_20251101143845.js +0 -44
- package/.history/lib/rules/layer-imports_20251101144032.js +0 -106
- package/.history/lib/rules/layer-imports_20251101144044.js +0 -106
- package/.history/lib/rules/layer-imports_20251101144137.js +0 -106
- package/.history/lib/rules/layer-imports_20251101144214.js +0 -110
- package/.history/lib/rules/public-api-imports_20251028164625.js +0 -76
- package/.history/lib/rules/public-api-imports_20251028165757.js +0 -75
- package/.history/lib/rules/public-api-imports_20251028165803.js +0 -75
- package/.history/lib/rules/public-api-imports_20251029144637.js +0 -74
- package/.history/lib/rules/public-api-imports_20251029144640.js +0 -75
- package/.history/lib/rules/public-api-imports_20251029144926.js +0 -75
- package/.history/lib/rules/public-api-imports_20251029144953.js +0 -75
- package/.history/lib/rules/public-api-imports_20251029145009.js +0 -75
- package/.history/lib/rules/public-api-imports_20251029145022.js +0 -75
- package/.history/lib/rules/public-api-imports_20251029145049.js +0 -75
- package/.history/lib/rules/public-api-imports_20251030070810.js +0 -76
- package/.history/lib/rules/public-api-imports_20251030070822.js +0 -76
- package/.history/lib/rules/public-api-imports_20251030072017.js +0 -77
- package/.history/lib/rules/public-api-imports_20251030072333.js +0 -76
- package/.history/lib/rules/public-api-imports_20251030072413.js +0 -76
- package/.history/lib/rules/public-api-imports_20251030072442.js +0 -76
- package/.history/lib/rules/public-api-imports_20251030072512.js +0 -76
- package/.history/lib/rules/public-api-imports_20251030073010.js +0 -77
- package/.history/lib/rules/public-api-imports_20251030073013.js +0 -77
- package/.history/lib/rules/public-api-imports_20251030073246.js +0 -77
- package/.history/lib/rules/public-api-imports_20251205122825.js +0 -77
- package/.history/lib/rules/public-api-imports_20251205122909.js +0 -80
- package/.history/lib/rules/public-api-imports_20251205123003.js +0 -83
- package/.history/lib/rules/public-api-imports_20251205123008.js +0 -83
- package/.history/lib/rules/public-api-imports_20251205123034.js +0 -84
- package/.history/lib/rules/public-api-imports_20251205123130.js +0 -84
- package/.history/lib/rules/public-api-imports_20251205123148.js +0 -84
- package/.history/lib/rules/public-api-imports_20251205123152.js +0 -84
- package/.history/lib/rules/public-api-imports_20251205123439.js +0 -89
- package/.history/lib/rules/public-api-imports_20251205123459.js +0 -91
- package/.history/lib/rules/public-api-imports_20251205123526.js +0 -91
- package/.history/lib/rules/public-api-imports_20251205123607.js +0 -91
- package/.history/lib/rules/public-api-imports_20251205123716.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205123800.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205124519.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205124522.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205124613.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205124633.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205124639.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205124641.js +0 -92
- package/.history/lib/rules/public-api-imports_20251205134735.js +0 -94
- package/.history/lib/rules/public-api-imports_20251205134740.js +0 -95
- package/.history/lib/rules/public-api-imports_20251205141848.js +0 -95
- package/.history/package_20251028164641.json +0 -33
- package/.history/package_20251028165941.json +0 -33
- package/.history/package_20251029164755.json +0 -33
- package/.history/package_20251030070953.json +0 -33
- package/.history/package_20251030073306.json +0 -33
- package/.history/package_20251102101931.json +0 -33
- package/.history/package_20251102101944.json +0 -33
- package/.history/package_20251205123841.json +0 -33
- package/.history/package_20251205124820.json +0 -33
- package/.history/package_20251205134812.json +0 -33
- package/.history/package_20251205141859.json +0 -33
- package/.history/tests/lib/rules/layer-imports_20251101143845.js +0 -31
- package/.history/tests/lib/rules/layer-imports_20251101144101.js +0 -77
- package/.history/tests/lib/rules/layer-imports_20251101144110.js +0 -81
- package/.history/tests/lib/rules/layer-imports_20251101144121.js +0 -83
- package/.history/tests/lib/rules/layer-imports_20251101144130.js +0 -97
- package/.history/tests/lib/rules/path-checker_19851026131459.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251029145043.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251029145120.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251029145122.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251029145130.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251029145140.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251030070901.js +0 -44
- package/.history/tests/lib/rules/path-checker_20251101143521.js +0 -34
- package/.history/tests/lib/rules/public-api-imports_20251028164324.js +0 -87
- package/.history/tests/lib/rules/public-api-imports_20251029145051.js +0 -87
- package/.history/tests/lib/rules/public-api-imports_20251029145116.js +0 -87
- package/.history/tests/lib/rules/public-api-imports_20251029145250.js +0 -87
- package/.history/tests/lib/rules/public-api-imports_20251029145328.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029145415.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029145417.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029145434.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029150710.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029150715.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029150734.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029150749.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029153345.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251029153548.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030070849.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030071316.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030071331.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030073042.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030073103.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030073107.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251030073112.js +0 -96
- package/.history/tests/lib/rules/public-api-imports_20251101143401.js +0 -95
- package/.history/tests/lib/rules/public-api-imports_20251101143431.js +0 -95
- package/.history/tests/lib/rules/public-api-imports_20251101143526.js +0 -87
|
@@ -1,95 +0,0 @@
|
|
|
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
|
-
const slice = segments[1]//получаем slice Article
|
|
60
|
-
// проверяем что есть слой из массива
|
|
61
|
-
|
|
62
|
-
//[enteties, article, testing]
|
|
63
|
-
const isTestingPublicApi = segments[2] === 'testing' && segments.length < 4;
|
|
64
|
-
|
|
65
|
-
if(!checkingLayers[layer]){
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const isImportNotFromPublicApi = segments.length > 2;
|
|
69
|
-
|
|
70
|
-
if(isImportNotFromPublicApi && !isTestingPublicApi ) {
|
|
71
|
-
context.report({
|
|
72
|
-
node,
|
|
73
|
-
messageId:PUBLIC_ERROR,
|
|
74
|
-
fix:(fixer)=>{
|
|
75
|
-
return fixer.replaceText(node.source, `'${alias}/${layer}/${slice}'`)
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if(isTestingPublicApi){
|
|
82
|
-
const currentFilePath = context.getFilename();
|
|
83
|
-
const normalizedPath = currentFilePath.split(path.sep).join('/');
|
|
84
|
-
const isCurrentFileTesting = testFilesPatterns.some(pattern=>micromatch.isMatch(normalizedPath, pattern))
|
|
85
|
-
if(!isCurrentFileTesting){
|
|
86
|
-
context.report({
|
|
87
|
-
node,
|
|
88
|
-
messageId:TEST_PUBLIC_ERROR
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
},
|
|
95
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.5",
|
|
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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.6",
|
|
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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.9",
|
|
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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.1.10",
|
|
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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.2.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.2.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.2.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.2.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-big-react-app-plugin",
|
|
3
|
-
"version": "0.2.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
|
-
"micromatch": "^4.0.5",
|
|
18
|
-
"requireindex": "^1.2.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.0.1",
|
|
22
|
-
"eslint-plugin-eslint-plugin": "^4.0.1",
|
|
23
|
-
"eslint-plugin-node": "^11.1.0",
|
|
24
|
-
"mocha": "^9.1.3"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": "12.x || 14.x || >= 16"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"eslint": ">=6"
|
|
31
|
-
},
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,31 +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
|
-
|
|
19
|
-
const ruleTester = new RuleTester();
|
|
20
|
-
ruleTester.run("layer-imports", 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,77 +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
|
-
|
|
19
|
-
const ruleTester = new RuleTester();
|
|
20
|
-
ruleTester.run("layer-imports", rule, {
|
|
21
|
-
valid: [
|
|
22
|
-
{
|
|
23
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\features\\Article',
|
|
24
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from '@/shared/Button.tsx'",
|
|
25
|
-
errors: [],
|
|
26
|
-
options: aliasOptions,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\features\\Article',
|
|
30
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
|
|
31
|
-
errors: [],
|
|
32
|
-
options: aliasOptions,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\app\\providers',
|
|
36
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from '@/widgets/Articl'",
|
|
37
|
-
errors: [],
|
|
38
|
-
options: aliasOptions,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\widgets\\pages',
|
|
42
|
-
code: "import { useLocation } from 'react-router-dom'",
|
|
43
|
-
errors: [],
|
|
44
|
-
options: aliasOptions,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\app\\providers',
|
|
48
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from 'redux'",
|
|
49
|
-
errors: [],
|
|
50
|
-
options: aliasOptions,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\index.tsx',
|
|
54
|
-
code: "import { StoreProvider } from '@/app/providers/StoreProvider';",
|
|
55
|
-
errors: [],
|
|
56
|
-
options: aliasOptions,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\Article.tsx',
|
|
60
|
-
code: "import { StateSchema } from '@/app/providers/StoreProvider'",
|
|
61
|
-
errors: [],
|
|
62
|
-
options: [
|
|
63
|
-
{
|
|
64
|
-
alias: '@',
|
|
65
|
-
ignoreImportPatterns: ['**/StoreProvider']
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
|
|
71
|
-
invalid: [
|
|
72
|
-
{
|
|
73
|
-
code: "",
|
|
74
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
});
|
|
@@ -1,81 +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
|
-
ruleTester.run("layer-imports", rule, {
|
|
25
|
-
valid: [
|
|
26
|
-
{
|
|
27
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\features\\Article',
|
|
28
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from '@/shared/Button.tsx'",
|
|
29
|
-
errors: [],
|
|
30
|
-
options: aliasOptions,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\features\\Article',
|
|
34
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from '@/entities/Article'",
|
|
35
|
-
errors: [],
|
|
36
|
-
options: aliasOptions,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\app\\providers',
|
|
40
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from '@/widgets/Articl'",
|
|
41
|
-
errors: [],
|
|
42
|
-
options: aliasOptions,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\widgets\\pages',
|
|
46
|
-
code: "import { useLocation } from 'react-router-dom'",
|
|
47
|
-
errors: [],
|
|
48
|
-
options: aliasOptions,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\app\\providers',
|
|
52
|
-
code: "import { addCommentFormActions, addCommentFormReducer } from 'redux'",
|
|
53
|
-
errors: [],
|
|
54
|
-
options: aliasOptions,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\index.tsx',
|
|
58
|
-
code: "import { StoreProvider } from '@/app/providers/StoreProvider';",
|
|
59
|
-
errors: [],
|
|
60
|
-
options: aliasOptions,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
filename: 'C:\\Users\\tim\\Desktop\\javascript\\production_project\\src\\entities\\Article.tsx',
|
|
64
|
-
code: "import { StateSchema } from '@/app/providers/StoreProvider'",
|
|
65
|
-
errors: [],
|
|
66
|
-
options: [
|
|
67
|
-
{
|
|
68
|
-
alias: '@',
|
|
69
|
-
ignoreImportPatterns: ['**/StoreProvider']
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
|
|
75
|
-
invalid: [
|
|
76
|
-
{
|
|
77
|
-
code: "",
|
|
78
|
-
errors: [{ message: "Fill me in.", type: "Me too" }],
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
});
|