eslint-plugin-prefer-type-alias
What's this?
Prefer a type alias over an interface declaration in TypeScript.
Examples
// correcttype A = a: string ; type A = a: string & b: number ; type A = a: string & B & C;
// incorrectinterface A a: string; interface A extends B a: string;
Getting started
Install
$ yarn add -D @typescript-eslint/eslint-plugin eslint-plugin-prefer-type-alias# or $ npm i -D @typescript-eslint/eslint-plugin eslint-plugin-prefer-type-alias
.eslintrc.js
Edit moduleexports = extends: "plugin:@typescript-eslint/recommended" "plugin:prefer-type-alias/recommended" ;
LICENSE
MIT