Socket
Socket
Sign inDemoInstall

eslint-plugin-react-filenames

Package Overview
Dependencies
153
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-react-filenames

React filename specific linting rules for ESLint


Version published
Weekly downloads
1.4K
increased by12.66%
Maintainers
1
Install size
253 kB
Created
Weekly downloads
 

Readme

Source

eslint-plugin-react-filenames

Enforce naming conventions in React projects.

Installation

Install ESLint either locally or globally.

$ npm install eslint

If you installed ESLint globally, you have to install React plugin globally too. Otherwise, install it locally.

$ npm install eslint-plugin-react-filenames

Configuration

Add plugins section and specify ESLint-plugin-React as a plugin.

{
  "plugins": [
    "react-filenames"
  ]
}

You can also specify some settings that will be shared across all the plugin rules.

{
  "settings": {
    "react": {
      "createClass": "createClass", // Regex for Component Factory to use, default to "createClass"
      "pragma": "React",  // Pragma to use, default to "React"
      "version": "15.0" // React version, default to the latest React stable release
    }
  }
}

With ESLint 2.x.x or 3.x.x:

{
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    }
  }
}

Finally, enable all of the rules that you would like to use. Use our preset to get reasonable defaults quickly, and/or choose your own:

  "rules": {
    "react-filenames/filename-matches-component": "error"
  }

List of supported rules

License

This is based on ESLint-plugin-React, so it's also licensed under the MIT License.

Keywords

FAQs

Last updated on 29 Nov 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc