Skip to content

Commit 9f84603

Browse files
committed
Add git hooks, eslint, prettier
Extend eslint with prettier
1 parent dd303be commit 9f84603

File tree

8 files changed

+14437
-5421
lines changed

8 files changed

+14437
-5421
lines changed

.eslintrc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const { overrides } = require('@netlify/eslint-config-node')
2+
module.exports = {
3+
env: {
4+
commonjs: true,
5+
es6: true,
6+
},
7+
parserOptions: {
8+
ecmaVersion: '2019',
9+
},
10+
overrides: [...overrides],
11+
extends: 'prettier',
12+
rules: {
13+
'max-depth': 0,
14+
complexity: 0,
15+
'fp/no-let': 0,
16+
'fp/no-loops': 0,
17+
'fp/no-mutation': 0,
18+
'fp/no-mutating-methods': 0,
19+
'id-length': 0,
20+
'max-statements': 0,
21+
'no-await-in-loop': 0,
22+
'node/exports-style': 0,
23+
'node/global-require': 0,
24+
'node/prefer-global/process': 0,
25+
'no-magic-numbers': 0,
26+
'no-param-reassign': 0,
27+
'no-promise-executor-return': 0,
28+
'no-prototype-builtins': 0,
29+
'no-shadow': 0,
30+
'no-unused-vars': 0,
31+
'prefer-regex-literals': 0,
32+
semi: 0,
33+
'promise/prefer-await-to-callbacks': 0,
34+
},
35+
}

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm test
5+
npx lint-staged

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
...require('@netlify/eslint-config-node/.prettierrc.json'),
3+
endOfLine: 'auto',
4+
useTabs: true,
5+
}

0 commit comments

Comments
 (0)