Skip to content

Commit

Permalink
Fix: Add linting, GitHub Actions, package meta
Browse files Browse the repository at this point in the history
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
  • Loading branch information
evelynhathaway committed May 12, 2020
1 parent aec9b2f commit 1b51f3c
Show file tree
Hide file tree
Showing 19 changed files with 2,242 additions and 1,638 deletions.
25 changes: 18 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
module.exports = {
"globals": {
"$shouldNotMutate": "readonly",
},
"plugins": [
"evelyn",
],
"extends": [
"plugin:evelyn/default",
"plugin:evelyn/source",
"plugin:evelyn/node",
"plugin:evelyn/source",
],
"overrides": [
{
"files": [
"lib/**/*.js",
],
"extends": [
"plugin:evelyn/built",
],
"files": [
"**/*.test.js",
"**/__mocks__/**/*.js",
"**/__tests__/**/*.js",
"config/setup-after-env.js",
],
"extends": [
"plugin:evelyn/jest",
],
},
{
"files": [
"**/__fixtures__/**/*.js",
],
"rules": {
"no-unused-vars": "off",
},
},
],
"ignorePatterns": [
"src/foo.js",
"notes.js",
"**/__fixtures__/**/output.js",
],
};
35 changes: 35 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: testing

on: push

jobs:
testing:
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10.0.0
uses: actions/setup-node@v1
with:
node-version: 10.0.0

# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div align="center">

# Will Mutate

**Runtime test to that detects mutations to objects**

[![npm version](https://badgen.net/npm/v/will-mutate?icon=npm)](https://www.npmjs.com/package/will-mutate)
[![check status](https://badgen.net/github/checks/evelynhathaway/will-mutate/master?icon=github)](https://github.com/evelynhathaway/will-mutate/actions)
[![license: MIT](https://badgen.net/badge/license/MIT/blue)](/LICENSE)

</div>

## Description

TODO

## Features

- TODO

## Installation

```bash
npm install will-mutate @babel/core@^7.0.0 --save-dev
```

## Usage

TODO

## License

Copyright Evelyn Hathaway and Corbin Crutchley, [MIT License](/LICENSE)
14 changes: 7 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// babel.config.js
module.exports = {
presets: [
[
'@babel/preset-env',
{targets: {node: 'current'}}
]
],
plugins: ['./plugin']
presets: [
[
"@babel/preset-env",
{targets: {node: "current"}},
],
],
plugins: ["./plugin"],
};
3 changes: 3 additions & 0 deletions config/setup-after-env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {toMatchFile} from "jest-file-snapshot";

expect.extend({toMatchFile});
3 changes: 0 additions & 3 deletions config/setupAfterEnv.js

This file was deleted.

Loading

0 comments on commit 1b51f3c

Please sign in to comment.