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

Added linter and prettier, with scrIpts #561

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
157 changes: 79 additions & 78 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,84 +28,85 @@ jobs:
# To see the list of pre-built images that CircleCI provides for most common languages see
# https://circleci.com/docs/2.0/circleci-images/
docker:
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
command: /sbin/init
- image: circleci/postgres:11
environment:
POSTGRES_USER: postgres
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
command: /sbin/init
- image: circleci/postgres:11
environment:
POSTGRES_USER: postgres
steps:
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
# In many cases you can simplify this from what is generated here.
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# This is based on your 1.0 configuration file or project settings
- run:
working_directory: ~/Hylozoic/hylo-node
command: nvm install 8.6.0 && nvm alias default 8.6.0
- run:
working_directory: ~/Hylozoic/hylo-node
command: 'sudo redis-cli ping >/dev/null 2>&1 || sudo service redis-server
start; '
# Dependencies
# This would typically go in either a build or a build-and-test job when using workflows
# Restore the dependency cache
- restore_cache:
keys:
# This branch if available
- v1-dep-{{ .Branch }}-
# Default branch if not
- v1-dep-master-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-
# This is based on your 1.0 configuration file or project settings
- run: |-
createdb -h localhost hylo_test -U postgres
npm install -g codecov
curl -o- -L https://yarnpkg.com/install.sh | bash
# This is based on your 1.0 configuration file or project settings
- run: yarn install
# Save dependency cache
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ./node_modules
# Test
# This would typically be a build job when using workflows, possibly combined with build
# This is based on your 1.0 configuration file or project settings
- run: npm run cover --forbid-only
# This is based on your 1.0 configuration file or project settings
- run: codecov
# Deployment
# Your existing circle.yml file contains deployment steps.
# The config translation tool does not support translating deployment steps
# since deployment in CircleCI 2.0 are better handled through workflows.
# See the documentation for more information https://circleci.com/docs/2.0/workflows/
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: coverage
- store_artifacts:
path: /tmp/circleci-test-results
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
# In many cases you can simplify this from what is generated here.
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# This is based on your 1.0 configuration file or project settings
- run:
working_directory: ~/Hylozoic/hylo-node
command: nvm install 8.6.0 && nvm alias default 8.6.0
- run:
working_directory: ~/Hylozoic/hylo-node
command:
"sudo redis-cli ping >/dev/null 2>&1 || sudo service redis-server
start; "
# Dependencies
# This would typically go in either a build or a build-and-test job when using workflows
# Restore the dependency cache
- restore_cache:
keys:
# This branch if available
- v1-dep-{{ .Branch }}-
# Default branch if not
- v1-dep-master-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-
# This is based on your 1.0 configuration file or project settings
- run: |-
createdb -h localhost hylo_test -U postgres
npm install -g codecov
curl -o- -L https://yarnpkg.com/install.sh | bash
# This is based on your 1.0 configuration file or project settings
- run: yarn install
# Save dependency cache
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ./node_modules
# Test
# This would typically be a build job when using workflows, possibly combined with build
# This is based on your 1.0 configuration file or project settings
- run: npm run cover --forbid-only
# This is based on your 1.0 configuration file or project settings
- run: codecov
# Deployment
# Your existing circle.yml file contains deployment steps.
# The config translation tool does not support translating deployment steps
# since deployment in CircleCI 2.0 are better handled through workflows.
# See the documentation for more information https://circleci.com/docs/2.0/workflows/
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: coverage
- store_artifacts:
path: /tmp/circleci-test-results
deploy:
docker:
- image: buildpack-deps:trusty
Expand All @@ -126,4 +127,4 @@ workflows:
- build
filters:
branches:
only: master
only: master
10 changes: 5 additions & 5 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ engines:
enabled: true
config:
languages:
- javascript
- javascript
ratings:
paths:
- api/**
- lib/**
- api/**
- lib/**
exclude_paths:
- "**/*.test.js"
- migrations
- "**/*.test.js"
- migrations
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["standard"],
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
},
rules: {},
};
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

custom: ['https://www.flipcause.com/secure/cause_pdetails/Nzc4ODU=']
custom: ["https://www.flipcause.com/secure/cause_pdetails/Nzc4ODU="]
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/assets
Empty file added .prettierrc.json
Empty file.
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to Hylo Node (the Hylo server) will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Expand All @@ -7,53 +8,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

## [1.3.8]

### Added

- Ability to sort posts by created_at date

### Fixed

- Correct URL for access to user avatar images from Facebook
- Try increasing knex connection pool size to fix server timeouts

## [1.3.7]

### Added

- Add migrations, models, resolvers, and GraphQL schema changes for creating, deleting, and viewing saved searches
- Add digest for saved searches

## Fixed

- Member Profile > Recent Activity feed loading fixed

## [1.3.6]

### Added

- Adds contactEmail and contactPhone to User and related graphql

### Fixed

- Updates Passport Google Auth scheme to latest

## [1.3.5] - 2020-09-12

### Changed

- Do less database queries when loading posts to speed things up

## [1.3.4] - 2020-08-27

### Fixed

- Anyone can see comments on public posts

## [1.3.3] - 2020-08-25

### Added

- Session endpoint for support of "Sign in with Apple"

## [1.3.2] - 2020-08-19

### Added

- Beta version of importing posts by CSV

## [1.3.1] - 2020-08-17

### Added

- Allow for querying for public posts and communities without being an authenticated user

## [1.3.0] - 2020-08-14

### Added

- Join Requests: Ability to create a join request, and for admins to accept or reject join requests. Notify admins about incoming join requests and users when their request was accepted.
- Topics: Support for default, pinned and hiding CommunityTopics. Can show topics for networks and all communities.
- Comment Attachments: images and files can now be attached to comments.

### Changed
- Remove location requirement for resource posts.

- Remove location requirement for resource posts.
Loading