Skip to content

Commit

Permalink
feature: v2 overhaul - resolves #1 #5 #6 #7 #8 #9
Browse files Browse the repository at this point in the history
- no longer prepend dotfiles, leave to user definition
- improve unhandled rejection error cases
- overhaul README
- improve overall logging to user for scenarios such as no task selected
- overhaul symlinking task and provide backup option
- fix issue where file already in place when attempting to symlink by removing/restoring backup
  • Loading branch information
jh3y committed Jul 22, 2018
1 parent 89655f1 commit 7da6bc8
Show file tree
Hide file tree
Showing 48 changed files with 10,190 additions and 1,288 deletions.
12 changes: 11 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
{"presets": ["es2015"] }
{
"presets": [[
"env", {}
]],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread",
"syntax-async-functions",
"transform-regenerator"
]
}
111 changes: 33 additions & 78 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,39 @@
"parser": "babel-eslint",
"env": {
"node": true,
"es6": true
"es6": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 7,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"extends": [
"prettier",
"eslint:recommended"
],
"plugins": [
"prettier"
],
"rules": {
# Possible errors
comma-dangle: 2,
no-console: 2,
no-cond-assign: 2,
no-control-regex: 2,
no-debugger: 2,
no-dupe-args: 2,
no-dupe-keys: 2,
no-duplicate-case: 2,
no-empty: 2,
no-empty-character-class: 2,
no-ex-assign: 2,
no-extra-boolean-cast: 2,
no-extra-semi: 2,
no-func-assign: 2,
no-invalid-regexp: 2,
no-irregular-whitespace: 2,
no-negated-in-lhs: 2,
no-obj-calls: 2,
no-proto: 2,
no-unexpected-multiline: 2,
no-unreachable: 2,
use-isnan: 2,
valid-typeof: 2,
valid-jsdoc: 2,
# Best practices
curly: [2, "multi"],
eqeqeq: 2,
no-fallthrough: 2,
no-param-reassign: 2,
no-octal: 2,
no-redeclare: 2,
# strict mode
strict: [2, "global"],
# variables
no-delete-var: 2,
no-undef: 2,
no-unused-vars: 2,
# node
no-mixed-requires: 2,
no-new-require: 2,
# stylistic
brace-style: 2,
camelcase: 2,
comma-style: 2,
comma-spacing: 2,
eol-last: 2,
indent: [2, 2, {SwitchCase: 1}],
keyword-spacing: 2,
max-len: [2, 80, 2],
max-depth: [2, 4],
new-cap: 2,
new-parens: 2,
no-mixed-spaces-and-tabs: 2,
no-multiple-empty-lines: [2, {max: 2}],
no-trailing-spaces: 2,
quotes: [2, "single"],
semi: 2,
space-before-blocks: [2, "always"],
space-before-function-paren: [2, "never"],
space-in-parens: [2, "never"],
space-infix-ops: 2,
space-unary-ops: 2,
# es6
arrow-parens: [2, "always"],
arrow-spacing: [2, {"before": true, "after": true}],
constructor-super: 2,
no-class-assign: 2,
no-confusing-arrow: 2,
no-const-assign: 2,
no-dupe-class-members: 2,
no-this-before-super: 2,
no-var: 2,
prefer-const: 2,
prefer-rest-params: 2,
template-curly-spacing: 2
"prettier/prettier": [
2,
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"semi": false,
"parser": "flow",
"jsxBracketSameLine": true
}
],
"no-unused-vars": 2,
"no-console": 2,
"no-restricted-syntax": 2,
"no-undef": 2
}
}
}
16 changes: 2 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@

node_modules/

**/git/gitconfig.link
test/

**/fish/fish_history
**/fish/fishd*

**/config.link/configstore/*

**/atom.link/.atom
**/atom.link/.gitignore
**/atom.link/.node-gyp/*
**/atom.link/.storage/*
**/atom.link/packages/*
**/atom.link/compile-cache/*
**/atom.link/storage/*
**/atom.link/themes/*
lib/
3 changes: 0 additions & 3 deletions .jshintrc

This file was deleted.

5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store

node_modules/

test/
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"semi": false,
"parser": "flow",
"jsxBracketSameLine": true
}
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
language: node_js
node_js:
- "0.10"
- "6"
sudo: false
install:
- make setup
script:
- make test
16 changes: 8 additions & 8 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Issue summary
===
### Issue summary

Expected behavior
===

Actual behavior
===
### Expected behavior


### Actual behavior


### Steps to reproduce

Steps to reproduce
===
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
MODULES = ./node_modules/.bin
BABEL = $(MODULES)/babel
ESLINT = $(MODULES)/eslint
MOCHA = $(MODULES)/mocha

SRC_BASE = src/
SCRIPT_DEST = ./
SCRIPT_SRC = $(SRC_BASE)

help:
@grep -E '^[a-zA-Z\._-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

lint: ## lints source 🎩
$(ESLINT) $(SCRIPT_SRC)

compile-script: ## compiles scripts 🛠
$(BABEL) $(SCRIPT_SRC) -d $(SCRIPT_DEST)

watch: compile-script ## watch for script changes and compile 🔍
$(BABEL) $(SCRIPT_SRC) --watch -d $(SCRIPT_DEST)

setup: ## set up project for development 🏠
npm install

build: ## build sources 🔨
make compile-script

develop: build ## run development task 👷
make watch

test: build ## test internal functions 👨‍⚕
make lint && $(MOCHA)

cleanup: ## tidy out any generated/deployed files 👨‍🔧
rm -rf lib test
8 changes: 6 additions & 2 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
Fixes # || Adds new feature X
===

Changes include;

## Changes
* a
* b
* c

## Checks
- [ ] Passes linting
- [ ] Passes tests
- [ ] Applicable tests created if necessary

@jh3y
Loading

0 comments on commit 7da6bc8

Please sign in to comment.