@progressive-victory/eslint-plugin-index-file 0.0.3 → 0.0.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/dist/index.js ADDED
@@ -0,0 +1,170 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
6
+ // package.json
7
+ var require_package = __commonJS({
8
+ "package.json"(exports, module) {
9
+ module.exports = {
10
+ name: "@progressive-victory/eslint-plugin-index-file",
11
+ version: "0.0.4",
12
+ description: "Plugin that enforces the use of index files with eslint.",
13
+ homepage: "https://github.com/Progressive-Victory/eslint-index-file-plugin#readme",
14
+ private: false,
15
+ bugs: {
16
+ url: "https://github.com/Progressive-Victory/eslint-index-file-plugin/issues"
17
+ },
18
+ repository: {
19
+ type: "git",
20
+ url: "git+https://github.com/Progressive-Victory/eslint-index-file-plugin.git"
21
+ },
22
+ license: "ISC",
23
+ author: "sH3llH0und",
24
+ type: "module",
25
+ packageManager: "pnpm@10.30.2",
26
+ main: "dist/index.js",
27
+ exports: {
28
+ "./*.js": {
29
+ types: "./*.d.ts",
30
+ require: "./*.js",
31
+ import: "./*.js"
32
+ }
33
+ },
34
+ scripts: {
35
+ build: "node esbuild.config.js",
36
+ test: "pnpm build && pnpm vitest --silent=false"
37
+ },
38
+ devDependencies: {
39
+ "@types/node": "^25.9.1",
40
+ "@typescript-eslint/rule-tester": "^8.60.1",
41
+ esbuild: "^0.28.0",
42
+ globals: "^17.6.0",
43
+ prettier: "^3.8.3",
44
+ typescript: "^6.0.3",
45
+ "typescript-eslint": "^8.60.1",
46
+ vitest: "^4.1.8"
47
+ },
48
+ dependencies: {
49
+ "@typescript-eslint/eslint-plugin": "^8.60.1",
50
+ "@typescript-eslint/parser": "^8.60.1",
51
+ "@typescript-eslint/utils": "^8.60.1",
52
+ eslint: "^10.4.1"
53
+ }
54
+ };
55
+ }
56
+ });
57
+
58
+ // src/utils.ts
59
+ import { ESLintUtils } from "@typescript-eslint/utils";
60
+ var createRule = ESLintUtils.RuleCreator(
61
+ (name2) => `https://github.com/import-js/eslint-plugin-import/wiki/${name2}`
62
+ );
63
+
64
+ // src/rules/enforce-index-usage.ts
65
+ import path from "node:path";
66
+ import fs from "fs";
67
+ var enforceIndexUsageRule = createRule({
68
+ create(context) {
69
+ return {
70
+ ExportNamedDeclaration(node) {
71
+ console.log("doing shit");
72
+ const cwd = context.cwd;
73
+ const cwdFiles = fs.readdirSync(cwd);
74
+ const index = cwdFiles.find((x) => x === "index.ts");
75
+ if (!index) context.report({
76
+ messageId: "noIndexPresent",
77
+ node
78
+ });
79
+ const fileNameArr = context.filename.split(".");
80
+ const fileName = fileNameArr[fileNameArr.length - 1];
81
+ const indexContent = fs.readFileSync(path.join(cwd, "index.ts")).toString();
82
+ if (!indexContent.includes(`export * from './${fileName}.js`)) context.report({
83
+ messageId: "notExportedInIndex",
84
+ node
85
+ });
86
+ }
87
+ };
88
+ },
89
+ meta: {
90
+ docs: {
91
+ description: "Enforces the usage of index files within code.",
92
+ recommended: true,
93
+ requiresTypeChecking: false
94
+ },
95
+ messages: {
96
+ notExportedInIndex: "Export statement not accompanied by index file entry.",
97
+ noIndexPresent: "Could not find index file in working directory."
98
+ },
99
+ type: "problem",
100
+ schema: []
101
+ },
102
+ name: "enforce-index-usage",
103
+ defaultOptions: []
104
+ });
105
+
106
+ // src/rules/enforce-index-usage.test.ts
107
+ import path2 from "path";
108
+ import tseslint from "typescript-eslint";
109
+ import { RuleTester } from "@typescript-eslint/rule-tester";
110
+ import * as vitest from "vitest";
111
+ RuleTester.afterAll = vitest.afterAll;
112
+ RuleTester.it = vitest.it;
113
+ RuleTester.itOnly = vitest.it.only;
114
+ RuleTester.describe = vitest.describe;
115
+ var ruleTester = new RuleTester({
116
+ languageOptions: {
117
+ parser: tseslint.parser,
118
+ parserOptions: {
119
+ projectService: {
120
+ allowDefaultProject: ["*.js"],
121
+ defaultProject: "tsconfig.json"
122
+ },
123
+ tsconfigRootDir: path2.join(import.meta.dirname, "../..")
124
+ }
125
+ }
126
+ });
127
+ ruleTester.run("enforce-index-usage", enforceIndexUsageRule, {
128
+ valid: [
129
+ {
130
+ code: `export const foo = bar`
131
+ }
132
+ ],
133
+ invalid: [
134
+ {
135
+ code: `export const bar = foo`,
136
+ errors: [
137
+ {
138
+ messageId: "notExportedInIndex",
139
+ suggestions: []
140
+ }
141
+ ]
142
+ }
143
+ ]
144
+ });
145
+
146
+ // src/index.ts
147
+ var { name, version } = (
148
+ // eslint-diable-next-line @typescript-eslint/no-require-imports
149
+ require_package()
150
+ );
151
+ var plugin = {
152
+ configs: {
153
+ get recommended() {
154
+ return recommended;
155
+ }
156
+ },
157
+ meta: { name, version },
158
+ enforceIndexUsageRule
159
+ };
160
+ var recommended = {
161
+ plugins: {
162
+ "eslint-index-file-plugin": plugin
163
+ },
164
+ enforceIndexUsageRule
165
+ };
166
+ var index_default = plugin;
167
+ export {
168
+ index_default as default
169
+ };
170
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../package.json", "../src/utils.ts", "../src/rules/enforce-index-usage.ts", "../src/rules/enforce-index-usage.test.ts", "../src/index.ts"],
4
+ "sourcesContent": ["{\n \"name\": \"@progressive-victory/eslint-plugin-index-file\",\n \"version\": \"0.0.4\",\n \"description\": \"Plugin that enforces the use of index files with eslint.\",\n \"homepage\": \"https://github.com/Progressive-Victory/eslint-index-file-plugin#readme\",\n \"private\": false,\n \"bugs\": {\n \"url\": \"https://github.com/Progressive-Victory/eslint-index-file-plugin/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/Progressive-Victory/eslint-index-file-plugin.git\"\n },\n \"license\": \"ISC\",\n \"author\": \"sH3llH0und\",\n \"type\": \"module\",\n \"packageManager\": \"pnpm@10.30.2\",\n \"main\": \"dist/index.js\",\n \"exports\": {\n \"./*.js\": {\n \"types\": \"./*.d.ts\",\n \"require\": \"./*.js\",\n \"import\": \"./*.js\"\n }\n },\n \"scripts\": {\n \"build\": \"node esbuild.config.js\",\n \"test\": \"pnpm build && pnpm vitest --silent=false\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^25.9.1\",\n \"@typescript-eslint/rule-tester\": \"^8.60.1\",\n \"esbuild\": \"^0.28.0\",\n \"globals\": \"^17.6.0\",\n \"prettier\": \"^3.8.3\",\n \"typescript\": \"^6.0.3\",\n \"typescript-eslint\": \"^8.60.1\",\n \"vitest\": \"^4.1.8\"\n },\n \"dependencies\": {\n \"@typescript-eslint/eslint-plugin\": \"^8.60.1\",\n \"@typescript-eslint/parser\": \"^8.60.1\",\n \"@typescript-eslint/utils\": \"^8.60.1\",\n \"eslint\": \"^10.4.1\"\n }\n}\n", "import {ESLintUtils} from \"@typescript-eslint/utils\"\r\n\r\nexport interface IndexFileDocs {\r\n description: string;\r\n recommended?: boolean;\r\n requiresTypeChecking?: boolean;\r\n}\r\n\r\nexport const createRule = ESLintUtils.RuleCreator<IndexFileDocs>(\r\n (name) => `https://github.com/import-js/eslint-plugin-import/wiki/${name}`\r\n)", "//import {ESLintUtils} from \"@typescript-eslint/utils\"\r\n\r\nimport { createRule } from \"../utils.js\"\r\nimport path from \"node:path\"\r\nimport fs from \"fs\"\r\n\r\nexport const enforceIndexUsageRule = createRule({\r\n create(context) {\r\n //const services = ESLintUtils.getParserServices(context);\r\n\r\n return {\r\n ExportNamedDeclaration(node) {\r\n console.log(\"doing shit\")\r\n const cwd = context.cwd\r\n const cwdFiles = fs.readdirSync(cwd)\r\n const index = cwdFiles.find(x => x === \"index.ts\")\r\n if(!index) context.report({\r\n messageId: 'noIndexPresent',\r\n node\r\n })\r\n\r\n const fileNameArr = context.filename.split('.')\r\n const fileName = fileNameArr[fileNameArr.length - 1]\r\n const indexContent = fs.readFileSync(path.join(cwd, \"index.ts\")).toString()\r\n if(!indexContent.includes(`export * from './${fileName}.js`)) context.report({\r\n messageId: \"notExportedInIndex\",\r\n node\r\n })\r\n }\r\n }\r\n },\r\n meta: {\r\n docs: {\r\n description: \"Enforces the usage of index files within code.\",\r\n recommended: true,\r\n requiresTypeChecking: false\r\n },\r\n messages: {\r\n notExportedInIndex: \"Export statement not accompanied by index file entry.\",\r\n noIndexPresent: \"Could not find index file in working directory.\"\r\n },\r\n type: \"problem\",\r\n schema: []\r\n },\r\n name: \"enforce-index-usage\",\r\n defaultOptions: []\r\n})", "import path from \"path\"\r\nimport tseslint from \"typescript-eslint\";\r\nimport { RuleTester } from \"@typescript-eslint/rule-tester\"\r\nimport * as vitest from \"vitest\"\r\n\r\nimport { enforceIndexUsageRule } from \"./enforce-index-usage\"\r\n\r\nRuleTester.afterAll = vitest.afterAll\r\nRuleTester.it = vitest.it\r\nRuleTester.itOnly = vitest.it.only\r\nRuleTester.describe = vitest.describe\r\n\r\nconst ruleTester = new RuleTester({\r\n languageOptions: {\r\n parser: tseslint.parser,\r\n parserOptions: {\r\n projectService: {\r\n allowDefaultProject: [\"*.js\"],\r\n defaultProject: \"tsconfig.json\"\r\n },\r\n tsconfigRootDir: path.join(import.meta.dirname, \"../..\")\r\n }\r\n }\r\n})\r\n\r\nruleTester.run(\"enforce-index-usage\", enforceIndexUsageRule, {\r\n valid: [\r\n {\r\n code: `export const foo = bar`\r\n }\r\n ],\r\n invalid: [\r\n {\r\n code: `export const bar = foo`,\r\n errors: [\r\n {\r\n messageId: \"notExportedInIndex\",\r\n suggestions: [\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n})", "import {enforceIndexUsageRule} from \"./rules\"\r\n\r\nconst {name, version} =\r\n // eslint-diable-next-line @typescript-eslint/no-require-imports\r\n require(\"../package.json\") as typeof import(\"../package.json\")\r\n\r\nconst plugin = {\r\n configs: {\r\n get recommended() {\r\n return recommended\r\n }\r\n },\r\n meta: { name, version },\r\n enforceIndexUsageRule\r\n}\r\n\r\nconst recommended = {\r\n plugins: {\r\n \"eslint-index-file-plugin\": plugin\r\n },\r\n enforceIndexUsageRule\r\n}\r\n\r\nexport default plugin;"],
5
+ "mappings": "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",
6
+ "names": ["name", "path", "path"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progressive-victory/eslint-plugin-index-file",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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
  "private": false,
@@ -1,18 +0,0 @@
1
- name: Build
2
- on: [push]
3
- jobs:
4
- build:
5
- runs-on: ubuntu-latest
6
- environment: Preview
7
- steps:
8
- - name: Checkout repository
9
- uses: actions/checkout@v4
10
-
11
- - name: Install pnpm
12
- uses: pnpm/action-setup@v3
13
-
14
- - name: Install dependencies
15
- run: pnpm install --frozen-lockfile
16
-
17
- - name: Build project
18
- run: pnpm build
package/esbuild.config.js DELETED
@@ -1,20 +0,0 @@
1
- import esbuild from 'esbuild';
2
- import path, { dirname } from 'path';
3
- import { fileURLToPath } from 'url';
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = dirname(__filename);
7
-
8
- await esbuild.build({
9
- platform: 'node',
10
- target: 'esnext',
11
- format: 'esm',
12
- entryPoints: ['./src/index.ts'],
13
- outfile: './dist/index.js',
14
- sourcemap: true,
15
- minify: false,
16
- bundle: true,
17
- legalComments: 'external',
18
- packages: 'external',
19
- alias: { '~': path.resolve(__dirname, 'src') },
20
- });
package/src/index.ts DELETED
@@ -1,24 +0,0 @@
1
- import {enforceIndexUsageRule} from "./rules"
2
-
3
- const {name, version} =
4
- // eslint-diable-next-line @typescript-eslint/no-require-imports
5
- require("../package.json") as typeof import("../package.json")
6
-
7
- const plugin = {
8
- configs: {
9
- get recommended() {
10
- return recommended
11
- }
12
- },
13
- meta: { name, version },
14
- enforceIndexUsageRule
15
- }
16
-
17
- const recommended = {
18
- plugins: {
19
- "eslint-index-file-plugin": plugin
20
- },
21
- enforceIndexUsageRule
22
- }
23
-
24
- export default plugin;
@@ -1,44 +0,0 @@
1
- import path from "path"
2
- import tseslint from "typescript-eslint";
3
- import { RuleTester } from "@typescript-eslint/rule-tester"
4
- import * as vitest from "vitest"
5
-
6
- import { enforceIndexUsageRule } from "./enforce-index-usage"
7
-
8
- RuleTester.afterAll = vitest.afterAll
9
- RuleTester.it = vitest.it
10
- RuleTester.itOnly = vitest.it.only
11
- RuleTester.describe = vitest.describe
12
-
13
- const ruleTester = new RuleTester({
14
- languageOptions: {
15
- parser: tseslint.parser,
16
- parserOptions: {
17
- projectService: {
18
- allowDefaultProject: ["*.js"],
19
- defaultProject: "tsconfig.json"
20
- },
21
- tsconfigRootDir: path.join(import.meta.dirname, "../..")
22
- }
23
- }
24
- })
25
-
26
- ruleTester.run("enforce-index-usage", enforceIndexUsageRule, {
27
- valid: [
28
- {
29
- code: `export const foo = bar`
30
- }
31
- ],
32
- invalid: [
33
- {
34
- code: `export const bar = foo`,
35
- errors: [
36
- {
37
- messageId: "notExportedInIndex",
38
- suggestions: [
39
- ]
40
- }
41
- ]
42
- }
43
- ]
44
- })
@@ -1,47 +0,0 @@
1
- //import {ESLintUtils} from "@typescript-eslint/utils"
2
-
3
- import { createRule } from "../utils.js"
4
- import path from "node:path"
5
- import fs from "fs"
6
-
7
- export const enforceIndexUsageRule = createRule({
8
- create(context) {
9
- //const services = ESLintUtils.getParserServices(context);
10
-
11
- return {
12
- ExportNamedDeclaration(node) {
13
- console.log("doing shit")
14
- const cwd = context.cwd
15
- const cwdFiles = fs.readdirSync(cwd)
16
- const index = cwdFiles.find(x => x === "index.ts")
17
- if(!index) context.report({
18
- messageId: 'noIndexPresent',
19
- node
20
- })
21
-
22
- const fileNameArr = context.filename.split('.')
23
- const fileName = fileNameArr[fileNameArr.length - 1]
24
- const indexContent = fs.readFileSync(path.join(cwd, "index.ts")).toString()
25
- if(!indexContent.includes(`export * from './${fileName}.js`)) context.report({
26
- messageId: "notExportedInIndex",
27
- node
28
- })
29
- }
30
- }
31
- },
32
- meta: {
33
- docs: {
34
- description: "Enforces the usage of index files within code.",
35
- recommended: true,
36
- requiresTypeChecking: false
37
- },
38
- messages: {
39
- notExportedInIndex: "Export statement not accompanied by index file entry.",
40
- noIndexPresent: "Could not find index file in working directory."
41
- },
42
- type: "problem",
43
- schema: []
44
- },
45
- name: "enforce-index-usage",
46
- defaultOptions: []
47
- })
@@ -1,2 +0,0 @@
1
- export * from './enforce-index-usage.js'
2
- export * from './enforce-index-usage.test.js'
package/src/utils.ts DELETED
@@ -1,11 +0,0 @@
1
- import {ESLintUtils} from "@typescript-eslint/utils"
2
-
3
- export interface IndexFileDocs {
4
- description: string;
5
- recommended?: boolean;
6
- requiresTypeChecking?: boolean;
7
- }
8
-
9
- export const createRule = ESLintUtils.RuleCreator<IndexFileDocs>(
10
- (name) => `https://github.com/import-js/eslint-plugin-import/wiki/${name}`
11
- )
package/tsconfig.json DELETED
@@ -1,47 +0,0 @@
1
- {
2
- // Visit https://aka.ms/tsconfig to read more about this file
3
- "compilerOptions": {
4
- // File Layout
5
- "rootDir": ".",
6
- "outDir": "./dist",
7
- "paths": {
8
- "~/*": ["./src/*"]
9
- },
10
-
11
- // Environment Settings
12
- // See also https://aka.ms/tsconfig/module
13
- "moduleResolution": "bundler",
14
- "module": "esnext",
15
- "target": "esnext",
16
- // For nodejs:
17
- "lib": ["esnext"],
18
- "types": ["node"],
19
- // and npm install -D @types/node
20
-
21
- // Other Outputs
22
- "sourceMap": true,
23
- "declaration": true,
24
- "declarationMap": true,
25
-
26
- // Stricter Typechecking Options
27
- "noUncheckedIndexedAccess": true,
28
- "exactOptionalPropertyTypes": true,
29
-
30
- // Style Options
31
- "noImplicitReturns": true,
32
- "noImplicitOverride": true,
33
- "noUnusedLocals": true,
34
- "noUnusedParameters": true,
35
- "noFallthroughCasesInSwitch": true,
36
- // "noPropertyAccessFromIndexSignature": true,
37
-
38
- // Recommended Options
39
- "strict": true,
40
- "verbatimModuleSyntax": false,
41
- "isolatedModules": true,
42
- "noUncheckedSideEffectImports": true,
43
- "moduleDetection": "force",
44
- "skipLibCheck": true,
45
- },
46
- "exclude": ["node_modules", "dist"]
47
- }