From 754243e63abeaca75768aa5e1552101e4dfdf5c0 Mon Sep 17 00:00:00 2001 From: "sasjs-dev[bot]" Date: Thu, 1 Oct 2026 21:43:36 +0000 Subject: [PATCH] feat: adopt @sasjs/lint 4.1.0 Bumps @sasjs/lint 2.7.0 -> 4.1.0 in api/. 3.0.0 turns on noUndeclaredMacros and noUnusedMacros. The api's own default configuration (api/src/utils/lintConfig.ts - seeded to the drive root and used as the fallback) does not name either rule, so the Studio gains both: a buffer that invokes a macro without declaring it in the header is flagged, and a header entry the file never uses is flagged too. The macros that ship with SAS are always considered declared, so only project macros are reported. The rules apply to everyone rather than being pinned off. 4.0.0 makes an absent setting fall back to its documented default. The api is unaffected: its default configuration names maxLineLength and hasMacroNameInMend explicitly, and both were already on. 4.1.0 adds the noUnusedLibnames rule, off by default, with ignoredLibnames and the per-file @sasjslint block in the header. Verified: npm ci, tsc --noEmit (clean against 4.1.0, so the LintConfig, lintText and formatText usage is unchanged), and the api suite run on both sides and compared. 4.1.0 and 2.7.0 give identical results - 18 failed / 19 passed suites, 306 failed / 181 passed tests of 487 - with an identical failing-suite list, so the bump changes no suite's outcome. The 18 are the specs that need a live server and MongoDB. The code controller spec, which covers /code/lint and /code/format, is not among them and passes on both. --- api/package-lock.json | 8 ++++---- api/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/package-lock.json b/api/package-lock.json index 47c6f981..d3fad0d8 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.2", "dependencies": { "@sasjs/core": "^5.2.10", - "@sasjs/lint": "2.7.0", + "@sasjs/lint": "4.1.0", "@sasjs/utils": "^3.6.2", "bcryptjs": "^3.0.3", "connect-mongo": "^6.0.0", @@ -2208,9 +2208,9 @@ "license": "MIT" }, "node_modules/@sasjs/lint": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-2.7.0.tgz", - "integrity": "sha512-L23E8YQBpebpKDV4k1GEMjBTMlsk1qOl3zrbmMWK5w/VmuB5Ktk5GnC1ZIlXnwlk2bv6ru66XMUSfliUbGpeJg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-4.1.0.tgz", + "integrity": "sha512-Vpg1s0/zdPMFJ0hRXNXk53HhE3kfRr5gFRS0kvrse+bxgcbqih1qqVW7yZ2krhSCYylp9z13eBXLhXbRrj70VQ==", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/api/package.json b/api/package.json index 673eae23..3c0bb9a9 100644 --- a/api/package.json +++ b/api/package.json @@ -48,7 +48,7 @@ "author": "4GL Ltd", "dependencies": { "@sasjs/core": "^5.2.10", - "@sasjs/lint": "2.7.0", + "@sasjs/lint": "4.1.0", "@sasjs/utils": "^3.6.2", "bcryptjs": "^3.0.3", "connect-mongo": "^6.0.0",