Skip to content

Commit

Permalink
docs: improve readme with auto ts config search
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Aug 30, 2024
1 parent b3cf05e commit 9e8fedc
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@
```bash
npm install --save-dev eslint-config-codely
```
2. Add it to your `eslint.config.js` file.
2. Add it to your `eslint.config.js`:

For JavaScript:
```js
import eslintConfigCodely from "eslint-config-codely";

export default [
...eslintConfigCodely.js,
{
// Your config here
}
// If you're using js
...eslintConfigCodely.js,
// Or if you're using ts. The ts config includes the js one, so you don't need to include it manually.
...eslintConfigCodely.ts,
{
// Your config here
}
]
```

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

export default [
...eslintConfigCodely.ts,
{
// You should add the path to your tsconfig
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json"],
},
}
// Your config here
}
...eslintConfigCodely.ts,
{
// You should add the path to your tsconfig
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json"],
},
}
// Your config here
}
]
```

Expand Down

0 comments on commit 9e8fedc

Please sign in to comment.