@storm-software/eslint 0.44.0 → 0.45.0

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/preset.mjs CHANGED
@@ -289510,18 +289510,18 @@ function getEOL(options) {
289510
289510
  }
289511
289511
  return require$$0$5.EOL;
289512
289512
  }
289513
- function hasBanner(src) {
289513
+ function hasBanner(commentType, src) {
289514
289514
  if (src.substr(0, 2) === "#!") {
289515
- let m = src.match(/(\r\n|\r|\n)/);
289516
- if (m) {
289515
+ const m = src.match(/(\r\n|\r|\n)/);
289516
+ if (m?.index) {
289517
289517
  src = src.slice(m.index + m[0].length);
289518
289518
  }
289519
289519
  }
289520
- return src.substr(0, 2) === "/*" || src.substr(0, 2) === "//";
289520
+ return commentType === "block" && src.substr(0, 2) === "/*" || commentType === "lint" && src.substr(0, 2) === "//" || commentType !== "block" && commentType !== "lint" && src.substr(0, commentType?.length) === commentType;
289521
289521
  }
289522
289522
  function matchesLineEndings(src, num) {
289523
289523
  for (let j = 0; j < num; ++j) {
289524
- let m = src.match(/^(\r\n|\r|\n)/);
289524
+ const m = src.match(/^(\r\n|\r|\n)/);
289525
289525
  if (m) {
289526
289526
  src = src.slice(m.index + m[0].length);
289527
289527
  } else {
@@ -289531,7 +289531,7 @@ function matchesLineEndings(src, num) {
289531
289531
  return true;
289532
289532
  }
289533
289533
  const bannerRule = dist$3.ESLintUtils.RuleCreator(
289534
- () => `https://docs.stormsoftware.com/eslint-rules/banner`
289534
+ () => `https://docs.stormsoftware.com/eslint/rules/banner`
289535
289535
  )({
289536
289536
  name: "banner",
289537
289537
  meta: {
@@ -289582,7 +289582,7 @@ const bannerRule = dist$3.ESLintUtils.RuleCreator(
289582
289582
  let fixLines = bannerLines;
289583
289583
  return {
289584
289584
  Program: function(node) {
289585
- if (!hasBanner(context.getSourceCode().getText())) {
289585
+ if (!hasBanner(commentType, context.sourceCode.getText())) {
289586
289586
  context.report({
289587
289587
  loc: node.loc,
289588
289588
  messageId: "missingBanner",
@@ -289881,8 +289881,8 @@ function getStormConfig(options = {
289881
289881
  parserOptions: {
289882
289882
  emitDecoratorMetadata: true,
289883
289883
  experimentalDecorators: true,
289884
- warnOnUnsupportedTypeScriptVersion: true,
289885
289884
  projectService: true,
289885
+ sourceType: "module",
289886
289886
  projectFolderIgnoreList: [
289887
289887
  "**/node_modules/**",
289888
289888
  "**/dist/**",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "repository": {
@@ -27,13 +27,14 @@
27
27
  ],
28
28
  "license": "Apache-2.0",
29
29
  "private": false,
30
+ "module": "dist/preset.mjs",
30
31
  "exports": {
31
32
  ".": {
32
- "types": "./declarations.d.ts",
33
+ "types": "./dist/preset.d.ts",
33
34
  "import": "./dist/preset.mjs"
34
35
  },
35
36
  "./preset": {
36
- "types": "./declarations.d.ts",
37
+ "types": "./dist/preset.d.ts",
37
38
  "import": "./dist/preset.mjs"
38
39
  }
39
40
  },