@progressive-victory/eslint-plugin-index-file 1.2.0 → 1.2.1
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/dist/index.d.ts
CHANGED
|
@@ -28,13 +28,6 @@ declare const enforceIndexUsage: {
|
|
|
28
28
|
type: string;
|
|
29
29
|
packageManager: string;
|
|
30
30
|
main: string;
|
|
31
|
-
exports: {
|
|
32
|
-
".": {
|
|
33
|
-
types: string;
|
|
34
|
-
default: string;
|
|
35
|
-
};
|
|
36
|
-
"./package.json": string;
|
|
37
|
-
};
|
|
38
31
|
scripts: {
|
|
39
32
|
build: string;
|
|
40
33
|
pushlish: string;
|
|
@@ -78,13 +71,6 @@ declare const enforceIndexUsage: {
|
|
|
78
71
|
type: string;
|
|
79
72
|
packageManager: string;
|
|
80
73
|
main: string;
|
|
81
|
-
exports: {
|
|
82
|
-
".": {
|
|
83
|
-
types: string;
|
|
84
|
-
default: string;
|
|
85
|
-
};
|
|
86
|
-
"./package.json": string;
|
|
87
|
-
};
|
|
88
74
|
scripts: {
|
|
89
75
|
build: string;
|
|
90
76
|
pushlish: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWtB,CAAA;AAYD,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enforce-index-export.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-index-export.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enforce-index-export.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-index-export.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,sBAAsB;;CA0BjC,CAAA"}
|
|
@@ -6,9 +6,8 @@ function handleExport(context, node) {
|
|
|
6
6
|
const filePath = path.parse(filePathStr);
|
|
7
7
|
const cwd = filePath.dir;
|
|
8
8
|
const cwdFiles = fs.readdirSync(cwd);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
context.report({
|
|
9
|
+
if (!cwdFiles.includes("index.ts"))
|
|
10
|
+
return context.report({
|
|
12
11
|
messageId: 'noIndexPresent',
|
|
13
12
|
node
|
|
14
13
|
});
|
|
@@ -16,7 +15,7 @@ function handleExport(context, node) {
|
|
|
16
15
|
const regExStr = `export \\* from ['|"]\\.\\/${filePath.name}(\\.js|)['|"](;|)`;
|
|
17
16
|
const pattern = new RegExp(regExStr);
|
|
18
17
|
if (!pattern.test(indexContent))
|
|
19
|
-
context.report({
|
|
18
|
+
return context.report({
|
|
20
19
|
messageId: "notExportedInIndex",
|
|
21
20
|
node
|
|
22
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enforce-index-export.js","sourceRoot":"","sources":["../../src/rules/enforce-index-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;AAInB,SAAS,YAAY,CAAC,OAAiE,EAAE,IAAoC;IACzH,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;IACxC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAA;IACxB,MAAM,QAAQ,GAAG,EAAE,CAAC,WAAW,CAA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AAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YAC/B,CAAC;YACD,wBAAwB,CAAC,IAAI;gBACzB,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YAC/B,CAAC;SACJ,CAAA;IACL,CAAC;IACD,IAAI,EAAE;QACF,IAAI,EAAE;YACF,WAAW,EAAE,gDAAgD;YAC7D,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;SAC9B;QACD,QAAQ,EAAE;YACN,kBAAkB,EAAE,uDAAuD;YAC3E,cAAc,EAAE,iDAAiD;SACpE;QACD,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;KACb;IACD,IAAI,EAAE,qBAAqB;IAC3B,cAAc,EAAE,EAAE;CACrB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-victory/eslint-plugin-index-file",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Plugin that enforces the use of index files with eslint.",
|
|
5
5
|
"homepage": "https://github.com/Progressive-Victory/eslint-index-file-plugin#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -14,13 +14,6 @@
|
|
|
14
14
|
"author": "sH3llH0und",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"main": "dist/index.js",
|
|
17
|
-
"exports": {
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./dist/index.d.ts",
|
|
20
|
-
"default": "./dist/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./package.json": "./package.json"
|
|
23
|
-
},
|
|
24
17
|
"devDependencies": {
|
|
25
18
|
"@types/node": "^25.9.1",
|
|
26
19
|
"@typescript-eslint/eslint-plugin": "^8.60.1",
|