🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

eslint-plugin-jetops-index

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

eslint-plugin-jetops-index

[![Maintainability](https://api.codeclimate.com/v1/badges/b5e7492c51bf2bb81df6/maintainability)](https://codeclimate.com/repos/6368ce7ebe9ef40dee00b126/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/b5e7492c51bf2bb81df6/test_cove

1.0.0-development.1487.1
unpublished
latest
development
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created

Maintainability Test Coverage

jetops-eslint-plugin-jetops-index

What

Show error for each declaration in index.{j|t}s file.

Why

Because it's terrible to work in a project where all the code is written in index.{j|t}s files.

Because it's terrible when you have all the opened tabs of your IDE are named index.

But because we think index files are a great way to expose only choosen elements from a module.

Examples

Examples of correct code for this rule:

// index.ts

export { namedExport } from './aFile.ts'
export { default } from './anoterFile.ts'

Examples of incorrect code for this rule:

// index.ts

export const aVariable = 'DONT DO THIS'

export function aFunction() {
  return 'THIS NEITHER'
}

class AClass {
  aMethod() {
    return 'THIS, NEITHER ONE NOR THE OTHER'
  }
}

eslint-plugin-jetops-index

This library was generated with Nx.

Running unit tests

Run nx test eslint-plugin-jetops-index to execute the unit tests via Jest.

Running lint

Run nx lint eslint-plugin-jetops-index to execute the lint via ESLint.

FAQs

Package last updated on 08 Nov 2022

Did you know?

Socket

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