Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coffeelint-use-strict

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffeelint-use-strict - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

changelog.md

32

index.js

@@ -0,1 +1,2 @@

// Generated by CoffeeScript 1.10.0
'use strict';

@@ -39,6 +40,5 @@ var UseStrictRule, isUseStrictValue, useStrictAtTopOf;

UseStrictRule.prototype.lintAST = function(node, astApi) {
var allowGlobal, createError, firstChild, requireGlobal, useStrict, _ref,
_this = this;
var allowGlobal, createError, firstChild, ref, requireGlobal, useStrict;
createError = astApi.createError;
_ref = astApi.config[this.rule.name], requireGlobal = _ref.requireGlobal, allowGlobal = _ref.allowGlobal;
ref = astApi.config[this.rule.name], requireGlobal = ref.requireGlobal, allowGlobal = ref.allowGlobal;
firstChild = null;

@@ -67,15 +67,17 @@ if (node.isEmpty()) {

}
node.traverseChildren(false, function(child) {
var useStr;
useStr = null;
if (child.constructor.name === 'Code') {
useStr = useStrictAtTopOf(child.body);
if (!useStr.boolean) {
_this.errors.push(createError({
lineNumber: useStr.firstChild.locationData.first_line + 1
}));
node.traverseChildren(false, (function(_this) {
return function(child) {
var useStr;
useStr = null;
if (child.constructor.name === 'Code') {
useStr = useStrictAtTopOf(child.body);
if (!useStr.boolean) {
_this.errors.push(createError({
lineNumber: useStr.firstChild.locationData.first_line + 1
}));
}
}
}
return true;
});
return true;
};
})(this));
return void 0;

@@ -82,0 +84,0 @@ };

{
"name": "coffeelint-use-strict",
"version": "0.0.1",
"version": "1.0.0",
"description": "A CoffeeLint rule that enforces usage of strict mode",

@@ -30,22 +30,24 @@ "keywords": [

"scripts": {
"prepublish": "gulp coffee --require coffee-script",
"test": "coffeelint gulpfile.coffee index.coffee test -f ./coffeelint.json && istanbul test _mocha --report lcovonly -- ./test/*.coffee --require coffee-script --reporter spec",
"prepublish": "npm run-script coffee",
"coffee": "coffee -c -b -o ./ index.coffee",
"test": "coffeelint gulpfile.coffee index.coffee test -f ./coffeelint.json && istanbul test _mocha --report lcovonly -- ./test/*.coffee --require coffee-script/register --reporter spec",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"screenshot": "coffeelint index.coffee"
"screenshot": "coffeelint index.coffee",
"changelog": "conventional-changelog -p angular -i changelog.md -w"
},
"devDependencies": {
"coffee-script": "~1.6.3",
"coffeelint": "~1.0.2",
"mocha": "~1.17.0",
"gulp-util": "~2.2.12",
"istanbul": "~0.2.3",
"should": "~3.0.1",
"coveralls": "~2.6.1",
"gulp": "~3.4.0",
"gulp-coffee": "~1.2.2",
"gulp-clean": "~0.2.2",
"gulp-coffeelint": "~0.1.2",
"conventional-changelog": "0.0.4"
"coffee-script": "^1.10.0",
"coffeelint": "^1.8.1",
"conventional-changelog": "^0.4.3",
"coveralls": "^2.11.2",
"del": "^2.0.1",
"gulp-coffee": "^2.3.1",
"gulp-coffeelint": "^0.5.0",
"gulp-util": "^3.0.3",
"istanbul": "^0.3.6",
"mocha": "^2.1.0",
"should": "^7.1.0"
},
"engines": {
"npm": ">=1.3.7",
"node": ">=0.8.0"

@@ -52,0 +54,0 @@ },

@@ -10,6 +10,6 @@ # coffeelint-use-strict [![NPM version][npm-image]][npm-url]

First, install `coffeelint-use-strict` as a development dependency:
First, install `coffeelint-use-strict` globally:
```shell
npm install --save-dev coffeelint-use-strict
npm install -g coffeelint-use-strict
```

@@ -52,2 +52,8 @@

## 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 [gulp][gulp] and [npm-test](https://npmjs.org/doc/test.html). Plus, make sure to adhere to these [commit message conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w).
## Development
If you wanna use `gulp` and the tasks in `gulpfile.coffee`, please run `npm i gulp` manually. `gulp` is not included as a devDependency, since it cannot be installed on `node v0.8` and we want to be able to install and test this package on TravisCI on `node v0.8`.
## License

@@ -57,2 +63,4 @@

[gulp]: http://gulpjs.com/
[coffeelint]: http://www.coffeelint.org

@@ -63,14 +71,14 @@ [coffeelint-api-doc]: http://www.coffeelint.org/#api

[npm-url]: https://npmjs.org/package/coffeelint-use-strict
[npm-image]: https://badge.fury.io/js/coffeelint-use-strict.png
[npm-image]: http://img.shields.io/npm/v/coffeelint-use-strict.svg
[travis-url]: http://travis-ci.org/janraasch/coffeelint-use-strict
[travis-image]: https://secure.travis-ci.org/janraasch/coffeelint-use-strict.png?branch=master
[travis-image]: https://secure.travis-ci.org/janraasch/coffeelint-use-strict.svg?branch=master
[coveralls-url]: https://coveralls.io/r/janraasch/coffeelint-use-strict
[coveralls-image]: https://coveralls.io/repos/janraasch/coffeelint-use-strict/badge.png
[coveralls-image]: https://coveralls.io/repos/janraasch/coffeelint-use-strict/badge.svg
[depstat-url]: https://david-dm.org/janraasch/coffeelint-use-strict
[depstat-image]: https://david-dm.org/janraasch/coffeelint-use-strict.png
[depstat-image]: https://david-dm.org/janraasch/coffeelint-use-strict.svg
[devdepstat-url]: https://david-dm.org/janraasch/coffeelint-use-strict#info=devDependencies
[devdepstat-image]: https://david-dm.org/janraasch/coffeelint-use-strict/dev-status.png
[devdepstat-image]: https://david-dm.org/janraasch/coffeelint-use-strict/dev-status.svg
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc