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

tslint-immutable

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-immutable - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

.nyc_output/030a0c376c33a08e9af1bf8f5b5c793a.json

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## [2.1.1] - 2017-03-29
### Fixed
- Remove vestigial `noMutationRule.js` and `no-mutation` example from README, thanks to @pmlamotte. (see #6)
## [2.1.0] - 2016-12-12

@@ -9,0 +13,0 @@ ### Added

30

package.json
{
"name": "tslint-immutable",
"version": "2.1.0",
"version": "2.1.1",
"description": "TSLint rules to disable mutation in TypeScript.",
"main": "index.js",
"scripts": {
"test": "yarn run tsc && mocha tests/*.ts --require ts-node/register",
"tsc": "tsc",
"build": "tsc -p tsconfig.prod.json",
"publish:major": "npm run build && node scripts/publish.js major",
"publish:minor": "npm run build && node scripts/publish.js minor",
"publish:patch": "npm run build && node scripts/publish.js patch"
},
"repository": {

@@ -30,11 +22,25 @@ "type": "git",

"@types/chai": "^3.4.34",
"@types/mocha": "^2.2.33",
"@types/mocha": "^2.2.40",
"@types/node": "^6.0.46",
"chai": "^3.5.0",
"mocha": "^2.4.5",
"codecov": "^2.1.0",
"mocha": "^3.2.0",
"nyc": "^10.2.0",
"shelljs": "^0.7.5",
"ts-node": "^1.7.2",
"tslint": "^4.0.2",
"typescript": "^2.0.6"
},
"scripts": {
"tsc": "tsc",
"build": "tsc -p tsconfig.prod.json",
"test:unit": "rm -rf js_out_test && yarn run tsc && mocha --compilers ts:ts-node/register \"tests/**/*.ts\"",
"test": "nyc --include src/**/*.ts -e '.ts' --r html -r lcov -r text yarn test:unit",
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"publish:major": "npm run build && node scripts/publish.js major",
"publish:minor": "npm run build && node scripts/publish.js minor",
"publish:patch": "npm run build && node scripts/publish.js patch"
},
"dependencies": {
"ts-node": "^3.0.2"
}
}
# tslint-immutable
[![npm version][version-image]][version-url]
[![travis build][travis-image]][travis-url]
[![codecov coverage][codecov-image]][codecov-url]
[![MIT license][license-image]][license-url]
[TSLint](https://palantir.github.io/tslint/) rules to disable mutation in TypeScript.

@@ -9,3 +14,3 @@

In some projects it is important to not mutatable any data, for example when using Redux to store state in a React application. Moreover immutable data structures has a lot of advantages in general so I want to use them everywhere in my applications.
In some applications it is important to not mutate any data, for example when using Redux to store state in a React application. Moreover immutable data structures has a lot of advantages in general so I want to use them everywhere in my applications.

@@ -24,3 +29,3 @@ I originally used [immutablejs](https://github.com/facebook/immutable-js/) for this purpose. It is a really nice library but I found it had some drawbacks. Specifically when debugging it was hard to see the structure, creating JSON was not straightforward, and passing parameters to other libraries required converting to regular mutable arrays and objects. The [seamless-immutable](https://github.com/rtfeldman/seamless-immutable) project seems to have the same conclusions and they use regular objects and arrays and check for immutability at run-time. This solves all the aformentioned drawbacks but introduces a new drawback of only being enforced at run-time. (Altough you loose the structural sharing feature of immutablejs with this solution so you would have to consider if that is something you need).

In addition to immutable rules this project also contains a few rules for enforcing a functional style and a few other rules. The following rules are available:
In addition to immutable rules this project also contains a few rules for enforcing a functional style of programming and a few other rules. The following rules are available:

@@ -195,3 +200,2 @@ ### Immutability rules

"no-this": true,
"no-mutation": true,
"no-expression-statement": true,

@@ -206,1 +210,10 @@ "no-var-keyword": true

This work was originally inspired by [eslint-plugin-immutable](https://github.com/jhusain/eslint-plugin-immutable).
[version-image]: https://img.shields.io/npm/v/tslint-immutable.svg?style=flat
[version-url]: https://www.npmjs.com/package/tslint-immutable
[travis-image]: https://travis-ci.org/jonaskello/tslint-immutable.svg?branch=master&style=flat
[travis-url]: https://travis-ci.org/jonaskello/tslint-immutable
[codecov-image]: https://img.shields.io/codecov/c/github/jonaskello/tslint-immutable/master.svg?style=flat
[codecov-url]: https://codecov.io/gh/jonaskello/tslint-immutable/branch/master
[license-image]: https://img.shields.io/github/license/jonaskello/tslint-immutable.svg?style=flat
[license-url]: https://opensource.org/licenses/MIT

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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