@bastidood/eslint-config 0.2.0 → 0.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.
@@ -279,16 +279,23 @@ const CORE = {
279
279
  "slopstopper/merge-exclusive-branches": "error",
280
280
  "slopstopper/needless-type-intersection": "error",
281
281
  "slopstopper/no-alias-object-type": "error",
282
+ "slopstopper/no-array-filter-map": "error",
283
+ "slopstopper/no-conditional-empty-object-spread": "error",
282
284
  "slopstopper/no-equality-chain": "error",
283
285
  "slopstopper/no-inferrable-return-type": "error",
286
+ "slopstopper/no-known-value-widening": "error",
284
287
  "slopstopper/no-multiple-optional-parameters": "error",
285
288
  "slopstopper/no-negated-group": "error",
286
289
  "slopstopper/no-negated-quantifier-callback": "error",
287
290
  "slopstopper/no-plain-template-literal": "error",
288
291
  "slopstopper/no-positional-scalars": "error",
289
292
  "slopstopper/no-private-modifier": "error",
293
+ "slopstopper/no-reduce-accumulator-copy": "error",
290
294
  "slopstopper/no-temporary-access": "error",
291
295
  "slopstopper/no-type-predicates": "error",
296
+ "slopstopper/no-unknown-returns": "error",
297
+ "slopstopper/no-unknown-type-aliases": "error",
298
+ "slopstopper/no-unsafe-dictionary-type": "error",
292
299
  "slopstopper/prefer-class-over-factory": "error",
293
300
  "slopstopper/prefer-de-morgan": "error",
294
301
  "slopstopper/prefer-prefix-increment": "error",
@@ -447,8 +454,11 @@ const CORE = {
447
454
  message: "Import through a path alias or package subpath import instead of a parent-relative path (`../`)."
448
455
  }],
449
456
  globals: [{
457
+ name: "Reflect",
458
+ message: "Call typed functions and read typed properties directly instead of through `Reflect`, and parse dynamic input into a domain type first. Suppress this diagnostic with a reason only where a typed access is impossible."
459
+ }, {
450
460
  name: "undefined",
451
- message: "Omit absent values instead of writing `undefined`: conditionally insert the property (as `exactOptionalPropertyTypes` requires) or leave out the argument, and use a `typeof` check to test for absence. Pass `void 0` only to a parameter that cannot be omitted and is explicitly typed to accept `undefined`."
461
+ message: "Omit absent values instead of writing `undefined`: add the property in an `if` after declaring the object (as `exactOptionalPropertyTypes` requires) or leave out the argument, and use a `typeof` check to test for absence. Pass `void 0` only to a parameter that cannot be omitted and is explicitly typed to accept `undefined`."
452
462
  }],
453
463
  properties: [{
454
464
  object: "process",
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as CORE$1, n as writeEslintRules, r as writeExtensionRules, t as writeCategoryRules } from "./convert-axs1VQcN.mjs";
1
+ import { i as CORE$1, n as writeEslintRules, r as writeExtensionRules, t as writeCategoryRules } from "./convert-Bc-edfKh.mjs";
2
2
  import SLOPSTOPPER from "@bastidood/eslint-plugin-slopstopper";
3
3
  import { importX } from "eslint-plugin-import-x";
4
4
  import tseslint from "typescript-eslint";
package/dist/jsdoc.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-axs1VQcN.mjs";
1
+ import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-Bc-edfKh.mjs";
2
2
  import jsdocPlugin from "eslint-plugin-jsdoc";
3
3
  // ../oxlint/src/jsdoc.ts
4
4
  const JSDOC$1 = { config: {
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-axs1VQcN.mjs";
1
+ import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-Bc-edfKh.mjs";
2
2
  import nodePlugin from "eslint-plugin-n";
3
3
  // ../oxlint/src/node.ts
4
4
  /** Node.js rules for code that runs on Node.js. */
package/dist/promise.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-axs1VQcN.mjs";
1
+ import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-Bc-edfKh.mjs";
2
2
  import promisePlugin from "eslint-plugin-promise";
3
3
  // ../oxlint/src/promise.ts
4
4
  const PROMISE$1 = { config: {
package/dist/unicorn.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-axs1VQcN.mjs";
1
+ import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-Bc-edfKh.mjs";
2
2
  import unicornPlugin from "eslint-plugin-unicorn";
3
3
  // ../oxlint/src/unicorn.ts
4
4
  const UNICORN$1 = { config: {
@@ -105,7 +105,7 @@ const UNICORN$1 = { config: {
105
105
  "unicorn/prefer-optional-catch-binding": "off",
106
106
  "unicorn/prefer-prototype-methods": "error",
107
107
  "unicorn/prefer-query-selector": "error",
108
- "unicorn/prefer-reflect-apply": "error",
108
+ "unicorn/prefer-reflect-apply": "off",
109
109
  "unicorn/prefer-regexp-test": "error",
110
110
  "unicorn/prefer-response-static-json": "error",
111
111
  "unicorn/prefer-set-has": "error",
package/dist/vitest.mjs CHANGED
@@ -1,6 +1,8 @@
1
- import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-axs1VQcN.mjs";
1
+ import { i as CORE, n as writeEslintRules, t as writeCategoryRules } from "./convert-Bc-edfKh.mjs";
2
2
  import vitestPlugin from "@vitest/eslint-plugin";
3
3
  // ../oxlint/src/vitest.ts
4
+ /** Steers module mocks toward dependency injection, as honest functions take their external collaborators as parameters. */
5
+ const MODULE_MOCK_MESSAGE = "A module mock swaps out a dependency that the code under test hides. Make the code honest instead: have it take the stateful or external collaborator (a database, network client, file system, or clock) as a parameter, inject the real one from the entry point, and pass a fake in the test. If a mock is unavoidable, suppress this diagnostic with a reason and mock through `import()` so that the path stays type-checked.";
4
6
  const VITEST$1 = { config: {
5
7
  plugins: ["vitest"],
6
8
  rules: {
@@ -36,7 +38,11 @@ const VITEST$1 = { config: {
36
38
  "vitest/no-large-snapshots": "error",
37
39
  "vitest/no-mocks-import": "error",
38
40
  "vitest/no-restricted-matchers": "off",
39
- "vitest/no-restricted-vi-methods": "off",
41
+ "vitest/no-restricted-vi-methods": ["error", {
42
+ mock: MODULE_MOCK_MESSAGE,
43
+ doMock: MODULE_MOCK_MESSAGE,
44
+ importMock: MODULE_MOCK_MESSAGE
45
+ }],
40
46
  "vitest/no-standalone-expect": "error",
41
47
  "vitest/no-test-prefixes": "error",
42
48
  "vitest/no-test-return-statement": "error",
@@ -83,7 +89,7 @@ const VITEST$1 = { config: {
83
89
  "vitest/valid-describe-callback": "error",
84
90
  "vitest/valid-expect": "error",
85
91
  "vitest/valid-expect-in-promise": "error",
86
- "vitest/valid-title": "error",
92
+ "vitest/valid-title": ["error", { ignoreTypeOfDescribeName: true }],
87
93
  "vitest/warn-todo": "error"
88
94
  }
89
95
  } };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastidood/eslint-config",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Strict baseline ESLint configuration generated from @bastidood/oxlint-config.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/BastiDood/slopstopper",
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@bastidood/eslint-plugin-slopstopper": "^0.1.0",
29
+ "@bastidood/eslint-plugin-slopstopper": "^0.2.0",
30
30
  "@vitest/eslint-plugin": "^1.6.28",
31
31
  "eslint-plugin-import-x": "^4.17.1",
32
32
  "eslint-plugin-jsdoc": "^65.4.2",
@@ -36,7 +36,7 @@
36
36
  "typescript-eslint": "^8.72.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@bastidood/oxlint-config": "0.2.0",
39
+ "@bastidood/oxlint-config": "0.3.0",
40
40
  "@bastidood/tsconfig": "0.1.1",
41
41
  "@typescript/native": "npm:typescript@^7.0.2",
42
42
  "eslint": "^10.13.0",