ποΈ Update no-import lint rule to forbid sub-paths#26531
Merged
jridgewell merged 1 commit intoampproject:masterfrom Feb 26, 2020
Merged
ποΈ Update no-import lint rule to forbid sub-paths#26531jridgewell merged 1 commit intoampproject:masterfrom
jridgewell merged 1 commit intoampproject:masterfrom
Conversation
|
Hey @erwinmombay, these files were changed:
|
rsimha
approved these changes
Jan 28, 2020
| if (name !== forbidden.import) { | ||
| continue; | ||
| const importSource = forbidden.import; | ||
| if (name === importSource || name.startsWith(`${importSource}/`)) { |
Contributor
There was a problem hiding this comment.
Can you now delete this rule?
amphtml/build-system/eslint-rules/no-import.js
Lines 25 to 29 in 0b9623c
Contributor
There was a problem hiding this comment.
@jridgewell Was this rule still needed? With this change, isn't the preact rule sufficient?
erwinmombay
approved these changes
Jan 29, 2020
Caroline accidentally imported `from 'preact/src'`, and took a bit to figure out what was going wrong. This fix now forbids importing from the `preact/src` sub-paths.
4287642 to
2357800
Compare
robinvanopstal
added a commit
to jungvonmatt/amphtml
that referenced
this pull request
Feb 27, 2020
* master: (54 commits) inabox-resources: Minor test improvement (ampproject#26916) DocInfo: replace metaTags with viewport in API (ampproject#26687) π SwG now uses AMP sendBeacon interface (ampproject#26970) π Allow array destructuring on preact hooks (ampproject#26901) Gulp Dep Check: fail on unused entries (ampproject#26981) Update no-import lint rule to forbid sub-paths (ampproject#26531) π amp-ad type blade - fix bladeOnLoad callback (ampproject#26627) π Clarify when max-age is required (ampproject#26956) β»οΈ Consolidate players as .i-amphtml-media-component (ampproject#26967) Add Preact Enzyme tests (ampproject#26529) Fixes `update_tests` flag on `gulp validator` (ampproject#26965) π¦ Update dependency google-closure-library to v20200224 (ampproject#26986) π Transform aliased configured components (ampproject#26541) β¨ InaboxResources: Observe intersections for some elements' viewportCallbacks (ampproject#26942) variable substitutions: Support allowlist lookup in AmpDocShadow (ampproject#26731) cl/297197875 Revision bump for ampproject#26877 (ampproject#26982) Json fix (ampproject#26971) π¦ Update dependency mocha to v7.1.0 (ampproject#26976) Add documentation for amp-access-scroll (ampproject#26782) make controls always shown in amp for email (ampproject#25714) ...
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caroline accidentally imported
from 'preact/src', and took a bit to figure out what was going wrong. This fix now forbids importing from thepreact/srcsub-paths.