-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary: When I initially updating the eslint config to support TypeScript, I added settings to .eslintrc.js that I should've added to eslint-config-khan/index.js. Without these settings, using @khanacademy/eslint-config in other codebases would fail. TODO: - [x] update eslint-config-khan's package.json to have the appropriate peer deps Issue: FEI-4957 ## Test plan: - add some lint - see that it's reported in VSCode - yarn lint, see that it's reported - fix the lint - yarn lint, see there's no lint Author: kevinbarabash Reviewers: jeresig, kevinbarabash Required Reviewers: Approved By: jeresig, jeresig Checks: ⌛ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ⌛ gerald, ⌛ Analyze (javascript), ⏭ dependabot Pull Request URL: #535
- Loading branch information
1 parent
5c50724
commit 501b381
Showing
5 changed files
with
99 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/eslint-config": patch | ||
--- | ||
|
||
Add missing settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,49 @@ | ||
# eslint-config-khan | ||
|
||
Shared Khan Academy eslint configuration. | ||
|
||
## Quick Start | ||
|
||
- `yarn add @khanacademy/eslint-config` | ||
- Update your .eslintrc.js file to: | ||
- extend `"@khanacademy"` | ||
- include settings for `"import/resolver"` | ||
|
||
For monorepos the `"import/resolver"` settings will look like this: | ||
|
||
``` | ||
settings: { | ||
"import/resolver": { | ||
typescript: { | ||
project: [ | ||
"packages/*/tsconfig.json", | ||
"packages/tsconfig-shared.json", | ||
], | ||
}, | ||
node: { | ||
project: [ | ||
"packages/*/tsconfig.json", | ||
"packages/tsconfig-shared.json", | ||
], | ||
}, | ||
}, | ||
}, | ||
``` | ||
|
||
For regulard repos, the settings will look like this: | ||
|
||
``` | ||
For monorepos the `"import/resolver"` settings will look like this: | ||
``` | ||
settings: { | ||
"import/resolver": { | ||
typescript: { | ||
project: "tsconfig.json", | ||
}, | ||
node: { | ||
project: "tsconfig.json", | ||
}, | ||
}, | ||
}, | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters