node: add lint check in workflow

This commit is contained in:
Pierric Cistac
2020-01-29 16:58:59 -05:00
parent 8792790a91
commit 3f6de4d33f
3 changed files with 7 additions and 5 deletions

View File

@ -49,6 +49,10 @@ jobs:
working-directory: ./bindings/node
run: node build.js --all
- name: Lint TS
working-directory: ./bindings/node
run: npm run lint-check
- name: Run JS tests
working-directory: ./bindings/node
run: npm test

View File

@ -19,9 +19,8 @@
},
"plugins": ["@typescript-eslint", "jest", "prettier", "simple-import-sort"],
"rules": {
"prettier/prettier": "warn",
"simple-import-sort/sort": "warn"
// "sort-imports": "warn",
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
"simple-import-sort/sort": "error"
},
"overrides": [
{
@ -35,8 +34,6 @@
"prettier/@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/camelcase": "warn",
"jsdoc/no-types": "error"
}
}

View File

@ -42,6 +42,7 @@
"clean-rs": "neon clean",
"package": "node-pre-gyp package",
"test": "jest",
"lint-check": "eslint --ext .js,.ts lib examples",
"lint": "eslint --fix --ext .js,.ts lib examples"
},
"binary": {