Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add linting, GitHub Actions, package meta #5

Merged
merged 4 commits into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.x
uses: actions/setup-node@v1
with:
node-version: 10.x

# 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