New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@mkvlrn/eslint-config-javascript-react

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@mkvlrn/eslint-config-javascript-react

Eslint configurations for react JavaScript projects based on airbnb's guide

unpublished
latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@mkvlrn/eslint-config-javascript-react

publish

what

this package mainly extends airbnb's excellent guide, disabling a few rules in order to accommodate the projects i usually create

also includes a default jest config

why

convenience - not having to juggle packages left and right before using eslint is a far away dream, but we can hack it today

install

install package and peerDependencies with a shortcut

install-peerdeps will install all peer dependencies as dev dependencies if needed

# install-peerdeps using yarn
npx install-peerdeps @mkvlrn/eslint-config-javascript-react -Y -D

# install-peerdeps using npm
npx install-peerdeps @mkvlrn/eslint-config-javascript-react -D

install everything manually

yarn add @mkvlrn/eslint-config-javascript-react \
         @babel/core \
         @babel/eslint-parser \
         @babel/preset-env \
         eslint \
         eslint-config-airbnb \
         eslint-config-prettier \
         eslint-plugin-import \
         eslint-plugin-jest \
         eslint-plugin-jsx-a11y \
         eslint-plugin-react \
         eslint-plugin-react-hooks -D

usage

// .eslintrc.json, .eslintrc
// this extends the default config
{
  "extends": ["@mkvlrn/eslint-config-javascript-react"]
}

disabled rules

no-underscore-dangle

this rule just makes it awkward to deal with mongodb models (which have a _id field by default)

import/prefer-default-export

this rule spoils tree-shaking (in some projects) and marks the exporting of cloud functions that require a named export as incorrect

react/jsx-uses-react & react/react-in-jsx-scope

react's new jsx transform doesn't expect React to be in scope when using jsx, and these rules expect it to be imported

Keywords

eslint

FAQs

Package last updated on 12 Jan 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