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-config-prodest-angular

v1.0.2

Published

Configurações ESLint para projetos AngularJs do PRODEST

Downloads

6

Readme

eslint-config-prodest-angular

Configurações ESLint para projetos AngularJS do PRODEST

Garante que o código adere ao coding style para aplicações AngularJS do PRODEST, realizando o linting do código usando ESLint.

Coding Style: eslint-plugin-angular + customizações

eslint-config-prodest-angular é um arquivo de configuração reaproveitável para as regras definidas em eslint-plugin-angular, criando assim um estilo de codificação para aplicações AngularJS no PRODEST.

Dependências

Depende de eslint-plugin-angular

Instalação

npm i --save-dev eslint-config-prodest-angular

Também é preciso instalar eslint-plugin-angular.

Uso

Em seu arquivo .eslintrc:

{
  "extends": "prodest-angular"
}

Pode ser usado em conjunção com eslint-config-prodest da seguinte maneira:

{
  "extends": ["prodest","prodest-angular"]
}

Esse arquivo de configuração faz 2 coisas:

Regras

Customiza as regras que o eslint-plugin-angular provêm, da seguinte maneira:

rules: {
        "angular/angularelement": 1,
        "angular/controller-as": 2,
        "angular/controller-as-route": 2,
        "angular/controller-as-vm": [2, "vm"],
        "angular/controller-name": [2, "/[a-z].*Controller$/"],
        "angular/deferred": 2, 
        "angular/definedundefined": 2,
        "angular/di": [2,"$inject"],
        "angular/di-order": [0, true],
        "angular/directive-name": 0,
        "angular/component-limit": [1, 1],
        "angular/document-service": 2,
        "angular/empty-controller": 0,
        "angular/file-name": 0,
        "angular/filter-name": 0,
        "angular/foreach": 0,
        "angular/function-type": [2, "named"],
        "angular/interval-service": 2,
        "angular/json-functions": 2,
        "angular/log": 2,
        "angular/module-getter": 2,
        "angular/module-name": 0,
        "angular/module-setter": 2,
        "angular/no-angular-mock": 0,
        "angular/no-controller": 0,
        "angular/no-cookiestore": 2,
        "angular/no-jquery-angularelement": 2,
        "angular/no-private-call": 2,
        "angular/no-service-method": 1,
        "angular/no-services": [2, ["$http", "$resource", "Restangular"]],
        "angular/on-watch": 2,
        "angular/rest-service": 0,
        "angular/service-name": 2,
        "angular/timeout-service": 2,
        "angular/typecheck-array": 2,
        "angular/typecheck-date": 2,
        "angular/typecheck-function": 2,
        "angular/typecheck-number": 2,
        "angular/typecheck-object": 2,
        "angular/typecheck-string": 2,
        "angular/watchers-execution": [0, "$digest"],
        "angular/window-service": 2,
        "no-use-before-define": 0
    }

Overrides

Você pode facilmente sobrescrever regras de eslint-config-prodest-angular em seu próprio arquivo .eslintrc. Por exemplo, para nomes dos controllers começando com letra maiúscula, use:

rules: {
   "angular/controller-name": [2, "/[A-Z].*Controller$/"],
}