eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

export-matching-filename-only

ESLint plugin / export-matching-filename-only

Requires that export matching filename is the only export.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/export-matching-filename-only": "error"
  }
};

Examples of incorrect code

// filename: file.ts
export const file = 1;
export const x = 1;

Examples of correct code

// filename: file.ts
export const file = 1;