New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-react-frontend

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-react-frontend

Eslint configuration containing rule set for react, jest and typescript projects

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-react-config

Specific ESLint configuration for React projects based on Typescript. The setup is based on the guidelines provided by the official eslint documentation.

It applies the recommended rules from:

Configuration

1. Install ESLint

# npm
npm install eslint --save-dev
# yarn
yarn add eslint --save

2. Install eslint-plugin-react-config

# npm
npm install eslint-plugin-react-config --save-dev
# yarn
yarn add -D eslint-plugin-react-config 

3. Install required ESLint React specific plugins and configure

All configurations inherit from some base rules. Therefore, these plugins are always required.

# npm
npm install eslint-friendly-formatter \
            eslint-plugin-jest \
            eslint-plugin-ordered-imports \
            eslint-plugin-prettier \
            eslint-plugin-react \
            eslint-plugin-react-hooks \
            eslint-plugin-sort-destructure-keys \
            --save-dev
# yarn
yarn add eslint-friendly-formatter \
            eslint-plugin-jest \
            eslint-plugin-ordered-imports \
            eslint-plugin-prettier \
            eslint-plugin-react \
            eslint-plugin-react-hooks \
            eslint-plugin-sort-destructure-keys \
            --dev

To import configuration for react:

module.exports = {
  extends: ['eslint-config-react-config/react'],
};

To import configuration for jest:

module.exports = {
  extends: ['eslint-config-react-config/jest'],
};

To import configuration for typescript:

module.exports = {
  extends: ['eslint-config-react-config/typescript'],
};

4. Run ESLint

Run the following script:

# npm
npx eslint .
# yarn
yarn eslint .

ESLint will lint all relevant files within the current folder, and output results.

Most IDEs via a ESLint plugin will also give these results.

Publishing package

To update the ruleset and publish as a public npm package, first authenticate yourself via npm and then run:

npm run publish:public

The package should then be available for public installation and usage. Further information about publishing npm packages can be found here

Keywords

FAQs

Package last updated on 19 May 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc