Skip to content

Commit 8a7f6b3

Browse files
authored
Revert back to use cosmiconfig (#212)
1 parent cbde318 commit 8a7f6b3

File tree

6 files changed

+80
-8
lines changed

6 files changed

+80
-8
lines changed

.changeset/thin-monkeys-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'steiger': patch
3+
---
4+
5+
Revert the switch from cosmiconfig to lilconfig due to missing support for TS files

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ npx steiger ./src --watch
4141

4242
Steiger is zero-config! If you don't want to disable certain rules, you can safely skip this section.
4343

44-
You can create a `steiger.config.ts` or `steiger.config.js` file in the root of your project to configure the rules. Import `{ defineConfig } from "steiger"` to get autocompletion.
44+
Steiger is configurable via `cosmiconfig`. That means that you can create a `steiger.config.ts` or `steiger.config.js` file in the root of your project to configure the rules. Import `{ defineConfig } from "steiger"` to get autocompletion.
4545

4646
The config file shape is highly inspired by ESLint's config file, so if you have configured ESLint before, you'll find it easy to configure Steiger.
4747

packages/steiger/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ npx steiger ./src --watch
3838

3939
Steiger is zero-config! If you don't want to disable certain rules, you can safely skip this section.
4040

41-
You can create a `steiger.config.ts` or `steiger.config.js` file in the root of your project to configure the rules. Import `{ defineConfig } from "steiger"` to get autocompletion.
41+
Steiger is configurable via `cosmiconfig`. That means that you can create a `steiger.config.ts` or `steiger.config.js` file in the root of your project to configure the rules. Import `{ defineConfig } from "steiger"` to get autocompletion.
4242

4343
The config file shape is highly inspired by ESLint's config file, so if you have configured ESLint before, you'll find it easy to configure Steiger.
4444

packages/steiger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
"@clack/prompts": "^0.9.1",
5050
"@feature-sliced/steiger-plugin": "workspace:*",
5151
"chokidar": "^4.0.3",
52+
"cosmiconfig": "^9.0.0",
5253
"effector": "^23.4.2",
5354
"empathic": "^1.1.0",
5455
"fastest-levenshtein": "^1.0.16",
5556
"globby": "^14.1.0",
5657
"immer": "^10.1.1",
57-
"lilconfig": "^3.1.3",
5858
"lodash-es": "^4.17.21",
5959
"micromatch": "^4.0.8",
6060
"patronum": "^2.3.0",

packages/steiger/src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import prexit from 'prexit'
77
import { hideBin } from 'yargs/helpers'
88
import { reportPretty } from '@steiger/pretty-reporter'
99
import { fromError } from 'zod-validation-error'
10-
import { lilconfig } from 'lilconfig'
10+
import { cosmiconfig } from 'cosmiconfig'
1111

1212
import { linter } from './app'
1313
import { processConfiguration, $plugins } from './models/config'
@@ -18,7 +18,7 @@ import type { Diagnostic } from '@steiger/types'
1818
import packageJson from '../package.json'
1919
import { existsAndIsFolder } from './shared/file-system'
2020

21-
const { config, filepath } = (await lilconfig('steiger').search()) ?? { config: null, filepath: undefined }
21+
const { config, filepath } = (await cosmiconfig('steiger').search()) ?? { config: null, filepath: undefined }
2222
const defaultConfig = fsd.configs.recommended
2323

2424
try {

pnpm-lock.yaml

Lines changed: 70 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)