Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[OV JS] Add linter check on CIs (#32565)

Alicja Miloszewska4c4f1f23f089
diff --git a/.github/workflows/job_openvino_js.yml b/.github/workflows/job_openvino_js.yml
index a05b219e45e..5e0b82ec5e6 100644
--- a/.github/workflows/job_openvino_js.yml
+++ b/.github/workflows/job_openvino_js.yml
@@ -73,6 +73,10 @@ jobs:
working-directory: ${{ env.OPENVINO_JS_DIR }}
run: npm i
+ - name: Check lint
+ working-directory: ${{ env.OPENVINO_JS_DIR }}
+ run: npm run lint
+
- name: Test OpenVINO JS API
working-directory: ${{ env.OPENVINO_JS_DIR }}
run: npm run test --loglevel=silly
diff --git a/src/bindings/js/node/lib/addon.ts b/src/bindings/js/node/lib/addon.ts
index e8dea816cde..b4e3f9006a7 100644
--- a/src/bindings/js/node/lib/addon.ts
+++ b/src/bindings/js/node/lib/addon.ts
@@ -334,7 +334,7 @@ interface Node {
/**
* It constructs a default Node object.
*/
- new(): Node;
+ new (): Node;
/**
* It gets the unique name of the node.
* @returns A string with the name of the node.
diff --git a/src/bindings/js/node/tests/unit/model.test.js b/src/bindings/js/node/tests/unit/model.test.js
index fe504e58332..1d78734b77e 100644
--- a/src/bindings/js/node/tests/unit/model.test.js
+++ b/src/bindings/js/node/tests/unit/model.test.js
@@ -280,25 +280,25 @@ describe("ov.Model tests", () => {
});
});
- describe('Model.getOps()', () => {
- it('should return objects of type Node', () => {
+ describe("Model.getOps()", () => {
+ it("should return objects of type Node", () => {
const modelOps = model.getOps();
assert.ok(modelOps[0] instanceof ov.Node);
});
- it('should return node names expected in the calling model', () => {
+ it("should return node names expected in the calling model", () => {
const model = core.readModelSync(addModel.xml);
const modelOps = model.getOps();
- const nodeNames = ['Parameter_7674', 'Parameter_7672', 'Result_7678', 'Add_7676'];
+ const nodeNames = ["Parameter_7674", "Parameter_7672", "Result_7678", "Add_7676"];
assert.deepStrictEqual(modelOps.length, nodeNames.length);
for (const [index, node] of nodeNames.entries()) {
assert.deepStrictEqual(modelOps[index].getName(), node);
}
});
- it('should not accept any arguments', () => {
+ it("should not accept any arguments", () => {
assert.throws(
- () => model.getOps('Unexpected argument').then(),
+ () => model.getOps("Unexpected argument").then(),
/'getOps' method called with incorrect parameters./,
);
});