Skip to content

Commit 9e8fedc

Browse files
committed
docs: improve readme with auto ts config search
1 parent b3cf05e commit 9e8fedc

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,19 @@
3131
```bash
3232
npm install --save-dev eslint-config-codely
3333
```
34-
2. Add it to your `eslint.config.js` file.
34+
2. Add it to your `eslint.config.js`:
3535

36-
For JavaScript:
3736
```js
3837
import eslintConfigCodely from "eslint-config-codely";
3938

4039
export default [
41-
...eslintConfigCodely.js,
42-
{
43-
// Your config here
44-
}
40+
// If you're using js
41+
...eslintConfigCodely.js,
42+
// Or if you're using ts. The ts config includes the js one, so you don't need to include it manually.
43+
...eslintConfigCodely.ts,
44+
{
45+
// Your config here
46+
}
4547
]
4648
```
4749

@@ -50,17 +52,17 @@ For TypeScript:
5052
import eslintConfigCodely from "eslint-config-codely";
5153

5254
export default [
53-
...eslintConfigCodely.ts,
54-
{
55-
// You should add the path to your tsconfig
56-
files: ["**/*.ts", "**/*.tsx"],
57-
languageOptions: {
58-
parserOptions: {
59-
project: ["./tsconfig.json"],
60-
},
61-
}
62-
// Your config here
63-
}
55+
...eslintConfigCodely.ts,
56+
{
57+
// You should add the path to your tsconfig
58+
files: ["**/*.ts", "**/*.tsx"],
59+
languageOptions: {
60+
parserOptions: {
61+
project: ["./tsconfig.json"],
62+
},
63+
}
64+
// Your config here
65+
}
6466
]
6567
```
6668

0 commit comments

Comments
 (0)