Skip to content

Commit 7da6bc8

Browse files
committed
feature: v2 overhaul - resolves #1 #5 #6 #7 #8 #9
- 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
1 parent 89655f1 commit 7da6bc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10190
-1288
lines changed

.babelrc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
{"presets": ["es2015"] }
1+
{
2+
"presets": [[
3+
"env", {}
4+
]],
5+
"plugins": [
6+
"transform-class-properties",
7+
"transform-object-rest-spread",
8+
"syntax-async-functions",
9+
"transform-regenerator"
10+
]
11+
}

.eslintrc

Lines changed: 33 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,84 +2,39 @@
22
"parser": "babel-eslint",
33
"env": {
44
"node": true,
5-
"es6": true
5+
"es6": true,
6+
"mocha": true
67
},
8+
"parserOptions": {
9+
"ecmaVersion": 7,
10+
"ecmaFeatures": {
11+
"experimentalObjectRestSpread": true,
12+
"jsx": true
13+
},
14+
"sourceType": "module"
15+
},
16+
"extends": [
17+
"prettier",
18+
"eslint:recommended"
19+
],
20+
"plugins": [
21+
"prettier"
22+
],
723
"rules": {
8-
# Possible errors
9-
comma-dangle: 2,
10-
no-console: 2,
11-
no-cond-assign: 2,
12-
no-control-regex: 2,
13-
no-debugger: 2,
14-
no-dupe-args: 2,
15-
no-dupe-keys: 2,
16-
no-duplicate-case: 2,
17-
no-empty: 2,
18-
no-empty-character-class: 2,
19-
no-ex-assign: 2,
20-
no-extra-boolean-cast: 2,
21-
no-extra-semi: 2,
22-
no-func-assign: 2,
23-
no-invalid-regexp: 2,
24-
no-irregular-whitespace: 2,
25-
no-negated-in-lhs: 2,
26-
no-obj-calls: 2,
27-
no-proto: 2,
28-
no-unexpected-multiline: 2,
29-
no-unreachable: 2,
30-
use-isnan: 2,
31-
valid-typeof: 2,
32-
valid-jsdoc: 2,
33-
# Best practices
34-
curly: [2, "multi"],
35-
eqeqeq: 2,
36-
no-fallthrough: 2,
37-
no-param-reassign: 2,
38-
no-octal: 2,
39-
no-redeclare: 2,
40-
# strict mode
41-
strict: [2, "global"],
42-
# variables
43-
no-delete-var: 2,
44-
no-undef: 2,
45-
no-unused-vars: 2,
46-
# node
47-
no-mixed-requires: 2,
48-
no-new-require: 2,
49-
# stylistic
50-
brace-style: 2,
51-
camelcase: 2,
52-
comma-style: 2,
53-
comma-spacing: 2,
54-
eol-last: 2,
55-
indent: [2, 2, {SwitchCase: 1}],
56-
keyword-spacing: 2,
57-
max-len: [2, 80, 2],
58-
max-depth: [2, 4],
59-
new-cap: 2,
60-
new-parens: 2,
61-
no-mixed-spaces-and-tabs: 2,
62-
no-multiple-empty-lines: [2, {max: 2}],
63-
no-trailing-spaces: 2,
64-
quotes: [2, "single"],
65-
semi: 2,
66-
space-before-blocks: [2, "always"],
67-
space-before-function-paren: [2, "never"],
68-
space-in-parens: [2, "never"],
69-
space-infix-ops: 2,
70-
space-unary-ops: 2,
71-
# es6
72-
arrow-parens: [2, "always"],
73-
arrow-spacing: [2, {"before": true, "after": true}],
74-
constructor-super: 2,
75-
no-class-assign: 2,
76-
no-confusing-arrow: 2,
77-
no-const-assign: 2,
78-
no-dupe-class-members: 2,
79-
no-this-before-super: 2,
80-
no-var: 2,
81-
prefer-const: 2,
82-
prefer-rest-params: 2,
83-
template-curly-spacing: 2
24+
"prettier/prettier": [
25+
2,
26+
{
27+
"trailingComma": "es5",
28+
"singleQuote": true,
29+
"printWidth": 80,
30+
"semi": false,
31+
"parser": "flow",
32+
"jsxBracketSameLine": true
33+
}
34+
],
35+
"no-unused-vars": 2,
36+
"no-console": 2,
37+
"no-restricted-syntax": 2,
38+
"no-undef": 2
8439
}
85-
}
40+
}

.gitignore

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22

33
node_modules/
44

5-
**/git/gitconfig.link
5+
test/
66

7-
**/fish/fish_history
8-
**/fish/fishd*
9-
10-
**/config.link/configstore/*
11-
12-
**/atom.link/.atom
13-
**/atom.link/.gitignore
14-
**/atom.link/.node-gyp/*
15-
**/atom.link/.storage/*
16-
**/atom.link/packages/*
17-
**/atom.link/compile-cache/*
18-
**/atom.link/storage/*
19-
**/atom.link/themes/*
7+
lib/

.jshintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
3+
node_modules/
4+
5+
test/

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "es5",
3+
"singleQuote": true,
4+
"printWidth": 80,
5+
"semi": false,
6+
"parser": "flow",
7+
"jsxBracketSameLine": true
8+
}

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
language: node_js
22
node_js:
3-
- "0.10"
3+
- "6"
4+
sudo: false
5+
install:
6+
- make setup
7+
script:
8+
- make test

ISSUE_TEMPLATE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Issue summary
2-
===
1+
### Issue summary
32

4-
Expected behavior
5-
===
63

7-
Actual behavior
8-
===
4+
### Expected behavior
5+
6+
7+
### Actual behavior
8+
9+
10+
### Steps to reproduce
911

10-
Steps to reproduce
11-
===

Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
MODULES = ./node_modules/.bin
2+
BABEL = $(MODULES)/babel
3+
ESLINT = $(MODULES)/eslint
4+
MOCHA = $(MODULES)/mocha
5+
6+
SRC_BASE = src/
7+
SCRIPT_DEST = ./
8+
SCRIPT_SRC = $(SRC_BASE)
9+
10+
help:
11+
@grep -E '^[a-zA-Z\._-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
12+
13+
lint: ## lints source 🎩
14+
$(ESLINT) $(SCRIPT_SRC)
15+
16+
compile-script: ## compiles scripts 🛠
17+
$(BABEL) $(SCRIPT_SRC) -d $(SCRIPT_DEST)
18+
19+
watch: compile-script ## watch for script changes and compile 🔍
20+
$(BABEL) $(SCRIPT_SRC) --watch -d $(SCRIPT_DEST)
21+
22+
setup: ## set up project for development 🏠
23+
npm install
24+
25+
build: ## build sources 🔨
26+
make compile-script
27+
28+
develop: build ## run development task 👷
29+
make watch
30+
31+
test: build ## test internal functions 👨‍⚕
32+
make lint && $(MOCHA)
33+
34+
cleanup: ## tidy out any generated/deployed files 👨‍🔧
35+
rm -rf lib test

PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
Fixes # || Adds new feature X
22
===
33

4-
Changes include;
5-
4+
## Changes
65
* a
76
* b
87
* c
98

9+
## Checks
10+
- [ ] Passes linting
11+
- [ ] Passes tests
12+
- [ ] Applicable tests created if necessary
13+
1014
@jh3y

0 commit comments

Comments
 (0)