Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dhmk/eslint-plugin-atom

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhmk/eslint-plugin-atom

Eslint plugin for @dhmk/atom

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Eslint plugin for linting @dhmk/atom.

Right now, it has one rule which detects missing (). This mostly happens while checking some conditions or accessing .length property on array atom.

Some examples:

const a = atom(true);

// should be a()
if (a) console.log("true");

const b = atom([1, 2, 3]);

// should be b().length
// since functions also have .length property, typescript won't detect an error
console.log("array length: ", b.length);

Install

npm install -D @typescript-eslint/parser @dhmk/eslint-plugin-atom

Next, activate it in your .eslintrc.js file:

module.exports = {
  root: true,
  parser: "@typescript-eslint/parser",
  parserOptions: {
    tsconfigRootDir: __dirname,
    project: "tsconfig.json",
  },
  plugins: ["@dmhk/atom"],
  rules: {
    "@dhmk/atom/missing-call": "warn",
  },
};

See typescript-eslint docs for more help.

Keywords

FAQs

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