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

taqtile-dangerjs-plugin

v0.0.4

Published

Taqtile Danger-js Plugin

Downloads

4

Readme

taqtile-dangerjs-plugin

Build Status npm version semantic-release Code Climate

Taqtile Danger-js Plugin

Environment

  • Use correct node version (from .nvmrc file)
$ nvm use

(If any error is found, install correct node versio via $ nvm install)

  • Install correct yarn version
$ npm install -g yarn@`node -pe "require('./package.json').engines.yarn"`

Install dependencies

$ yarn install

Adding new rules

Add your rules to src/rules folder and its respective tests.

When adding new rules, please follow current scope files for pr, nodejs, android, etc or create a new one in case your rule does not fit in any of the existing ones.

Also, check Danger's guide on Phrasing to understand how to better use error messages to provide an impartial but polite feedback.

What is currently being checked

PR

  • [x] Fail when no description is provided
  • [x] Warns if description provided is too short
  • [x] Big PRs

Platform/Language agnostic

  • [x] >>> Strings to make sure rebase was successful
  • [x] Warn when Dangerfile was modified
  • [x] Warn when http:// is used
  • [x] Warn when definition files were changes but their lockfile weren't:
    • Gemfile vs Gemfile.lock
    • package.json vs yarn.lock
  • [x] Warn if some files/folders were changed/committed:
    • Dangerfile
    • .gitignore
    • Gemfile
    • Gemfile.lock
    • .travis.yml
    • coverage

Node

  • [x] Warn when npm install -g is used
  • [x] Warn when console.log is added
  • [ ] Warn when package.json was modified and yarn.lock or shrinkwrap was not
  • [x] Warn if node version is different between .travis.yml, .nvmrc, package.json and README (or just warn if node version has change just in one of these locations)
  • [x] At packages.json every package should have its version fixed (do not use ^ or ~), or explicitly set the major and minor versions (ie.: 1.2.x)
  • [ ] [TypeScript] Warn if using <any> as return type.
  • [x] Warn if some files/folders were changed/committed:
    • npm-debug.log
    • yarn-error.log
    • docker-compose.yml
    • tslint.json
    • tsconfig.json
    • .nvmrc
    • Procfile
    • npm-shrinkwrap.json
    • .env
    • .env.test
    • .env.sample
    • env.coffee
    • nodemon.json

iOS

  • [x] Warn if some files/folders to be changed/committed like Cakefile, settings.yml.erb, Fastfile
  • [X] Warn when Podfile was modified and Podfile.lock was not
  • [x] Warn when ATS Exception is set in plist
  • [x] Warn when Landscape orientation is set in plist
  • [x] Warn when pod is being loaded from external git repos
  • [x] Warn if Podfile has pods should not using fixed versions
  • [ ] [Swift] Warn if forced unwrapping was found

Android

  • [x] Warn if there are hardcoded dimens different from 0dp on .xml files
  • [x] Warn if there are hardcoded colors on .xml files
  • [ ] Warn if there are hardcoded texts on .xml files
  • [ ] [Kotlin] Error when !! is found (similar to swift forced unwrap when anything! is found)
  • [ ] [Kotlin] Warn if using Any or Any? as return type
  • [x] [Kotlin] Warn if ButterKnife or findViewById are found
  • [ ] Warn if some files/folders were changed/committed:
    • Manifest.xml
    • .gradle

Web

  • [x] Warn if CSS files were changed

Nice to have

  • [ ] (Platform/Language agnostic) Warn when Amazon Secret Key is hardcoded
  • [ ] (iOS) Warn if changes made in Cakefile may 'break' provisionings and sign certificates configurations
  • [ ] (iOS) Warn when Facebook ID is hardcoded in plist
  • [ ] (iOS) Warn when TODO is added
  • [ ] (iOS) Warn when print(“”) is added
  • [ ] (iOS) Warn when fatalError is added
  • [ ] (iOS) Warn if hardcoded font is used in .xib
  • [ ] (iOS) Warn if hardcoded color is used in .xib

Usage

For danger-js

Install:

yarn add taqtile-dangerjs-plugin --dev

At a glance:

// dangerfile.js
import { schedule } from 'danger'
import taqtileDangerjsPlugin from 'taqtile-dangerjs-plugin'

schedule(async() => {
  await taqtileDangerjsPlugin();
})

For peril

Install:

yarn add taqtile-dangerjs-plugin --dev

Add plugin module to json settings:

"settings": {
  "modules": ["taqtile-dangerjs-plugin"]
},

Use it in any peril dangerfile

// dangerfile.js
import { schedule } from 'danger'
import taqtileDangerjsPlugin from 'taqtile-dangerjs-plugin'

schedule(async() => {
  await taqtileDangerjsPlugin();
})

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.