@simpleapps-com/augur-config 2.1.0 → 2.1.2

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.
@@ -273,6 +273,59 @@ if (eslintFile && fileContains(eslintFile, "augur-config/eslint")) {
273
273
  fail("eslint", "eslint.config.mjs exists", "No ESLint config found");
274
274
  }
275
275
 
276
+ // 7b. ESLint: no-deprecated rule
277
+ if (eslintFile) {
278
+ const eslintContent = readFile(eslintFile);
279
+ if (eslintContent && /no-deprecated["']?\s*:\s*["'](error|warn)["']/.test(eslintContent)) {
280
+ pass("eslint-deprecated", "ESLint: no-deprecated rule enabled", "");
281
+ } else if (eslintContent && eslintContent.includes("no-deprecated")) {
282
+ warn(
283
+ "eslint-deprecated",
284
+ "ESLint: no-deprecated found but may not be warn/error",
285
+ "Set @typescript-eslint/no-deprecated to warn or error"
286
+ );
287
+ } else {
288
+ fail(
289
+ "eslint-deprecated",
290
+ "ESLint: @typescript-eslint/no-deprecated rule",
291
+ 'Add "@typescript-eslint/no-deprecated": "warn" to eslint.config.mjs rules'
292
+ );
293
+ }
294
+ } else {
295
+ skip("eslint-deprecated", "ESLint: no-deprecated rule", "No ESLint config found");
296
+ }
297
+
298
+ // 7c. Prettier uses shared config
299
+ const prettierFile = findFile(
300
+ "prettier.config.mjs",
301
+ "prettier.config.js",
302
+ ".prettierrc.mjs",
303
+ ".prettierrc.js"
304
+ );
305
+ if (prettierFile && fileContains(prettierFile, "augur-config/prettier")) {
306
+ pass("prettier", "Prettier uses augur-config/prettier preset", prettierFile);
307
+ } else if (prettierFile) {
308
+ fail(
309
+ "prettier",
310
+ "Prettier uses augur-config/prettier preset",
311
+ "Config exists but does not import augur-config/prettier"
312
+ );
313
+ } else if (pkg?.prettier) {
314
+ fail(
315
+ "prettier",
316
+ "Prettier uses augur-config/prettier preset",
317
+ "Prettier config is inline in package.json -- move to prettier.config.mjs"
318
+ );
319
+ } else if (findFile(".prettierrc", ".prettierrc.json", ".prettierrc.yaml")) {
320
+ fail(
321
+ "prettier",
322
+ "Prettier uses augur-config/prettier preset",
323
+ "Site uses static prettier config -- migrate to prettier.config.mjs with augur-config/prettier"
324
+ );
325
+ } else {
326
+ fail("prettier", "Prettier config exists", "No Prettier config found");
327
+ }
328
+
276
329
  // 8-12. next.config checks
277
330
  const nextConfigFile = findFile(
278
331
  "next.config.ts",
@@ -616,7 +669,7 @@ const groups = {
616
669
  "site-hooks",
617
670
  "ssr-options",
618
671
  ],
619
- "Config Alignment": ["tsconfig", "eslint", "tailwind", "icons"],
672
+ "Config Alignment": ["tsconfig", "eslint", "eslint-deprecated", "prettier", "tailwind", "icons"],
620
673
  "Next.js Config": [
621
674
  "next-external",
622
675
  "next-ioredis",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleapps-com/augur-config",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Shared tooling configuration presets for Augur ecommerce sites",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,6 +28,7 @@ export default [
28
28
  { argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
29
29
  ],
30
30
  "@typescript-eslint/no-explicit-any": "warn",
31
+ "@typescript-eslint/no-deprecated": "warn",
31
32
  "complexity": ["warn", 15],
32
33
  "max-depth": ["warn", 4],
33
34
  "max-nested-callbacks": ["warn", 3],