Skip to content

tsukuha/eslint-plugin-export-restrict

Repository files navigation

eslint-plugin-export-restrict

Abstract

hogehoge

Motivation

hogehoge

Installation

  • npm
npm i -D eslint-plugin-export-restrict
  • pnpm
pnpm i -D eslint-plugin-export-restrict

Depending on how you configure ESLint, use either Flat Config or eslintrc to configure eslint-plugin-export-restrict.

Flat Config (eslint.config.js)

import exportRestrictPlugin from "eslint-plugin-export-restrict";

export default [
  // other settings...
  {
    plugins: {
      "export-restrict": exportRestrictPlugin,
    },
  },
  {
    rules: {
      "export-restrict/no-export-private-declares": ["error"],
    },
  },
];

eslintrc

{
  "plugins": [
    "export-restrict",
  ],
  "rules": {
    "export-restrict/no-export-private-declares": ["error"],
  }
}

Example

// --------- good ---------
/** @private */
function func1() {}

/** @private */
function func2() {}


// --------- bad ----------
/** @private */
function func1() {}

/** @private */
export function func2() {}

export {
  func1
}

Contributing

Welcome

License

MIT

About

This package "eslint-plugin-export-restrict" is a custom plugin using ESLint for controlling export declarations from files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •