-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix import/no-extraneous-deps config (#296)
## Summary: It turns out that setting the "packageDir" option on this rule to be an array of all of the packages ends up checking the package.json in each of those directories when checking **any** file in the whole project. What we want is to only consult the package.json that lives in packages/perseus/ when linting the files in that subdirectory. Thankfully, eslint supports cascading config files. This means we can add an .eslintrc.js in each of our packages' directories with only the 'import/no-extraneous-deps' rule. Eslint will combine that with the .eslintrc.js at the root when linting files in each package directory. Issue: None ## Test plan: - remove '@khanacademy/wonder-blocks-clickable' from packages/perseus/package.json - see that widges/radio/choice.jsx now has a lint error for that import Author: kevinbarabash Reviewers: jeresig, handeyeco Required Reviewers: Approved By: jeresig Checks: ✅ codecov/project, ✅ Lint, Flow, and Test (ubuntu-latest, 16.x), ✅ Extract i18n strings (ubuntu-latest, 16.x), ✅ Jest Coverage (ubuntu-latest, 16.x), ✅ Check for .changeset file (ubuntu-latest, 16.x), ✅ Cypress Coverage (ubuntu-latest, 16.x), ✅ Check builds for changes in size (ubuntu-latest, 16.x), ✅ gerald Pull Request URL: #296
- Loading branch information
1 parent
0245e26
commit bf180fe
Showing
13 changed files
with
75 additions
and
13 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,14 @@ | ||
--- | ||
"perseus-build-settings": patch | ||
"@khanacademy/kas": patch | ||
"@khanacademy/kmath": patch | ||
"@khanacademy/math-input": patch | ||
"@khanacademy/perseus": patch | ||
"@khanacademy/perseus-editor": patch | ||
"@khanacademy/perseus-error": patch | ||
"@khanacademy/perseus-linter": patch | ||
"@khanacademy/pure-markdown": patch | ||
"@khanacademy/simple-markdown": patch | ||
--- | ||
|
||
Fix our use of import/no-extraneous-dependencies |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |
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,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
module.exports = { | ||
rules: { | ||
"import/no-extraneous-dependencies": "error", | ||
}, | ||
}; |