🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

cordova-linter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-linter

Find common patterns in HTML, CSS, and JavaScript that are incompatible with Apache Cordova and PhoneGap

Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
21
110%
Maintainers
1
Weekly downloads
 
Created
Source

cordova-linter Build Status

Find common patterns in HTML, CSS, and JavaScript that are incompatible with Apache Cordova and PhoneGap.

The Plan

Point this node CLI tool at your PhoneGap www directory. It will parse:

  • HTML (using jsdom? cheerio? htmlparser2?)
  • JS (using Esprima? maybe delegate to ESLint with some plugins we write?)
  • CSS (using css-parse?)

It will report common issues such as:

  • Issue #6: HTML refs to local resources using absolute links where Cordova/PhoneGap requires relative links.
  • As above but for CSS URLs
  • As above but for resources loaded in JS
  • Find potentially problematic uses of load event when deviceReady is what is really needed.
  • Issue #1: Flag techniques used to trigger deviceReady in the browser for testing if they should be removed from a production build.
  • Detect CSS transitions that would benefit from hardware acceleration via the translate3d hack?
  • Detect use of click event handlers without FastClick loaded
  • Detect failure to load cordova.js
  • Detect loading of phonegap.js instead of cordova.js
  • What else?

Getting Started

Install the tool with: npm install -g cordova-linter

Documentation

(Coming soon)

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 Rich Trott Licensed under the Apache 2.0 license.

FAQs

Package last updated on 14 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts