@shell-shock/eslint-plugin 0.0.72 → 0.0.75

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.
@@ -1 +1 @@
1
- {"version":3,"file":"create-rule.mjs","names":[],"sources":["../../src/helpers/create-rule.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n RuleListener,\n RuleWithMeta,\n RuleWithMetaAndName\n} from \"@typescript-eslint/utils/eslint-utils\";\nimport type { RuleContext } from \"@typescript-eslint/utils/ts-eslint\";\nimport defu from \"defu\";\nimport type { Rule } from \"eslint\";\n\nexport type RuleModule<T extends readonly unknown[]> = Rule.RuleModule & {\n defaultOptions: T;\n};\n\n/**\n * Creates reusable function to create rules with default options and docs URLs.\n *\n * @param urlCreator - Creates a documentation URL for a given rule name.\n * @returns Function to create a rule with the docs URL format.\n */\nfunction RuleCreator(urlCreator: (name: string) => string) {\n // This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349\n // TODO - when the above PR lands; add type checking for the context.report `data` property\n return function createNamedRule<\n TOptions extends readonly any[],\n TMessageIds extends string\n >({\n name,\n meta,\n ...rule\n }: Readonly<\n RuleWithMetaAndName<TOptions, TMessageIds>\n >): RuleModule<TOptions> {\n return createRuleInfo<TOptions, TMessageIds>({\n meta: {\n ...meta,\n docs: {\n ...meta.docs,\n url: urlCreator(name)\n }\n },\n ...rule\n });\n };\n}\n\n/**\n * Creates a well-typed TSESLint custom ESLint rule without a docs URL.\n *\n * @returns Well-typed TSESLint custom ESLint rule.\n * @remarks It is generally better to provide a docs URL function to RuleCreator.\n */\nfunction createRuleInfo<\n TOptions extends readonly any[],\n TMessageIds extends string\n>({\n create,\n defaultOptions,\n meta\n}: Readonly<RuleWithMeta<TOptions, TMessageIds>>): RuleModule<TOptions> {\n return {\n create: ((\n context: Readonly<RuleContext<TMessageIds, TOptions>>\n ): RuleListener => {\n const optionsWithDefault = context.options.map((options, index) => {\n return defu(defaultOptions?.[index] ?? {}, options);\n }) as unknown as TOptions;\n\n return create(context, optionsWithDefault);\n }) as any,\n defaultOptions: (defaultOptions ?? {}) as TOptions,\n meta: meta as any\n };\n}\n\nexport const createRule = RuleCreator(\n ruleName =>\n `https://docs.stormsoftware.com/projects/shell-shock/eslint/rules/${ruleName}.md`\n) as any as <TOptions extends readonly unknown[], TMessageIds extends string>({\n name,\n meta,\n ...rule\n}: Readonly<\n RuleWithMetaAndName<TOptions, TMessageIds>\n>) => RuleModule<TOptions>;\n\nconst warned = new Set<string>();\n\nexport function warnOnce(message: string): void {\n if (warned.has(message)) return;\n warned.add(message);\n // eslint-disable-next-line no-console\n console.warn(message);\n}\n"],"mappings":"oBAqCA,SAAS,EAAY,EAAsC,CAGzD,OAAO,SAGL,CACA,OACA,OACA,GAAG,GAGoB,CACvB,OAAO,EAAsC,CAC3C,KAAM,CACJ,GAAG,EACH,KAAM,CACJ,GAAG,EAAK,KACR,IAAK,EAAW,EAAK,CACtB,CACF,CACD,GAAG,EACJ,CAAC,EAUN,SAAS,EAGP,CACA,SACA,iBACA,QACsE,CACtE,MAAO,CACL,QACE,GAMO,EAAO,EAJa,EAAQ,QAAQ,KAAK,EAAS,IAChD,EAAK,IAAiB,IAAU,EAAE,CAAE,EAAQ,CACnD,CAEwC,EAE5C,eAAiB,GAAkB,EAAE,CAC/B,OACP,CAGH,MAAa,EAAa,EACxB,GACE,oEAAoE,EAAS,KAChF"}
1
+ {"version":3,"file":"create-rule.mjs","names":[],"sources":["../../src/helpers/create-rule.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n RuleListener,\n RuleWithMeta,\n RuleWithMetaAndName\n} from \"@typescript-eslint/utils/eslint-utils\";\nimport type { RuleContext } from \"@typescript-eslint/utils/ts-eslint\";\nimport defu from \"defu\";\nimport type { Rule } from \"eslint\";\n\nexport type RuleModule<T extends readonly unknown[]> = Rule.RuleModule & {\n defaultOptions: T;\n};\n\n/**\n * Creates reusable function to create rules with default options and docs URLs.\n *\n * @param urlCreator - Creates a documentation URL for a given rule name.\n * @returns Function to create a rule with the docs URL format.\n */\nfunction RuleCreator(urlCreator: (name: string) => string) {\n // This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349\n // TODO - when the above PR lands; add type checking for the context.report `data` property\n return function createNamedRule<\n TOptions extends readonly any[],\n TMessageIds extends string\n >({\n name,\n meta,\n ...rule\n }: Readonly<\n RuleWithMetaAndName<TOptions, TMessageIds>\n >): RuleModule<TOptions> {\n return createRuleInfo<TOptions, TMessageIds>({\n meta: {\n ...meta,\n docs: {\n ...meta.docs,\n url: urlCreator(name)\n }\n },\n ...rule\n });\n };\n}\n\n/**\n * Creates a well-typed TSESLint custom ESLint rule without a docs URL.\n *\n * @returns Well-typed TSESLint custom ESLint rule.\n * @remarks It is generally better to provide a docs URL function to RuleCreator.\n */\nfunction createRuleInfo<\n TOptions extends readonly any[],\n TMessageIds extends string\n>({\n create,\n defaultOptions,\n meta\n}: Readonly<RuleWithMeta<TOptions, TMessageIds>>): RuleModule<TOptions> {\n return {\n create: ((\n context: Readonly<RuleContext<TMessageIds, TOptions>>\n ): RuleListener => {\n const optionsWithDefault = context.options.map((options, index) => {\n return defu(defaultOptions?.[index] ?? {}, options);\n }) as unknown as TOptions;\n\n return create(context, optionsWithDefault);\n }) as any,\n defaultOptions: (defaultOptions ?? {}) as TOptions,\n meta: meta as any\n };\n}\n\nexport const createRule = RuleCreator(\n ruleName =>\n `https://docs.stormsoftware.com/projects/shell-shock/eslint/rules/${ruleName}.md`\n) as any as <TOptions extends readonly unknown[], TMessageIds extends string>({\n name,\n meta,\n ...rule\n}: Readonly<\n RuleWithMetaAndName<TOptions, TMessageIds>\n>) => RuleModule<TOptions>;\n\nconst warned = new Set<string>();\n\nexport function warnOnce(message: string): void {\n if (warned.has(message)) return;\n warned.add(message);\n // eslint-disable-next-line no-console\n console.warn(message);\n}\n"],"mappings":"oBAqCA,SAAS,EAAY,EAAsC,CAGzD,OAAO,SAGL,CACA,OACA,OACA,GAAG,GAGoB,CACvB,OAAO,EAAsC,CAC3C,KAAM,CACJ,GAAG,EACH,KAAM,CACJ,GAAG,EAAK,KACR,IAAK,EAAW,EAAK,CACtB,CACF,CACD,GAAG,EACJ,CAAC,EAUN,SAAS,EAGP,CACA,SACA,iBACA,QACsE,CACtE,MAAO,CACL,QACE,GAMO,EAAO,EAJa,EAAQ,QAAQ,KAAK,EAAS,IAChD,EAAK,IAAiB,IAAU,EAAE,CAAE,EAAQ,CAGZ,CAAC,EAE5C,eAAiB,GAAkB,EAAE,CAC/B,OACP,CAGH,MAAa,EAAa,EACxB,GACE,oEAAoE,EAAS,KAChF"}
package/dist/package.cjs CHANGED
@@ -1 +1 @@
1
- var e=`0.0.72`;Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return e}});
1
+ var e=`0.0.75`;Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return e}});
package/dist/package.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var e=`0.0.72`;export{e as version};
1
+ var e=`0.0.75`;export{e as version};
2
2
  //# sourceMappingURL=package.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/eslint-plugin",
3
- "version": "0.0.72",
3
+ "version": "0.0.75",
4
4
  "private": false,
5
5
  "description": "An ESLint Plugin with linting rules that ensure a Shell Shock project is following the best practices.",
6
6
  "keywords": ["eslint", "eslint-plugin", "shell-shock", "storm-software"],
@@ -160,29 +160,29 @@
160
160
  "typings": "dist/index.d.mts",
161
161
  "files": ["dist/**/*"],
162
162
  "dependencies": {
163
- "@stryke/fs": "^0.33.66",
164
- "@stryke/path": "^0.27.4",
165
- "@typescript-eslint/utils": "^8.58.2",
163
+ "@stryke/fs": "^0.33.70",
164
+ "@stryke/path": "^0.28.2",
165
+ "@typescript-eslint/utils": "^8.59.2",
166
166
  "defu": "^6.1.7",
167
- "@storm-software/testing-tools": "^1.119.152",
168
- "powerlines": "^0.42.40"
167
+ "@storm-software/testing-tools": "^1.119.155",
168
+ "powerlines": "^0.47.4"
169
169
  },
170
170
  "devDependencies": {
171
171
  "@eslint/compat": "^2.0.5",
172
172
  "@eslint/config-inspector": "^1.5.0",
173
- "@powerlines/plugin-tsdown": "^0.1.340",
174
- "@storm-software/testing-tools": "^1.119.152",
173
+ "@powerlines/plugin-tsdown": "^0.1.406",
174
+ "@storm-software/testing-tools": "^1.119.155",
175
175
  "@types/eslint": "^9.6.1",
176
176
  "@types/eslint__js": "^9.14.0",
177
177
  "@types/node": "^25.6.0",
178
178
  "eslint": "^9.39.4",
179
179
  "eslint-doc-generator": "^3.3.2",
180
180
  "eslint-flat-config-utils": "^2.1.4",
181
- "eslint-plugin-eslint-plugin": "^7.3.2",
181
+ "eslint-plugin-eslint-plugin": "^7.3.3",
182
182
  "eslint-plugin-i18n-text": "^1.0.1",
183
183
  "eslint-rule-documentation": "^1.0.23",
184
184
  "eslint-typegen": "^2.3.1",
185
- "powerlines": "^0.42.40"
185
+ "powerlines": "^0.47.4"
186
186
  },
187
187
  "peerDependencies": { "eslint": ">=9.39.3" },
188
188
  "peerDependenciesMeta": { "eslint": { "optional": false } },
@@ -217,5 +217,5 @@
217
217
  "./package.json": "./package.json"
218
218
  }
219
219
  },
220
- "gitHead": "dcc6ef2c66de17416af3242b25b977c49974b4a1"
220
+ "gitHead": "7b4030fd6be000c960e8cc4c4f7b4db205054e69"
221
221
  }