Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Latest commit

 

History

History
36 lines (21 loc) · 811 Bytes

no-session.md

File metadata and controls

36 lines (21 loc) · 811 Bytes

Prevent usage of Session (no-session)

This rule prevents any usage of Session. Session variables live in a global namespace, which is bad practice. reactive-dict should be used instead.

Rule Details

This rule enforces a style without Session.

The following patterns are considered warnings:

Session.set('foo')
Session.get('foo')
Session.all()
Session.clear()

The following patterns are not warnings:

Session = true
console.log(Session)

When Not To Use It

If you are working on a project using few globals then you can disable this rule.

Further Reading