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

eslint-rules-summer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-rules-summer

The never ending summer rules of lint.

2.0.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-rules-summer

The never ending summer rules of lint.

Rules list

  • eslint-rules-summer

no-eqeqeq-null-undefined

Do not compare null or undefined with strict equality(===) | strict inequality(!==)

👍

var a = 1
if(a == null) { // something }
if(a != null) { // something }
if(null == a) { // something }
if(null != a) { // something }
if(a == undefined) { // something }
if(a != undefined) { // something }
if(undefined == a) { // something }
if(undefined != a) { // something }

🙅‍♂️

var a = 1
if(a === null) { // something }
if(a !== null) { // something }
if(null === a) { // something }
if(null !== a) { // something }
if(a === undefined) { // something }
if(a !== undefined) { // something }
if(undefined === a) { // something }
if(undefined !== a) { // something }

no-let

Do not use let variable declaration. Use const instead.

👍

const a = 0
const a = 0,
  b = 1

var a
var a = 0
var a = 0,
  b = 1

export const a = 0
export var a = 0

🙅‍♂️

let a = 0;
let a = 0,
    b = 1;

export let = 1;

no-plain-new-date

Do not use new Date() (empty arguments) | Date.now() . Date generation that depends on the execution environment is prohibited.

👍

new Date(2020, 4, 3)
new Date('2020-05-03T03:24:00')

🙅‍♂️

new Date()
Date.now()

For developer

This module is a single rules module, so normally you don't have to consciously install.

If you are developer and want to use this rules module, you can install with the following command.

npm

$ npm install --save-dev eslint-rules-summer

yarn

$ yarn add -D eslint-rules-summer

FAQs

Package last updated on 20 May 2020

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