Socket
Socket
Sign inDemoInstall

nz-tslint-rules

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nz-tslint-rules

TSLint rules targeting NG-ZORRO


Version published
Maintainers
1
Install size
49.4 kB
Created

Readme

Source

npm version Downloads

NG-ZORRO TSLint

TSLint rules for NG-ZORRO.

Install

$ npm i nz-tslint-rules -D
# or
$ yarn add nz-tslint-rules -D

Versions

NG-ZORROTSLint Rules
8.x0.800.x
9.x0.900.x

Rules

This repository provides the following rules:

Rule nameConfigurationDescription
nz-secondary-entry-importsnoneUpdates the import paths to secondary entry point

Migration to Secondary Entry

Using the current set of rules allows you to automatically migrate your project which uses primary entry to secondary entry.

// Before
import {
  NzAutocompleteModule,
  NzButtonModule,
  NzCardModule,
  NzTableModule,
  NzToolTipModule
} from 'ng-zorro-antd';

import { NzNoAnimationModule  } from 'ng-zorro-antd';

// After
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzCardModule } from 'ng-zorro-antd/card';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';

Note: This rule does not applicable if you use import { NgZorroAntdModule } from 'ng-zorro-antd'.

Use

Add this rule set in your tslint.json file.

{
  "rulesDirectory": [
    "node_modules/nz-tslint-rules"
  ],
  "rules": {
    "nz-secondary-entry-imports": true
  }
}

License

MIT

Keywords

FAQs

Last updated on 15 May 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc