@slango.configs/eslint 1.2.26 → 1.2.27

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @slango.configs/eslint
2
2
 
3
+ ## 1.2.27
4
+
5
+ ### Patch Changes
6
+
7
+ - c543a10: Fixed issue with eslint
8
+
3
9
  ## 1.2.26
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slango.configs/eslint",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "private": false,
5
5
  "description": "Slango eslint configs",
6
6
  "repository": {
@@ -24,8 +24,15 @@ export const baseTypescriptConfig = (options = {}) => {
24
24
  ...baseConfig.languageOptions,
25
25
  parserOptions: {
26
26
  ...baseConfig.languageOptions?.parserOptions,
27
- project,
28
- tsconfigRootDir: dirname(project),
27
+ // `project` is resolved from the current working directory. When ESLint
28
+ // resolves this config for a file but cwd has no tsconfig — e.g.
29
+ // lint-staged invoking eslint from a monorepo root, where ESLint 10
30
+ // looks up each file's nearest config and loads this preset — `project`
31
+ // is undefined. Guard so loading the config never throws on
32
+ // `dirname(undefined)`; type-aware linting just stays off for that
33
+ // invocation (only relevant for .ts files, which are linted from their
34
+ // own package directory where a tsconfig exists).
35
+ ...(project ? { project, tsconfigRootDir: dirname(project) } : {}),
29
36
  },
30
37
  },
31
38
  name: '@slango.configs/eslint/typescript',