# criptext-js-tools

> JS tools used by Criptext

Latest version **0.7.2** (published 2018-10-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install criptext-js-tools
pnpm add criptext-js-tools
yarn add criptext-js-tools
bun add criptext-js-tools
```

Provides the command `criptext-js-tools`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.7.2 |
| Published | 2018-10-12 |
| First published | 2017-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gabriel Aumala |
| Maintainers | gaumala |

## Links

- npm: https://www.npmjs.com/package/criptext-js-tools
- npm.io page: https://npm.io/package/criptext-js-tools

## Dependencies (11)

- [glob](https://npm.io/package/glob.md) ^7.1.2
- [jest](https://npm.io/package/jest.md) ^23.6.0
- [yargs](https://npm.io/package/yargs.md) ^10.0.3
- [eslint](https://npm.io/package/eslint.md) 5.6.0
- [prettier](https://npm.io/package/prettier.md) 1.14.3
- [babel-jest](https://npm.io/package/babel-jest.md) ^21.2.0
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^8.0.2
- [merge-stream](https://npm.io/package/merge-stream.md) ^1.0.1
- [eslint-plugin-fp](https://npm.io/package/eslint-plugin-fp.md) ^2.3.0
- [eslint-plugin-jest](https://npm.io/package/eslint-plugin-jest.md) ^21.24.1
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.5.1

## Recent versions

- 0.7.2 (latest) — 2018-10-12
- 0.7.0 (0.7.0-rc1) — 2018-10-02
- 0.6.1 (beta) — 2018-03-07
- 0.7.1 — 2018-10-03
- 0.7.1-rc2 — 2018-10-03
- 0.7.1-rc1 — 2018-10-03
- 0.6.0 — 2018-03-07
- 0.5.0 — 2018-01-17
- 0.4.0 — 2018-01-11
- 0.3.0 — 2017-12-07
- 0.2.0 — 2017-11-29
- 0.1.1 — 2017-11-23

## README

# Criptext JS Tools

Lint and format JS code with zero configuration.

## Install

```
yarn add --dev criptext-js-tools
```

Then add these lines to your `package.json`:

``` diff
  "scripts": {
+    "lint": "criptext-js-tools lint",
+    "test": "criptext-js-tools test"
  },
```

## Scripts

### Lint

This will format your js files with [prettier](https://github.com/prettier/prettier), and then check them with [eslint](https://github.com/eslint/eslint). Only files inside `src` will be processed. On a CI environment, no files are modified, instead, when unformatted files are found, an error detailing the filepaths is thrown. 

The rules used depend on your project. If your project lists 'react-dom' as a dependency, it is considered a 'frontend' project and [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react)'s recommended rules are added.

The rules included, are **very opinionated** and encourage a more functional style. We do acknowledge that sometimes this is not possible or optimal. In such cases you can disable rules for specific lines like this:

``` javascript
  // eslint-disable-next-line fp/no-mutation
  values[key] = value;
```

### Test

This will look for unit test files and runs them in parallel with [Jest](https://facebook.github.io/jest/). The pattern used to match test files is Jest's default:

>  By default it looks for .js and .jsx files inside of __tests__ folders, as well as any files with a suffix of .test or .spec (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.

 Any command line arguments that you pass to this script will be directly forwarded to Jest.

### Integration

This also runs tests with Jest, but it uses a different pattern for matching tests and runs them sequentially (using `--runInBand`). This script matches any file that ends in `.integration.js`. Without parallelization the test suite is slower but it is useful for testing how well your program integrates with stateful external elements like databases.

---
_Source: https://npm.io/package/criptext-js-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
