0.1.1 • Published 3 years ago

@lint-ts-index/eslint-plugin v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@lint-ts-index/eslint-plugin

GitHub tag (latest SemVer) License GitHub issues

Purpose of this tool is to check that every files or subdirectories are exported in their corresponding index.ts files.

foo.ts is not exported in index.ts
If you believe it's an error, please add an exclusion in .indexignore

Have you ever forget to export the content of a new source file into the index.ts file of it's parent directory? Not anymore!

:warning: This project is still experimental and subject to important changes. Use it at your own risk

Installation

Indeed, the eslint and the typescript packages must be installed on your project since this plugin relies on them but can't decide for you which version to use.

npm

npm install --save-dev @lint-ts-index/eslint-plugin

yarn

yarn add -D @lint-ts-index/eslint-plugin

Configure eslint

The most minimal ESLint configuration to enable lint-ts-index should look like this:

module.exports = {
  plugins: ['@lint-ts-index'],
  rules: {
    '@lint-ts-index/exports': 'error'
  }
};

Valid values for the @lint-ts-index/exports rule are error, warning and off.

See also Configuration File Formats to include/exclude files and directories.

See also

License

This project is licensed under the MIT license which you can find a copy in the LICENSE file.