tslint-immutable
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -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 |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
168849
40
100
1425
216
1
10
+ Addedts-node@^3.0.2
+ Addedansi-styles@3.2.1(transitive)
+ Addedarrify@1.0.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addeddiff@3.5.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedts-node@3.3.0(transitive)
+ Addedtsconfig@6.0.0(transitive)
+ Addedv8flags@3.2.0(transitive)
+ Addedyn@2.0.0(transitive)