Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nativescript/tslint-rules

Package Overview
Dependencies
Maintainers
12
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript/tslint-rules

A set of TSLint rules for NativeScript projects.

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
486
decreased by-57.67%
Maintainers
12
Weekly downloads
 
Created
Source

NativeScript TSLint Rules

Build Status

This project contains tslint rules useful for NativeScript applications.

prefer-mapped-imports rule

Prefer using mapped paths when importing external modules or ES6 import declarations.

Note: This rule is intended for code-sharing NativeScript projects

Options

  • prefix specifies the prefix for the mapped imports (usually "@src/").
  • prefix-mapped-to specifies folder that is mapped to the prefix (usually "src/").
  • base-url specifies the base url of the typescript program (usually ".")`

Sample rule config (tslint.json):

"prefer-mapped-imports": [
    true,
    {
        "prefix": "@prefix/",
        "prefix-mapped-to": "src/",
        "base-url": "."
    }
]

Autofix

The rule will propose a fix if:

  • Has all the configurations in the tslint.json
  • Used in typescript project with baseUrl and path mappings for either web or mobile files.

no-android-resources rule

The rule forbids using constants inside android.R as they cause performance issues.

Keywords

FAQs

Package last updated on 29 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc