Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add eslint + prettier
  • Loading branch information
wmertens committed Jan 26, 2023
commit 85e1e46855beb28560886a44ab103cf89aaf1a5b
55 changes: 55 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/vendor
/.travis
/.github
/build
/include
/generate/templates/templates/

# Gitignore
/build/
/coverage/
/dist/
/include/
/lib/enums.js
/lib/nodegit.js
/node_modules/
/src/
/test/coverage/
/test/home/
/test/repos/
/test/test/

/generate/output
/generate/**/*.json
!/generate/input/*.json

/generate/missing-tests.json
/binding.gyp

# Generated vendor files
/vendor/openssl/
/vendor/libssh2/Makefile
/vendor/libssh2/config.status
/vendor/libssh2/docs/Makefile
/vendor/libssh2/example/.deps/
/vendor/libssh2/example/Makefile
/vendor/libssh2/example/libssh2_config.h
/vendor/libssh2/example/stamp-h2
/vendor/libssh2/libssh2.pc
/vendor/libssh2/libtool
/vendor/libssh2/src/.deps/
/vendor/libssh2/src/Makefile
/vendor/libssh2/src/libssh2_config.h
/vendor/libssh2/src/stamp-h1
/vendor/libssh2/tests/.deps/
/vendor/libssh2/tests/Makefile

*.log
.DS_STORE
.idea

.vscode
jsconfig.json

test/id_rsa
test/nodegit-test-rsa
35 changes: 35 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:mocha/recommended",
"plugin:node/recommended"
],
"parserOptions": {
"ecmaVersion": 2020
},
"env": {
"es6": true,
"node": true,
"mocha": true
},
"plugins": ["prettier", "mocha", "node"],
"rules": {
"array-callback-return": "error",
"prettier/prettier": "warn",
"mocha/no-setup-in-describe": "warn",
"no-process-exit": "warn",
"no-shadow": "warn",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true,
"varsIgnorePattern": "^_"
}
], // allow unused vars starting with _
"node/no-missing-require": "warn",
"prefer-const": "warn"
}
}
31 changes: 0 additions & 31 deletions .jshintrc

This file was deleted.

62 changes: 62 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/vendor
/.travis
/.github
/build
/include

# Don't interfere with npm
package-lock.json
package.json

# Autogenerated
/CHANGELOG.md

# Gitignore
/build/
/coverage/
/dist/
/include/
/lib/enums.js
/lib/nodegit.js
/node_modules/
/src/
/test/coverage/
/test/home/
/test/repos/
/test/test/

/generate/output
/generate/templates
/generate/**/*.json
!/generate/input/*.json

/generate/missing-tests.json
/binding.gyp

# Generated vendor files
/vendor/openssl/
/vendor/libssh2/Makefile
/vendor/libssh2/config.status
/vendor/libssh2/docs/Makefile
/vendor/libssh2/example/.deps/
/vendor/libssh2/example/Makefile
/vendor/libssh2/example/libssh2_config.h
/vendor/libssh2/example/stamp-h2
/vendor/libssh2/libssh2.pc
/vendor/libssh2/libtool
/vendor/libssh2/src/.deps/
/vendor/libssh2/src/Makefile
/vendor/libssh2/src/libssh2_config.h
/vendor/libssh2/src/stamp-h1
/vendor/libssh2/tests/.deps/
/vendor/libssh2/tests/Makefile

*.log
.DS_STORE
.idea

.vscode
jsconfig.json

test/id_rsa
test/nodegit-test-rsa
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"jsdocUseInlineCommentForASingleTagBlock": true,
"plugins": ["./node_modules/@homer0/prettier-plugin-jsdoc"],
"printWidth": 120,
"singleQuote": false
}
Loading