Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ionic-team/v4-migration-tslint
TSLint rules for Ionic Angular v4 Migration
https://github.com/ionic-team/v4-migration-tslint
automation ionic ionic4 migration tslint tslint-rules
Last synced: about 1 month ago
JSON representation
TSLint rules for Ionic Angular v4 Migration
- Host: GitHub
- URL: https://github.com/ionic-team/v4-migration-tslint
- Owner: ionic-team
- License: mit
- Fork: true (cwoolum/ionicV4-tslint)
- Created: 2018-05-01T19:46:03.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-01-06T21:57:00.000Z (almost 2 years ago)
- Last Synced: 2024-09-25T21:20:00.336Z (about 2 months ago)
- Topics: automation, ionic, ionic4, migration, tslint, tslint-rules
- Language: TypeScript
- Homepage:
- Size: 314 KB
- Stars: 102
- Watchers: 6
- Forks: 17
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @ionic/v4-migration-tslint
[![Build Status][circle-badge]][circle-badge-url]
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Coverage Status](https://coveralls.io/repos/github/ionic-team/v4-migration-tslint/badge.svg?branch=master)](https://coveralls.io/github/ionic-team/v4-migration-tslint?branch=master)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)An effort to warn about and automatically fix syntax changes listed in [`BREAKING.md`](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md) using tslint, codelyzer, and the Angular compiler.
We are looking for contributors to help build these rules out! See [`CONTRIBUTING.md`](https://github.com/ionic-team/v4-migration-tslint/blob/develop/CONTRIBUTING.md) to help out. :sparkling_heart:
## How to Use
1. Install the lint rules:
```
npm i -D @ionic/v4-migration-tslint
```1. Add a file called `ionic-migration.json` at the root of your project and paste in the following JSON.
```json
{
"rulesDirectory": ["@ionic/v4-migration-tslint/rules"],
"rules": {
"ion-action-sheet-method-create-parameters-renamed": true,
"ion-alert-method-create-parameters-renamed": true,
"ion-back-button-not-added-by-default": { "options": [true], "severity": "warning" },
"ion-button-attributes-renamed": true,
"ion-button-is-now-an-element": true,
"ion-buttons-attributes-renamed": true,
"ion-col-attributes-renamed": true,
"ion-datetime-capitalization-changed": true,
"ion-fab-attributes-renamed": true,
"ion-fab-button-is-now-an-element": true,
"ion-fab-fixed-content": true,
"ion-icon-attribute-is-active-removed": true,
"ion-item-attributes-renamed": true,
"ion-item-divider-ion-label-required": true,
"ion-item-ion-label-required": true,
"ion-item-is-now-an-element": true,
"ion-item-option-is-now-an-element": true,
"ion-item-option-method-get-sliding-percent-renamed": true,
"ion-item-options-attribute-values-renamed": true,
"ion-label-attributes-renamed": true,
"ion-list-header-ion-label-required": true,
"ion-loading-method-create-parameters-renamed": true,
"ion-menu-events-renamed": true,
"ion-menu-toggle-is-now-an-element": true,
"ion-navbar-is-now-ion-toolbar": true,
"ion-option-is-now-ion-select-option": true,
"ion-overlay-method-create-should-use-await": true,
"ion-overlay-method-present-should-use-await": true,
"ion-radio-attributes-renamed": true,
"ion-radio-group-is-now-an-element": true,
"ion-radio-slot-required": true,
"ion-range-attributes-renamed": true,
"ion-segment-button-ion-label-required": true,
"ion-spinner-attribute-values-renamed": true,
"ion-tabs-refactored": { "options": [true], "severity": "warning" },
"ion-text-is-now-an-element": true
}
}
```1. Lint your project:
```bash
npx tslint -c ionic-migration.json -p tsconfig.json
```:memo: **Hints**:
- Run tslint with `-t verbose` to output the rule names of lint errors which correspond to the [table of rules](#rules) below.
- Run tslint with `--fix` to attempt automatic fixes (_note_: not all rules have fixes, and be sure to save a backup in version control before running with `--fix`)## Rules
:white_large_square: – These rules need to be completed! See [`CONTRIBUTING.md`](https://github.com/ionic-team/v4-migration-tslint/blob/develop/CONTRIBUTING.md) to get started.
:wrench: – These rules can be automatically fixed with `--fix`.
category
rule
contributors
Code Changes
Action Sheet
:wrench:
:white_check_mark:
ion-action-sheet-method-create-parameters-renamed
@cwoolum
Alert
:wrench:
:white_check_mark:
ion-alert-method-create-parameters-renamed
@cwoolum
Datetime
:wrench:
:white_check_mark:
ion-datetime-capitalization-changed
@mhartington
Item Sliding
:wrench:
:white_check_mark:
ion-item-option-method-get-sliding-percent-renamed
@mhartington
Loading
:wrench:
:white_check_mark:
ion-loading-method-create-parameters-renamed
@areo
Nav
:white_large_square:
ion-nav-controller-method-remove-renamed
Option
:white_large_square:
ion-option-class-renamed
Overlays
:white_check_mark:
ion-overlay-method-create-should-use-await
@cwoolum
:white_check_mark:
ion-overlay-method-present-should-use-await
@cwoolum
Markup Changes
Back Button
:white_check_mark:
ion-back-button-not-added-by-default
@dwieeb
Button
:wrench:
:white_check_mark:
ion-button-attributes-renamed
@cwoolum
:wrench:
:white_check_mark:
ion-button-is-now-an-element
@cwoolum,
@j3gb3rt
FAB
:wrench:
:white_check_mark:
ion-fab-button-is-now-an-element
@dwieeb,
@j3gb3rt
:wrench:
:white_check_mark:
ion-fab-attributes-renamed
@dwieeb
:wrench:
:white_check_mark:
ion-fab-fixed-content
@dwieeb
Grid
:wrench:
:white_check_mark:
ion-col-attributes-renamed
@dwieeb
Icon
:white_check_mark:
ion-icon-attribute-is-active-removed
@dwieeb
Item
:wrench:
:white_check_mark:
ion-item-is-now-an-element
@dwieeb,
@j3gb3rt
:white_check_mark:
ion-item-ion-label-required
@dwieeb
:wrench:
:white_check_mark:
ion-item-attributes-renamed
@dwieeb
Item Divider
:white_check_mark:
ion-item-divider-ion-label-required
@dwieeb
Item Options
:wrench:
:white_check_mark:
ion-item-options-attribute-values-renamed
@dwieeb
Item Sliding
:white_check_mark:
ion-item-option-is-now-an-element
@dwieeb
Label
:wrench:
:white_check_mark:
ion-label-attributes-renamed
@dwieeb
List Header
:white_check_mark:
ion-list-header-ion-label-required
@dwieeb
Menu
:wrench:
:white_check_mark:
ion-menu-events-renamed
@mhartington
Menu Toggle
:white_check_mark:
ion-menu-toggle-is-now-an-element
@dwieeb
Navbar
:wrench:
:white_check_mark:
ion-navbar-is-now-ion-toolbar
@cwoolum
Option
:wrench:
:white_check_mark:
ion-option-is-now-ion-select-option
@dwieeb
Radio
:wrench:
:white_check_mark:
ion-radio-attributes-renamed
@dwieeb
:wrench:
:white_check_mark:
ion-radio-slot-required
@dwieeb
:wrench:
:white_check_mark:
ion-radio-group-is-now-an-element
@dwieeb,
@j3gb3rt
Range
:wrench:
:white_check_mark:
ion-range-attributes-renamed
@dwieeb
Segment Button
:wrench:
:white_check_mark:
ion-segment-button-ion-label-required
@dwieeb
Select
:white_large_square:
ion-select-attributes-renamed
Spinner
:wrench:
:white_check_mark:
ion-spinner-attribute-values-renamed
@dwieeb
Tabs
:white_check_mark:
ion-tabs-refactored
@mhartington,
Text / Typography
:wrench:
:white_check_mark:
ion-text-is-now-an-element
@dwieeb,
@j3gb3rt
Toolbar
:wrench:
:white_check_mark:
ion-buttons-attributes-renamed
@dwieeb
### Not Covered
Some changes are not covered by this fixer due to their complexity or because it would make no sense to do in automated fashion. They are:
- [Colors](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#colors)
- [Dynamic Mode](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#dynamic-mode)
- [Icon » Fonts Removed](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#icon)
- [Theming](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#theming)[circle-badge]: https://circleci.com/gh/ionic-team/v4-migration-tslint.svg?style=shield
[circle-badge-url]: https://circleci.com/gh/ionic-team/v4-migration-tslint