@cratis/eslint-plugin-arc 22.49.1 → 22.50.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.
@@ -1,7 +1,7 @@
1
1
  // An ESLint flat-config processor that skips Cratis-generated proxy files wholesale.
2
2
  //
3
- // Arc's ProxyGenerator emits a `// @generated by Cratis …` line as line 1 (see
4
- // GeneratedFileMetadata.cs) followed by a `**DO NOT EDIT** - This file is an
3
+ // Arc's ProxyGenerator emits a `// @generated by Cratis …` line either first (legacy)
4
+ // or after the license on line 4, followed by a `**DO NOT EDIT** - This file is an
5
5
  // automatically generated file.` banner (the Handlebars templates). These files cannot
6
6
  // be edited — they are regenerated by `dotnet build -c Release` — so every lint finding
7
7
  // on them is un-actionable, and an autofix would rewrite a file the next build reverts.
@@ -19,6 +19,10 @@ const DO_NOT_EDIT_BANNER = '**DO NOT EDIT** - This file is an automatically gene
19
19
  export const isGeneratedProxy = text => {
20
20
  if (typeof text !== 'string') return false;
21
21
  if (text.startsWith(GENERATED_HEADER)) return true;
22
+ const lines = text.split(/\r?\n/, 4);
23
+ if (lines[0] === '// Copyright (c) Cratis. All rights reserved.' &&
24
+ lines[1] === '// Licensed under the MIT license. See LICENSE file in the project root for full license information.' &&
25
+ lines[2]?.trim() === '' && lines[3]?.startsWith(GENERATED_HEADER)) return true;
22
26
  // Fallback for any generator variant that omits the @generated line: the DO NOT EDIT
23
27
  // banner the templates emit within the first handful of lines.
24
28
  return text.split('\n', 4).join('\n').includes(DO_NOT_EDIT_BANNER);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/eslint-plugin-arc",
3
- "version": "22.49.1",
3
+ "version": "22.50.1",
4
4
  "description": "Cratis Arc ESLint rules: skip generated proxies and keep MVVM view models React-free. Compose on top of @cratis/eslint-config.",
5
5
  "author": "Cratis",
6
6
  "license": "MIT",