diff --git a/.eslintrc.yml b/.eslintrc.yml index ef17a47d..93929a96 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -204,3 +204,11 @@ rules: ], }, ] + +overrides: + - files: + - ./test_module/**/*.{ts,js} + plugins: + - '@typescript-eslint' + parserOptions: + project: ./test_module/tsconfig.json diff --git a/package.json b/package.json index 21bae0e7..8c27383c 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "format:rs": "cargo fmt", "format:source": "prettier --config ./package.json --write './**/*.js'", "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'", - "lint": "eslint -c .eslintrc.yml", + "lint": "eslint -c .eslintrc.yml './src/**/*.ts' './test_module/**/*.{ts,js}'", "test": "ava" }, "bugs": { @@ -44,29 +44,16 @@ "trailingComma": "all", "arrowParens": "always" }, - "files": [ - "scripts", - "LICENSE" - ], + "files": ["scripts", "LICENSE"], "lint-staged": { - "*.js": [ - "prettier --write" - ], - "*.@(yml|yaml)": [ - "prettier --parser yaml --write" - ], - "*.json": [ - "prettier --parser json --write" - ], - "*.md": [ - "prettier --parser markdown --write" - ] + "*.js": ["prettier --write"], + "*.@(yml|yaml)": ["prettier --parser yaml --write"], + "*.json": ["prettier --parser json --write"], + "*.md": ["prettier --parser markdown --write"] }, "ava": { "extensions": ["ts", "tsx"], - "files": [ - "test_module/__test__/**/*.spec.ts" - ], + "files": ["test_module/__test__/**/*.spec.ts"], "require": ["@swc-node/register"] }, "husky": { diff --git a/test_module/tsconfig.json b/test_module/tsconfig.json new file mode 100644 index 00000000..b4c49e2f --- /dev/null +++ b/test_module/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "include": ["."], + "compilerOptions": { + "outDir": "./dist" + } +} diff --git a/tsconfig.json b/tsconfig.json index 6b9438e0..58de7e13 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,5 +39,6 @@ "esnext" ] }, + "include": ["./src"], "exclude": ["node_modules"] }