tslint-no-named-import-export

TSLint rule that prohibits named exports

Usage no npm install needed!

<script type="module">
  import tslintNoNamedImportExport from 'https://cdn.skypack.dev/tslint-no-named-import-export';
</script>

README

tslint-no-named-import-export

npm version CircleCI Dependency Status devDependencies Status npm

Disallows named imports and exports in ES6-style modules. Can be used to mimic "module interface".

Getting started

$ npm i tslint-no-named-import-export -D

Usage

Specify affected files/modules with regex pattern or list of patterns:

  // tslint.json
  "extends": [
    "tslint-no-named-import-export"
  ],
  "rules": {
    "no-named-export": [true, "^view\\.(native|web|ios|android)\\.tsx?quot;],
    "no-named-import": [true, "^viewquot;]
    ...
  }
  ...