@storm-software/eslint 0.73.0 → 0.75.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/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.72.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.74.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/dist/preset.d.mts CHANGED
@@ -4837,6 +4837,7 @@ interface PresetOptions {
4837
4837
  markdown?: false | Linter.RulesRecord;
4838
4838
  react?: false | Linter.RulesRecord;
4839
4839
  useReactCompiler?: boolean;
4840
+ nextFiles?: string[];
4840
4841
  }
4841
4842
  /**
4842
4843
  * Get the ESLint configuration for a Storm workspace.
package/dist/preset.d.ts CHANGED
@@ -4837,6 +4837,7 @@ interface PresetOptions {
4837
4837
  markdown?: false | Linter.RulesRecord;
4838
4838
  react?: false | Linter.RulesRecord;
4839
4839
  useReactCompiler?: boolean;
4840
+ nextFiles?: string[];
4840
4841
  }
4841
4842
  /**
4842
4843
  * Get the ESLint configuration for a Storm workspace.
package/dist/preset.mjs CHANGED
@@ -5,6 +5,7 @@ const __filename = banner_fileURLToPath(import.meta.url);
5
5
  const __dirname = banner_dirname(__filename);
6
6
 
7
7
  import { plugins, rules } from '@cspell/eslint-plugin/recommended';
8
+ import next from '@next/eslint-plugin-next';
8
9
  import nxPlugin from '@nx/eslint-plugin';
9
10
  import jsxA11y from 'eslint-plugin-jsx-a11y';
10
11
  import markdown from 'eslint-plugin-markdown';
@@ -13445,13 +13446,21 @@ function getEOL(options) {
13445
13446
  return os.EOL;
13446
13447
  }
13447
13448
  function hasBanner(commentType, src) {
13448
- if (src.substr(0, 2) === "#!") {
13449
- const m = src.match(/(\r\n|\r|\n)/);
13450
- if (m?.index) {
13451
- src = src.slice(m.index + m[0].length);
13449
+ if (src.startsWith("#!")) {
13450
+ const bannerLines = src.split(/\r?\n/);
13451
+ if (bannerLines && bannerLines.length > 1) {
13452
+ bannerLines.shift();
13453
+ while (bannerLines.length && bannerLines[0] && !bannerLines[0].replace(/\s+/, "")) {
13454
+ bannerLines.shift();
13455
+ }
13456
+ if (bannerLines.length) {
13457
+ src = bannerLines.join("\n");
13458
+ } else {
13459
+ return false;
13460
+ }
13452
13461
  }
13453
13462
  }
13454
- return commentType === "block" && src.substr(0, 2) === "/*" || commentType === "lint" && src.substr(0, 2) === "//" || commentType !== "block" && commentType !== "lint" && src.substr(0, commentType?.length) === commentType;
13463
+ return commentType === "block" && src.startsWith("/*") || commentType === "lint" && src.startsWith("//") || commentType !== "block" && commentType !== "lint" && commentType && src.startsWith(commentType);
13455
13464
  }
13456
13465
  function matchesLineEndings(src, num) {
13457
13466
  for (let j = 0; j < num; ++j) {
@@ -13957,6 +13966,12 @@ function getStormConfig(options = {
13957
13966
  }
13958
13967
  configs.push(reactConfig);
13959
13968
  }
13969
+ if (options.nextFiles && options.nextFiles.length > 0) {
13970
+ configs.push({
13971
+ ...next.configs["core-web-vitals"],
13972
+ files: options.nextFiles
13973
+ });
13974
+ }
13960
13975
  if (options.markdown) {
13961
13976
  configs.push(...markdown.configs.recommended);
13962
13977
  configs.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.73.0",
3
+ "version": "0.75.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,7 +27,7 @@
27
27
  {
28
28
  "name": "Pat Sullivan",
29
29
  "email": "admin@stormsoftware.com",
30
- "url": "https://stormsoftware.com"
30
+ "url": "https://patsullivan.org"
31
31
  }
32
32
  ],
33
33
  "license": "Apache-2.0",