Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@nativescript/tslint-rules

Package Overview
Dependencies
Maintainers
16
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.

npmnpm
Version
0.0.1
Version published
Weekly downloads
440
-15.06%
Maintainers
16
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.

Keywords

NativeScript

FAQs

Package last updated on 18 Apr 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