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 working-directory: ./bindings/node
run: node build.js --all run: node build.js --all
- name: Lint TS
working-directory: ./bindings/node
run: npm run lint-check
- name: Run JS tests - name: Run JS tests
working-directory: ./bindings/node working-directory: ./bindings/node
run: npm test run: npm test

View File

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

View File

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