Skip to content

Commit

Permalink
feat: overhaul (#121)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

A complete overhaul with many changes.

Check out the homepage for details: https://github.com/iamturns/create-exposed-app
  • Loading branch information
iamturns committed Mar 13, 2021
1 parent 8755684 commit 71f3095
Show file tree
Hide file tree
Showing 230 changed files with 23,738 additions and 11,747 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

16 changes: 0 additions & 16 deletions .circleci/config.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
NODE_ENV=production # String. Default: `production`. Examples: `development`, `test`.
DEBUG= # String. Default: not set. Examples: `*`, `namespace`, `namespace:*`, `value1,value2`
EXAMPLE="Hello World"
26 changes: 20 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
extends: [
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:eslint-comments/recommended",
"plugin:jest/recommended",
"plugin:promise/recommended",
Expand All @@ -22,6 +23,9 @@ module.exports = {
browser: true,
jest: true,
},
parserOptions: {
project: "./tsconfig.json",
},
rules: {
// Too restrictive, writing ugly code to defend against a very unlikely scenario: https://eslint.org/docs/rules/no-prototype-builtins
"no-prototype-builtins": "off",
Expand All @@ -37,16 +41,26 @@ module.exports = {
"error",
{ functions: false, classes: true, variables: true },
],
// Makes no sense to allow type inferrence for expression parameters, but require typing the response
"@typescript-eslint/explicit-function-return-type": [
"error",
{ allowExpressions: true, allowTypedFunctionExpressions: true },
],
// Allow most functions to rely on type inference. If the function is exported, then `@typescript-eslint/explicit-module-boundary-types` will ensure it's typed.
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{ functions: false, classes: true, variables: true, typedefs: true },
],
// Common abbreviations are known and readable
"unicorn/prevent-abbreviations": "off",
// Airbnb prefers forEach
"unicorn/no-array-for-each": "off",
// It's not accurate in the monorepo style
"import/no-extraneous-dependencies": "off",
},
}
overrides: [
{
files: ["*.js"],
rules: {
// Allow `require()`
"@typescript-eslint/no-var-requires": "off",
},
},
],
};
43 changes: 28 additions & 15 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
<!--
Thanks for contributing!
-->

# :page_with_curl: Issue
# Summary of issue

Describe your issue here.

---
## Steps to reproduce

1. ...
2. ...
3. ...

Please include if possible and/or relevant: code, config, links, repository that reproduces the bug.

## Expected behavior

What should happen?

## Actual behaviour

What happens instead? Please include if possible and/or relevant: error messages, stack traces, logs, screenshots.

## Environment

<!-- Remove items that aren't relevant -->

:white_check_mark: Checklist
- `@iamturns/create-exposed-app` version: [e.g. latest]
- Node.js version:
- npm version:
- Operating System and version: [e.g. macOS XX, iOS XX. See whatsmyos.com]
- Device used: [e.g. iPhone 6, MacBook Pro]
- Browser name and version: [e.g. Chrome XX, Safari XX, Android Browser XX. See whatsmybrowser.org]

<!--
Feel free to submit now and complete the checklist items below later.
If you're unsure about anything, don't hesitate to ask. We're here to help!
-->
## Additional

- [ ] Following [CODE_OF_CONDUCT.md](https://github.com/iamturns/create-exposed-app/blob/master/CODE_OF_CONDUCT.md)
- [ ] Checked for [duplicate issues](https://github.com/iamturns/create-exposed-app/issues)
- [ ] Title is a summary of the issue, in present tense, and ideally < 50 characters
- [ ] Ready for review
E.g. suggested solution, theories, etc.
59 changes: 0 additions & 59 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md

This file was deleted.

34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST.md

This file was deleted.

28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/QUESTION.md

This file was deleted.

41 changes: 1 addition & 40 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,40 +1 @@
<!--
Thanks for contributing!
-->

# :bug: Bug fix

...or...

# :sparkles: Enhancement

Closes #123, #456.

Describe your changes here. Possible details to include:

- Screenshots / gif demo
- What has changed?
- Why was it changed?
- Anything else changed to support the solution
- Anything unusual to point out
- Reasons for choosing this solution
- Alternative solutions considered

---

:white_check_mark: Checklist

<!--
Feel free to submit now and complete the checklist items below later.
If you're unsure about anything, don't hesitate to ask. We're here to help!
-->

- [ ] Following [CODE_OF_CONDUCT.md](https://github.com/iamturns/create-exposed-app/blob/master/CODE_OF_CONDUCT.md)
- [ ] Checked for [duplicate pull requests](https://github.com/iamturns/create-exposed-app/pulls)
- [ ] Title is a summary of the change, in present tense, ideally < 50 characters
- [ ] Pulling from a branch (right side), not `master`
- [ ] Pulling into `master` branch (left side)
- [ ] Fixing a bug? An open [bug report](https://github.com/iamturns/create-exposed-app/labels/bug) exists
- [ ] Breaking API changes? Migration notes attached
- [ ] Changed relevant files in `templates` directory
- [ ] Ready for review
<!-- Thanks for contributing! If this contains breaking changes, please include migration notes. -->
32 changes: 32 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Coveralls

on:
# Run on master changes to track test coverage over time
push:
branches:
- "master"
# Leave a PR comment to surface test coverage changes
pull_request: ~

jobs:
main:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install deps
run: npm ci

- name: Run tests and generate coverage report
run: npm run test--coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Formatter

on: push

jobs:
main:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install deps
run: npm ci

- name: Format
run: npm run format

- name: Commit formatted files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: Fix formatting"
26 changes: 26 additions & 0 deletions .github/workflows/push-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Branch workflow

on:
push:
branches:
- "*"
- "!master"

jobs:
main:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install deps
run: npm ci

- name: Validate
run: npm run validate
Loading

0 comments on commit 71f3095

Please sign in to comment.