@yasainet/eslint 0.0.42 → 0.0.43

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yasainet/eslint",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "ESLint",
5
5
  "type": "module",
6
6
  "exports": {
@@ -42,6 +42,12 @@ export const rulesConfigs = [
42
42
  files: ["**/*.ts", "**/*.tsx"],
43
43
  languageOptions: {
44
44
  parser: tseslint.parser,
45
+ // Enable type-aware linting so rules like `no-unnecessary-condition`
46
+ // can consult the TypeScript type checker.
47
+ parserOptions: {
48
+ projectService: true,
49
+ tsconfigRootDir: process.cwd(),
50
+ },
45
51
  },
46
52
  plugins: {
47
53
  "@typescript-eslint": tseslint.plugin,
@@ -60,6 +66,10 @@ export const rulesConfigs = [
60
66
  { prefer: "type-imports" },
61
67
  ],
62
68
  "@typescript-eslint/no-explicit-any": "warn",
69
+ // Detect defensive fallbacks on non-nullable values (e.g., `?? ''`
70
+ // on a non-null column). Kept at warn until existing violations are
71
+ // cleaned up across consuming projects; promote to error afterwards.
72
+ "@typescript-eslint/no-unnecessary-condition": "warn",
63
73
  },
64
74
  },
65
75
  ];