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

elm-analyse

v0.16.5

Published

A tool that allows you analyse your Elm code and identifies deficiencies and best practices.

Downloads

5,374

Readme

Elm Analyse

A tool that allows you to analyse your Elm code, identify deficiencies and apply best practices.

Preview


Usage

Prerequisites

The following binaries should be available on the path:

node >=8
elm  0.19.x
elm-format (a version that is compatible with the source code you wish to analyse)

Install

npm install -g elm-analyse

or if using yarn:

yarn global add elm-analyse

Run

Change to the directory of Elm project you want to analyse and run elm-analyse.

Add the -s option for server mode. This will allow you to view results in your browser. To change the port use -p XXXX

CLI Options

| Option | Description | | ------ | ----------- | | --help or -h | Print the help output. | | --serve or -s | Enable server mode. Disabled by default. | | --port or -p | The port on which the server should listen. Defaults to 3000 (--port=3000). | | --open or -o | Open default browser when server goes live. | | --elm-format-path | Path to elm-format. Defaults to elm-format. | | --version or -v | Print version of software. | | --format | Output format for CLI. Defaults to "human". Valid values are either "human" or "json". |


Supported Checks

All supported checks can be found in the check documentation.


Analysis Configuration

Checks can be enable or configured based on your preferences. For this see the Configuration Docs.


Issues

If you have feature ideas or checks that you wish to see, please create an issue. Please check that you do not create duplicate issues or a check for which we already have a report.

Contributing

Please see the docs

Library Setup

The library is divided into the following main modules:

  • Analyser: The main file that bootstraps the analysis and maintains the core state.
  • ASTUtil.*: Utility functions for fact extraction on the AST.
  • Analyser.Checks.*: All the checks that are performed.
  • Analyser.Fixes.*: All the fixes that can be performed.
  • Analyser.Messages.*: All messages that can be produced and the supporting functions.
  • Client.*: Front-end code for running in 'server' mode.

The code that represents the Elm syntax and the parsing is supported by the elm-syntax package.