René's URL Explorer Experiment


Title: Create an ESLint rule for migrating to scoped packages imports · Issue #8131 · NativeScript/NativeScript · GitHub

Open Graph Title: Create an ESLint rule for migrating to scoped packages imports · Issue #8131 · NativeScript/NativeScript

X Title: Create an ESLint rule for migrating to scoped packages imports · Issue #8131 · NativeScript/NativeScript

Description: Why? Provide an automated way to migrate imports and require statements from: tns-core-modules to @nativescript/core; and nativescript-angular to @nativescript/angular. How? The above can be achieved by providing an ESLint rule that dete...

Open Graph Description: Why? Provide an automated way to migrate imports and require statements from: tns-core-modules to @nativescript/core; and nativescript-angular to @nativescript/angular. How? The above can be achiev...

X Description: Why? Provide an automated way to migrate imports and require statements from: tns-core-modules to @nativescript/core; and nativescript-angular to @nativescript/angular. How? The above can be achiev...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/8131

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Create an ESLint rule for migrating to scoped packages imports ","articleBody":"# Why?\r\n\r\nProvide an automated way to migrate `imports` and `require` statements from:\r\n- `tns-core-modules` to `@nativescript/core`;\r\n- and `nativescript-angular` to `@nativescript/angular`.\r\n\r\n# How?\r\n\r\nThe above can be achieved by providing an ESLint rule that detects the old type of imports and recommends using the new one. It should also provide an autofix that migrates the imports.\r\n\r\n# Migration description\r\n\r\n## JS/TS\r\n\r\nThe rule should work for both JS and TS projects.\r\n\r\n## `tns-core-modules` -\u003e `@nativescript/core`\r\n\r\nThe rule should migrate the imports from that package in the following way:\r\n\r\n### for imports from `application`, `application-settings`, `connectivity`, `image-asset`, `trace`:\r\n\r\n1. `import { run } from \"tns-core-modules/application\"` -\u003e\r\n`import { Application } from \"@nativescript/core\"`\r\n2. `const run = require(\"tns-core-modules/application\").run` -\u003e\r\n`const Application = require(\"@nativescript/core/application\")`\r\n\r\nIn cases 1 and 2, the rule should also change all uses of `run` in the code to `Application.run`.\r\n\r\n3. `import * as application from \"tns-core-modules/application\"` -\u003e\r\n`import { Application } from \"@nativescript/core\"`\r\n4. `const application = require(\"tns-core-modules/application\")` -\u003e\r\n`const Application = require(\"@nativescript/core\").Application`\r\n\r\nIn cases 3 and 4, the rule should also change all uses of `application` in the code to `Application`.\r\n\r\n### for imports from `utils/utils`:\r\n\r\nThe same as `application` with this exception:\r\n\r\nimport * as utils from \"tns-core-modules/utils/utils\";\r\nutils.ad;\r\n`\r\n-\u003e\r\n`\r\nimport { Utils } from \"@nativescript/core\";\r\nUtils.android;\r\n`\r\n\r\n### for imports from `profiling`:\r\n\r\nMigrate to `import { Profiling } from @nativescript/core` for the methods that are now exported through the `Profiling` constant from `@nativescript/core`:\r\nhttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L69-L76\r\n\r\nMigrate to `import { SomeInterface } from '@nativescript/core'` for all symbols that are now directly exported from `@nativescript/core`:\r\nhttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L60\r\n\r\n### for imports from `trace`:\r\n\r\nMigrate to `import { Trace } from @nativescript/core` for the methods that are now exported through the `Trace` constant from `@nativescript/core`:\r\nhttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L88-L93\r\n\r\nMigrate to `import { SomeInterface } from '@nativescript/core'` for all symbols that are now directly exported from `@nativescript/core`:\r\nhttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L80\r\n\r\n### for imports from `http`:\r\n\r\nMigrate to `import { Http } from @nativescript/core` for the methods that are now exported through the `Http` constant from `@nativescript/core`:\r\nhttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L52\r\nMigrate to `import { SomeInterface } from '@nativescript/core'` for all symbols that are now directly exported from `@nativescript/core`:\r\nhttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L49\r\n\r\n### for imports from `platform`:\r\n\r\nFor `isAndroid` and `isIOS` migrate to `@nativescript/core`.\r\nFor `screen` and `device` migrate to `import { Screen, Device } from '@nativescript/core';`.\r\nFor any other path migrate to `@nativescript/core/platform`.\r\n\r\n### for imports from `ui/*`, `data/observable-array`, `data/observable`, `file-system`, `color`, `image-asset`, `image-source`, `text`, `xml`:\r\n\r\n1. `import { Observable } from \"tns-core-modules/data/observable\"` -\u003e\r\n`import { Observable } from \"@nativescript/core\"`\r\n2. `const Observable = require(\"tns-core-modules/data/observable\")` -\u003e\r\n`const Observable = require(\"@nativescript/core\").Observable`\r\n\r\n### for every other import starting with `tns-core-modules`, the `tns-core-modules` prefix should be replaced with `@nativescript/core`.\r\n\r\n## `nativescript/angular` -\u003e `@nativescript/angular`","author":{"url":"https://github.com/sis0k0","@type":"Person","name":"sis0k0"},"datePublished":"2019-11-21T14:43:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/8131/NativeScript/issues/8131"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9327a7b3-5b39-b0d5-b2ac-db32d678a1f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC306:371948:1954B6C:2255A17:697A9EB5
html-safe-noncec27553b470fb8799ef91ff69c5c62e466a64fb03e07386b0820c770bf884cbc6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzA2OjM3MTk0ODoxOTU0QjZDOjIyNTVBMTc6Njk3QTlFQjUiLCJ2aXNpdG9yX2lkIjoiMjQwMDI5MjY0NDY1MjIyODI3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4fe475a8ac031eae95398fc373a3c1fcb5c0579334e546c6b7e25b8c52f982b3
hovercard-subject-tagissue:526638462
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/8131/issue_layout
twitter:imagehttps://opengraph.githubassets.com/54112c5bbc79b21490c1a435770d46250e7db74ffba06855979038ae23fee86e/NativeScript/NativeScript/issues/8131
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/54112c5bbc79b21490c1a435770d46250e7db74ffba06855979038ae23fee86e/NativeScript/NativeScript/issues/8131
og:image:altWhy? Provide an automated way to migrate imports and require statements from: tns-core-modules to @nativescript/core; and nativescript-angular to @nativescript/angular. How? The above can be achiev...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesis0k0
hostnamegithub.com
expected-hostnamegithub.com
None4d375b6c612de26fd037e0638eaf57e32cf9b16daf53ab68c25c04cd3b058113
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9af1d97e0cdcced8d2b1d10d909b84c76e62924a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/8131#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F8131
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F8131
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/8131
Reloadhttps://github.com/NativeScript/NativeScript/issues/8131
Reloadhttps://github.com/NativeScript/NativeScript/issues/8131
NativeScript https://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Please reload this pagehttps://github.com/NativeScript/NativeScript/issues/8131
Notifications https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.4k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://github.com/NativeScript/NativeScript
Issues 869 https://github.com/NativeScript/NativeScript/issues
Pull requests 60 https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects 0 https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security 0 https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
Code https://github.com/NativeScript/NativeScript
Issues https://github.com/NativeScript/NativeScript/issues
Pull requests https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8131
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8131
Create an ESLint rule for migrating to scoped packages imports https://github.com/NativeScript/NativeScript/issues/8131#top
enhancementhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22enhancement%22
featurehttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22feature%22
https://github.com/sis0k0
https://github.com/sis0k0
sis0k0https://github.com/sis0k0
on Nov 21, 2019https://github.com/NativeScript/NativeScript/issues/8131#issue-526638462
NativeScript/nativescript-core/index.tshttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L69-L76
8d2dd2ehttps://github.com/NativeScript/NativeScript/commit/8d2dd2eb21965f988f339a1c17683712cdfc3654
NativeScript/nativescript-core/index.tshttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L60
8d2dd2ehttps://github.com/NativeScript/NativeScript/commit/8d2dd2eb21965f988f339a1c17683712cdfc3654
NativeScript/nativescript-core/index.tshttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L88-L93
8d2dd2ehttps://github.com/NativeScript/NativeScript/commit/8d2dd2eb21965f988f339a1c17683712cdfc3654
NativeScript/nativescript-core/index.tshttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L80
8d2dd2ehttps://github.com/NativeScript/NativeScript/commit/8d2dd2eb21965f988f339a1c17683712cdfc3654
NativeScript/nativescript-core/index.tshttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L52
8d2dd2ehttps://github.com/NativeScript/NativeScript/commit/8d2dd2eb21965f988f339a1c17683712cdfc3654
NativeScript/nativescript-core/index.tshttps://github.com/NativeScript/NativeScript/blob/8d2dd2eb21965f988f339a1c17683712cdfc3654/nativescript-core/index.ts#L49
8d2dd2ehttps://github.com/NativeScript/NativeScript/commit/8d2dd2eb21965f988f339a1c17683712cdfc3654
enhancementhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22enhancement%22
featurehttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.