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

eslint-plugin-netguru-ember

v1.6.6

Published

Eslint plugin for Netguru Ember Style Guide

Downloads

36

Readme

eslint-plugin-netguru-ember

NPM version NPM downloads Circle CI

ESlint plugin that provides set of rules for Ember Applications based on Netguru's Ember Styleguide.

Summary

It's made to help you keep good practices mentioned in our Ember Styleguide.

Requirements

You need to have ember-cli-eslint installed in your app. More info here.

Usage

With shareable config

The easiest way to use this plugin is through our shareable config. More about shareable configs here.

1. Install all dependencies by simply pasting code below in your terminal

(
  export PKG=eslint-config-netguru-ember;
  npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG"
)

This command will basically produce and call something like this:

npm install --save-dev eslint-config-netguru-ember [email protected] eslint-config-airbnb-base@^7.1.0 eslint-plugin-import@^1.15.0
2. Change your .eslintrc, so it looks like this:
    extends: netguru-ember

Without shareable config (only plugin)

1. Install plugin:
  npm install --save-dev eslint-plugin-netguru-ember
2. Add plugin to your .eslintrc:
  plugins:
    - netguru-ember
3. Configure rules in your .eslintrc:
  rules:
  - netguru-ember/local-modules: 1

All rules from our plugin have to be prefixed with netguru-ember/

Rules

  • General

    • local-modules - Create local version of Ember.* and DS.* (more)
    • no-observers - Don't use observers (more)
    • no-side-effect - Don't introduce side-effects in computed properties (more)
    • jquery-ember-run - Don’t use jQuery without Ember Run Loop (more)
    • named-functions-in-promises - Use named functions defined on objects to handle promises (more)
    • no-function-prototype-extensions - Don't use Ember's function prototype extensions (more)
    • use-ember-get-and-set - Use Ember get/set (more)
    • use-brace-expansion - Use brace expansion (more)
  • Organizing

    • order-in-components - Organize your components (more)
    • order-in-models - Organize your models (more)
    • order-in-routes - Organize your routes (more)
    • order-in-controllers - Organize your controllers (more)
  • Controllers

    • alias-model-in-controller - Alias your model (more)
    • query-params-on-top - Query params should always be on top (more)
  • Ember Data

    • no-empty-attrs - Be explicit with Ember data attribute types (more)
  • Components

    • closure-actions - Always use closure actions (more)

    • no-on-calls-in-components - Don't use .on() in components (more)

    • * avoid-leaking-state-in-components - Don't use objects and arrays as default properties (more)

      Example config:

      netguru-ember/avoid-leaking-state-in-components: [1, ['array', 'of', 'ignored', 'properties']]
  • Routing

    • routes-segments-snake-case - Route's dynamic segments should use snake case (more)

* Rule with optional settings

All Rules in JSON

    "netguru-ember/alias-model-in-controller": 0,
    "netguru-ember/avoid-leaking-state-in-components": 0,
    "netguru-ember/closure-actions": 0,
    "netguru-ember/jquery-ember-run": 0,
    "netguru-ember/local-modules": 0,
    "netguru-ember/named-functions-in-promises": 0,
    "netguru-ember/no-empty-attrs": 0,
    "netguru-ember/no-function-prototype-extensions": 0,
    "netguru-ember/no-observers": 0,
    "netguru-ember/no-on-calls-in-components": 0,
    "netguru-ember/no-side-effects": 0,
    "netguru-ember/order-in-components": 0,
    "netguru-ember/order-in-controllers": 0,
    "netguru-ember/order-in-models": 0,
    "netguru-ember/order-in-routes": 0,
    "netguru-ember/query-params-on-top": 0,
    "netguru-ember/routes-segments-snake-case": 0,
    "netguru-ember/use-brace-expansion": 0,
    "netguru-ember/use-ember-get-and-set": 0,

Contribution guide

TBD. For now feel free to add any suggestions in issues. Any involvement highly appreciated.