Skip to content

Commit

Permalink
Update according to Contributors library guidelines (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashoneyman committed Oct 4, 2020
1 parent d502bbb commit cbafe00
Show file tree
Hide file tree
Showing 18 changed files with 271 additions and 166 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
47 changes: 24 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
{
"parserOptions": {
"ecmaVersion": 5
},
"env": { "browser": true, "commonjs": true },
"extends": "eslint:recommended",
"env": {
"commonjs": true
},
"parserOptions": { "ecmaVersion": 5 },
"rules": {
"strict": [2, "global"],
"block-scoped-var": 2,
"consistent-return": 2,
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"no-caller": 2,
"no-extend-native": 2,
"no-loop-func": 2,
"no-new": 2,
"no-param-reassign": 2,
"no-return-assign": 2,
"no-unused-expressions": 2,
"no-use-before-define": 2,
"radix": [2, "always"],
"indent": [2, 2, { "SwitchCase": 1 }],
"quotes": [2, "double"],
"semi": [2, "always"]
"block-scoped-var": "error",
"consistent-return": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-extra-parens": "off",
"no-extend-native": "error",
"no-loop-func": "error",
"no-new": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-sequences": "error",
"no-unused-expressions": "error",
"no-use-before-define": "error",
"no-undef": "error",
"no-eq-null": "error",
"radix": ["error", "always"],
"indent": ["error", 2, { "SwitchCase": 1 }],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"strict": ["error", "global"]
}
}
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Bug report
about: Report an issue
title: ""
labels: bug
assignees: ""
---

**Describe the bug**
A clear and concise description of the bug.

**To Reproduce**
A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/change-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Change request
about: Propose an improvement to this library
title: ""
labels: ""
assignees: ""
---

**Is your change request related to a problem? Please describe.**
A clear and concise description of the problem.

Examples:

- It's frustrating to have to [...]
- I was looking for a function to [...]

**Describe the solution you'd like**
A clear and concise description of what a good solution to you looks like, including any solutions you've already considered.

**Additional context**
Add any other context about the change request here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: PureScript Discourse
url: https://discourse.purescript.org/
about: Ask and answer questions here.
- name: Functional Programming Slack
url: https://functionalprogramming.slack.com
about: For casual chat and questions (use https://fpchat-invite.herokuapp.com to join).
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Description of the change**
Clearly and concisely describe the purpose of the pull request. If this PR relates to an existing issue or change proposal, please link to it. Include any other background context that would help reviewers understand the motivation for this PR.

---

**Checklist:**

- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username
- [ ] Linked any existing issues or proposals that this pull request should close
- [ ] Updated or added relevant documentation in the README and/or documentation directory
- [ ] Added a test for the contribution (if applicable)
51 changes: 0 additions & 51 deletions .github/contributing.md

This file was deleted.

22 changes: 0 additions & 22 deletions .github/issue_template.md

This file was deleted.

15 changes: 0 additions & 15 deletions .github/pull_request_template.md

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up PureScript toolchain
uses: purescript-contrib/setup-purescript@main

- name: Cache PureScript dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
path: |
.spago
output
- name: Set up Node toolchain
uses: actions/setup-node@v1
with:
node-version: "12.x"

- name: Cache NPM dependencies
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install NPM dependencies
run: npm install

- name: Build the project
run: npm run build

- name: Run tests
run: npm run test
20 changes: 7 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
/.*
!/.gitignore
!/.github
!/.travis.yml
.*
!.gitignore
!.github
!.editorconfig
!.eslintrc.json

# Dependencies
bower_components
node_modules

# Generated files
output
generated-docs
bower_components

# Lockfiles
node_modules
package-lock.json
*.lock

# Extra files
!/.eslintrc.json
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Changelog

Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

Breaking changes (😱!!!):

New features:

Bugfixes:

Other improvements:

## [v6.0.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v6.0.0) - 2018-05-25

- Updated for PureScript 0.12

## [v5.2.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v5.2.0) - 2018-03-20

- Added instances for `Eq`, `Ord`, `Show` (@eric-corumdigital)

## [v5.1.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v5.1.0) - 2017-07-16

- Added `JSDate`-specific version of `now`
- Added `fromInstant`

## [v5.0.1](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v5.0.1) - 2017-06-23

- Fixed date construction for years 0 <= y < 100 (@berdario)

## [v5.0.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v5.0.0) - 2017-05-16

- Updated `toISOString`'s effect label from `err` to `exception`

## [v4.0.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v4.0.0) - 2017-04-04

- Updated for PureScript 0.11

## [v3.0.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v3.0.0) - 2016-10-17

- Updated dependencies

## [v2.0.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v2.0.0) - 2016-07-29

- Fixed the label for the `EXCEPTION` effect to `err` so it can be handled with the canonical error handling functions

## [v1.2.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v1.2.0) - 2016-07-22

- Added `parse` function corresponding to invoking the `Date` constructor with a string.

## [v1.1.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v1.1.0) - 2016-07-13

- Added `IsForeign` instance for `JSDate`

## [v1.0.0](https://github.com/purescript-contrib/purescript-js-date/releases/tag/v1.0.0) - 2016-06-09

Initial release.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributing to JS Date

Thanks for your interest in contributing to `js-date`! We welcome new contributions regardless of your level of experience or familiarity with PureScript.

Every library in the Contributors organization shares a simple handbook that helps new contributors get started. With that in mind, please [read the short contributing guide on purescript-contrib/governance](https://github.com/purescript-contrib/governance/blob/main/contributing.md) before contributing to this library.
Loading

0 comments on commit cbafe00

Please sign in to comment.