eslint-plugin-typescript-filenames

8.0.0 • Public • Published

eslint-plugin-typescript-filenames

Adds eslint rules to ensure consistent filenames for your javascript files.

Please note: This plugin will only lint the filenames of the .js, .jsx files you are linting with eslint. It will ignore other files that are not linted with eslint.

Enabling the plugin

This plugin requires a version of eslint>=5.x to be installed as a peer dependency.

Modify your .eslintrc file to load the plugin and enable the rules you want to use.

{
  "plugins": ["typescript-filenames"],
  "rules": {
    "typescript-filenames/no-js-extension": 2,
    "typescript-filenames/no-jsx-extension": 2
  }
}

Rules

Don't allow .js files (no-js-extensions)

When enabling this rule, the plugin will throw an error advising you to use .ts.

Don't allow .jsx files (no-jsx-extensions)

When enabling this rule, the plugin will throw an error advising you to use .tsx.

Package Sidebar

Install

npm i eslint-plugin-typescript-filenames

Weekly Downloads

1

Version

8.0.0

License

none

Unpacked Size

5.86 kB

Total Files

10

Last publish

Collaborators

  • dollarshaveclub-engineering