@peerigon/configs 15.2.0 → 15.3.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.
@@ -145,20 +145,18 @@ export const javascript = [
145
145
  "no-only-tests": noOnlyTests,
146
146
  },
147
147
  rules: {
148
- // Top-level await might slow down the test suite start up
149
- "unicorn/prefer-top-level-await": "off",
150
- // Nesting is pretty common in tests when you group tests
151
- "max-nested-callbacks": "off",
152
- // await in loops is pretty common in Playwright tests
153
- "no-await-in-loop": "off",
154
- // Unreachable loops are sometimes used in tests to assert loop body runs at most once
155
- "no-unreachable-loop": "off",
156
- // In case you want to test errors thrown by a constructor
157
- "no-new": "off",
158
- // Generators without yield are common in test helpers/setup
159
- "require-yield": "off",
160
- // should show a warning when a test is focussed (overridden to off when using vitest config)
161
- "no-only-tests/no-only-tests": "error",
148
+ camelcase: "off", // Mock payloads often mirror external casing conventions.
149
+ "max-depth": "off", // Nested describe blocks are often the clearest structure.
150
+ "max-nested-callbacks": "off", // Nested test callbacks are idiomatic in test frameworks.
151
+ "no-await-in-loop": "off", // Await in loops is pretty common in Playwright tests.
152
+ "no-new": "off", // Constructor side effects are often asserted directly in tests.
153
+ "no-only-tests/no-only-tests": "error", // Should show a warning when a test is focussed (overridden to off when using vitest config).
154
+ "no-constant-condition": "off", // Constants are often used in tests to assert loop body runs at most once.
155
+ "no-unreachable-loop": "off", // Unreachable loops are sometimes used in tests to assert loop body runs at most once.
156
+ "no-unused-expressions": "off", // Assertion styles (e.g. chai) use expression statements.
157
+ "prefer-arrow-callback": "off", // Function callbacks are needed for this-binding tests.
158
+ "require-yield": "off", // Generators without yield are common in test helpers/setup.
159
+ "unicorn/prefer-top-level-await": "off", // Top-level await might slow down the test suite start up.
162
160
  },
163
161
  },
164
162
  ];
@@ -146,5 +146,13 @@ export const react = [
146
146
  "@eslint-react/no-leaked-conditional-rendering": "warn", // https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
147
147
  },
148
148
  },
149
+ {
150
+ files: globPatterns.tests,
151
+ rules: {
152
+ "react-hooks/exhaustive-deps": "off", // Effect dependency permutations are often intentionally incomplete in tests.
153
+ "react-refresh/only-export-components": "off", // Test files export helpers/constants alongside components.
154
+ "react/display-name": "off", // Anonymous inline components are common in tests.
155
+ },
156
+ },
149
157
  ];
150
158
  export default react;
@@ -185,6 +185,7 @@ export const typescript =
185
185
  // We allow any to be used in tests, so returning it is ok
186
186
  "@typescript-eslint/no-unsafe-return": "off", // https://typescript-eslint.io/rules/no-unsafe-return
187
187
  // chai uses these as assertions
188
+ "@typescript-eslint/no-unnecessary-condition": "off", // https://typescript-eslint.io/rules/no-unnecessary-condition
188
189
  "@typescript-eslint/no-unused-expressions": "off", // https://typescript-eslint.io/rules/no-unused-expressions
189
190
  // It's uncommon to use async/await in Cypress tests
190
191
  // https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Commands-Are-Asynchronous
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerigon/configs",
3
- "version": "15.2.0",
3
+ "version": "15.3.0",
4
4
  "description": "Configs for ESLint, Prettier, TypeScript & friends",
5
5
  "keywords": [
6
6
  "eslint",
@@ -84,26 +84,26 @@
84
84
  "@prettier/plugin-oxc": "^0.1.3",
85
85
  "@sebbo2002/semantic-release-jsr": "^3.2.1",
86
86
  "@semantic-release/exec": "^7.1.0",
87
- "@tanstack/eslint-plugin-query": "^5.91.4",
87
+ "@tanstack/eslint-plugin-query": "^5.95.2",
88
88
  "@types/eslint-config-prettier": "^6.11.3",
89
89
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
90
- "@vitest/eslint-plugin": "^1.6.12",
90
+ "@vitest/eslint-plugin": "^1.6.13",
91
91
  "eslint-config-prettier": "^10.1.8",
92
92
  "eslint-plugin-jsx-a11y": "^6.10.2",
93
93
  "eslint-plugin-no-only-tests": "^3.3.0",
94
- "eslint-plugin-playwright": "^2.10.0",
94
+ "eslint-plugin-playwright": "^2.10.1",
95
95
  "eslint-plugin-prefer-arrow": "^1.2.3",
96
96
  "eslint-plugin-react": "^7.37.5",
97
97
  "eslint-plugin-react-hooks": "^7.0.1",
98
98
  "eslint-plugin-react-refresh": "^0.5.2",
99
- "eslint-plugin-react-you-might-not-need-an-effect": "^0.9.1",
99
+ "eslint-plugin-react-you-might-not-need-an-effect": "^0.9.2",
100
100
  "eslint-plugin-unicorn": "^63.0.0",
101
101
  "globals": "^17.4.0",
102
102
  "prettier-plugin-css-order": "^2.2.0",
103
103
  "prettier-plugin-jsdoc": "^1.8.0",
104
104
  "prettier-plugin-packagejson": "^3.0.2",
105
105
  "prettier-plugin-tailwindcss": "^0.7.2",
106
- "typescript-eslint": "^8.57.0"
106
+ "typescript-eslint": "^8.57.2"
107
107
  },
108
108
  "devDependencies": {
109
109
  "@types/jest": "^30.0.0",