Skip to content

Commit

Permalink
lint: add eslint based on config-semistandard (#1067)
Browse files Browse the repository at this point in the history
* lint: add eslint based on config-semistandard
  • Loading branch information
rubiagatra committed Sep 17, 2021
1 parent 79d5651 commit d8fc7b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,3 @@
module.exports = {
extends: ['semistandard']
};
11 changes: 8 additions & 3 deletions package.json
Expand Up @@ -329,6 +329,12 @@
"benchmark": "^2.1.4",
"bindings": "^1.5.0",
"clang-format": "^1.4.0",
"eslint": "^7.32.0",
"eslint-config-semistandard": "^16.0.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"fs-extra": "^9.0.1",
"path": "^0.12.7",
"pre-commit": "^1.2.2",
Expand All @@ -351,7 +357,6 @@
"license": "MIT",
"main": "index.js",
"name": "node-addon-api",
"optionalDependencies": {},
"readme": "README.md",
"repository": {
"type": "git",
Expand All @@ -372,8 +377,8 @@
"predev:incremental": "node-gyp configure build -C test --debug",
"dev:incremental": "node test",
"doc": "doxygen doc/Doxyfile",
"lint": "node tools/clang-format",
"lint:fix": "node tools/clang-format --fix"
"lint": "eslint $(git diff --name-only refs/remotes/origin/main '**/*.js' | xargs) && node tools/clang-format",
"lint:fix": "node tools/clang-format --fix && eslint --fix $(git diff --cached --name-only '**/*.js' | xargs && git diff --name-only '**/*.js' | xargs)"
},
"pre-commit": "lint",
"version": "4.2.0",
Expand Down

0 comments on commit d8fc7b8

Please sign in to comment.