From a11e5f326a74c41adc38363e396db4bfc4dfbf10 Mon Sep 17 00:00:00 2001 From: Lingyun Cai Date: Wed, 11 Oct 2023 16:52:15 +0800 Subject: [PATCH] Enhance linting command to check all ts files (#20) Extend linting check from src/ to src/, tests/, typings/ and extensions/. --- .eslintignore | 6 ++++++ package.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..358757d --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +tests/assets/* +node_modules/* +documentation/* +docs/* +files/* +**/dist/* diff --git a/package.json b/package.json index 3589db2..3ff0ec6 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "serve": "cross-env NODE_ENV=development concurrently \"tsc -b --watch ./tsconfig.all.json\" \"nodemon -q dist/server.js\"", "prestart": "npm run build", "start": "cross-env NODE_ENV=production node dist/server.js", - "lint": "eslint src", - "lint-fix": "eslint --fix src", + "lint": "eslint '**/*.ts'", + "lint-fix": "eslint --fix '**/*.ts'", "prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write", "pretest": "npm run build", "test": "cross-env TS_NODE_PROJECT='./tests/tsconfig.json' mocha -r ts-node/register tests/index.ts --timeout 5000",