Skip to content

Commit 1b51f3c

Browse files
Fix: Add linting, GitHub Actions, package meta
Package meta: - Corrected to non-production-ready version - Add Corbin's URL - npm update - move deps to to peers and non-dev (are these correct?) - engines and files properties - README.md shell
1 parent aec9b2f commit 1b51f3c

File tree

19 files changed

+2242
-1638
lines changed

19 files changed

+2242
-1638
lines changed

.eslintrc.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
module.exports = {
2+
"globals": {
3+
"$shouldNotMutate": "readonly",
4+
},
25
"plugins": [
36
"evelyn",
47
],
58
"extends": [
69
"plugin:evelyn/default",
7-
"plugin:evelyn/source",
810
"plugin:evelyn/node",
11+
"plugin:evelyn/source",
912
],
1013
"overrides": [
1114
{
12-
"files": [
13-
"lib/**/*.js",
14-
],
15-
"extends": [
16-
"plugin:evelyn/built",
17-
],
1815
"files": [
1916
"**/*.test.js",
2017
"**/__mocks__/**/*.js",
2118
"**/__tests__/**/*.js",
19+
"config/setup-after-env.js",
2220
],
2321
"extends": [
2422
"plugin:evelyn/jest",
2523
],
2624
},
25+
{
26+
"files": [
27+
"**/__fixtures__/**/*.js",
28+
],
29+
"rules": {
30+
"no-unused-vars": "off",
31+
},
32+
},
33+
],
34+
"ignorePatterns": [
35+
"src/foo.js",
36+
"notes.js",
37+
"**/__fixtures__/**/output.js",
2738
],
2839
};

.github/workflows/nodejs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: testing
2+
3+
on: push
4+
5+
jobs:
6+
testing:
7+
runs-on: ubuntu-latest
8+
env:
9+
CI: true
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use Node.js 10.0.0
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 10.0.0
16+
17+
# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
18+
- name: Cache node modules
19+
uses: actions/cache@v1
20+
env:
21+
cache-name: cache-node-modules
22+
with:
23+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
24+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
25+
restore-keys: |
26+
${{ runner.os }}-build-${{ env.cache-name }}-
27+
${{ runner.os }}-build-
28+
${{ runner.os }}-
29+
30+
- name: Install Dependencies
31+
run: npm ci
32+
- name: Lint
33+
run: npm run lint
34+
- name: Test
35+
run: npm test

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<div align="center">
2+
3+
# Will Mutate
4+
5+
**Runtime test to that detects mutations to objects**
6+
7+
[![npm version](https://badgen.net/npm/v/will-mutate?icon=npm)](https://www.npmjs.com/package/will-mutate)
8+
[![check status](https://badgen.net/github/checks/evelynhathaway/will-mutate/master?icon=github)](https://github.com/evelynhathaway/will-mutate/actions)
9+
[![license: MIT](https://badgen.net/badge/license/MIT/blue)](/LICENSE)
10+
11+
</div>
12+
13+
## Description
14+
15+
TODO
16+
17+
## Features
18+
19+
- TODO
20+
21+
## Installation
22+
23+
```bash
24+
npm install will-mutate @babel/core@^7.0.0 --save-dev
25+
```
26+
27+
## Usage
28+
29+
TODO
30+
31+
## License
32+
33+
Copyright Evelyn Hathaway and Corbin Crutchley, [MIT License](/LICENSE)

babel.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// babel.config.js
22
module.exports = {
3-
presets: [
4-
[
5-
'@babel/preset-env',
6-
{targets: {node: 'current'}}
7-
]
8-
],
9-
plugins: ['./plugin']
3+
presets: [
4+
[
5+
"@babel/preset-env",
6+
{targets: {node: "current"}},
7+
],
8+
],
9+
plugins: ["./plugin"],
1010
};

config/setup-after-env.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {toMatchFile} from "jest-file-snapshot";
2+
3+
expect.extend({toMatchFile});

config/setupAfterEnv.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)