Skip to content

Commit ab684dd

Browse files
committed
bump dev deps and add more helpful ones
1 parent 6289075 commit ab684dd

13 files changed

+1962
-1779
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
coverage/
2-
node_modules/

.eslintrc

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

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
node: true
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:prettier/recommended',
10+
'plugin:react/recommended'
11+
],
12+
parserOptions: {
13+
ecmaVersion: 2019,
14+
sourceType: 'module'
15+
},
16+
plugins: [],
17+
rules: {
18+
'indent': ['error', 2, { 'SwitchCase': 1 }],
19+
'no-trailing-spaces': 'error',
20+
'object-curly-spacing': ['error', 'always'],
21+
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
22+
'semi': ['error', 'never']
23+
},
24+
settings: {
25+
react: {
26+
version: '16'
27+
}
28+
}
29+
}

.prettierrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
semi: false,
3+
singleQuote: true
4+
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "11"
3+
- "12"
44
cache: yarn
55
after_success:
66
- npm run coverage

ava.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
babel: {
3+
testOptions: {
4+
presets: ['@babel/preset-react']
5+
}
6+
}
7+
}

husky.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
hooks: {
3+
'pre-commit': 'lint-staged'
4+
}
5+
}

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ function flexibleStringReplace(pattern, replacement, str) {
1414
var originalStr = args[argsN - 1]
1515
var charOffset = args[argsN - 2]
1616
var prevChars = originalStr.slice(position, charOffset)
17-
var replaced = typeof replacement === 'function'
18-
? replacement.apply(null, args)
19-
: replacement
17+
var replaced =
18+
typeof replacement === 'function'
19+
? replacement.apply(null, args)
20+
: replacement
2021

2122
result.push(prevChars, replaced)
2223
position = charOffset + match.length

lint-staged.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
'*.js': ['eslint --fix', 'git add']
3+
}

nyc.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
include: ['index.js']
3+
}

0 commit comments

Comments
 (0)