Skip to content

Commit

Permalink
add missing eslint-import-resolver-typescript peer dependency and doc…
Browse files Browse the repository at this point in the history
…ument it in readme
  • Loading branch information
staaky committed Oct 22, 2022
1 parent 5efc595 commit f091311
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The ESLint configuration for Bedandbreakfast.eu
1. Install this package along with our [prettier-config](https://github.com/bedandbreakfasteu/prettier-config) using:

```bash
yarn add --dev @bedandbreakfasteu/eslint-config@bedandbreakfasteu/eslint-config#2.0.1 @bedandbreakfasteu/prettier-config@bedandbreakfasteu/prettier-config#1.0.1
yarn add --dev @bedandbreakfasteu/eslint-config@bedandbreakfasteu/eslint-config#2.0.2 @bedandbreakfasteu/prettier-config@bedandbreakfasteu/prettier-config#1.0.1
```

2. Install the required devDependencies using:
Expand All @@ -19,6 +19,22 @@ The ESLint configuration for Bedandbreakfast.eu
| xargs yarn add --dev
```

3. Add `"extends": "@bedandbreakfasteu/eslint-config"` to your `.eslintrc`
3. Add an `.eslintrc.js` with the following and expand upon it with your own config:

```bash
const path = require('path');
module.exports = {
extends: ['@bedandbreakfasteu/eslint-config'],
settings: {
'import/resolver': {
[require.resolve('eslint-import-resolver-typescript')]: {
alwaysTryTypes: true,
project: path.resolve(__dirname, 'tsconfig.json'),
},
},
},
};
```

That's it, happy coding!
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bedandbreakfasteu/eslint-config",
"version": "2.0.1",
"version": "2.0.2",
"description": "Bedandbreakfast.eu ESLint Config",
"license": "MIT",
"repository": {
Expand All @@ -19,6 +19,7 @@
"eslint": "^8.26.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
Expand Down

0 comments on commit f091311

Please sign in to comment.