npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@quintaaa/eslint-plugin-starlims

v1.3.1

Published

Eslint plugin to parse and lint starlims form code successfully

Downloads

107

Readme

Starlims ESLint Plugin

This plugin provides custom rules for Starlims.

How to use

Installation

  • Create a new project with npm init in the root folder of your Starlims project
  • Install ESLint and the plugin with npm: npm install eslint @quintaaa/eslint-plugin-starlims --save-dev
  • Create a new file named eslint.config.js in the root folder of your Starlims project
  • Add the following content to the file:
const starlims = require('@quintaaa/eslint-plugin-starlims');

module.exports = [
  starlims.configs.recommended,
  {
    rules: {
      // Here is an example of the rules I use
      'prefer-const': 'warn',
      'no-var': 'warn',
      'no-else-return': 'warn',
      'no-mixed-spaces-and-tabs': 'off',

      // Add your own rules here
      // ...

      // To edit the plugin default rules, use the following syntax
      // The list of rules can be found in in the readme file of the plugin
      'starlims/no-synchronous-requests': 'warn',
    },
  },
];

You can customize your ESLint configuration as you wish. For more information, please refer to the ESLint documentation.

You should now be able to use the plugin in your Starlims project.

Usage

Use the following command to lint your Starlims project:

npx eslint .

You can also install the ESLint extension for Visual Studio Code to get real-time linting. ESLint extension for Visual Studio Code

List of customizations

  • Do not create parsing errors for #include statements
  • Do not report undefined variables for client script functions starting with cs (e.g. csLoadCrossTab)
  • Do not report defined but unused variables for event handlers functions (e.g. Form1_OnLoad, Form1_OnClose, dataGrid1_OnRowChange, btnOk_OnClick)
  • Allow usage of common Starlims global variables such as:
    • form
    • lims
    • Shell
    • Starlims
    • Dialogs
    • and more...
  • Rules
    • starlims/no-synchronous-requests --> Reports the usage of functions that are UI blocking and should be avoided (e.g. lims.CallServer, lims.GetDataSet)
    • starlims/check-server-functions --> Checks the syntax of server functions such as lims.CallServer and lims.GetDataSet etc. Also check the syntax of #include statements
    • starlims/check-unconverted-functions --> Reports the usage of XFD functions that haven't been converted to html (e.g. lims.AAdd, Convert.ToInt32)
    • starlims/requests-in-loop --> Reports the usage of requests in loops (e.g. for, while, do...while, foreach etc.)
    • starlims/no-ambiguous-vars --> Reports the usage of ambiguous variables (e.g. navigator instead of Starlims.navigator or window.navigator)
    • starlims/remove-debugger --> Reports the usage of debugger statements and removes them on autofix

Contributing

Any contributions are welcome. Please follow the steps below to contribute:

  • Fork the repository
  • Create a new branch
  • Make your changes
  • Create a pull request

If you have any questions or suggestions, please contact me at [email protected] or create an issue.