From 1a85524046a8743e53253fb7c4c119d1876916a6 Mon Sep 17 00:00:00 2001 From: Marc Kassay Date: Wed, 17 Aug 2022 14:06:13 -0400 Subject: [PATCH] test: disable all test lints - Due to swc/jest not supporting lint at this time - See: https://github.com/swc-project/swc/issues/246 --- .swcrc | 3 ++- README.md | 2 +- package-lock.json | 26 ++++++++++++++++++++++++++ package.json | 3 ++- src/tsconfig.json | 1 + 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.swcrc b/.swcrc index 96a29fb..641f50a 100644 --- a/.swcrc +++ b/.swcrc @@ -1,6 +1,7 @@ { + "$schema": "https://json.schemastore.org/swcrc", "jsc": { - "target": "es2022", + "target": "es2021", "parser": { "syntax": "typescript", "tsx": true, diff --git a/README.md b/README.md index cd757c5..2c7d22e 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The following are ESLint rules/plugins that are being used: - "eslint-plugin-jest" ## TODO - +https://github.com/swc-project/swc/issues/246 Enable and add additional Jest linting: - https://github.com/jest-community/eslint-plugin-jest - https://github.com/jest-community/jest-runner-eslint diff --git a/package-lock.json b/package-lock.json index d474fe0..f41a62b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "eslint-plugin-jest": "^26.8.2", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-testing-library": "^5.6.0", "husky": "^8.0.1", "jest": "^28.1.3", "jest-environment-jsdom": "^28.1.3", @@ -5001,6 +5002,22 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-testing-library": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.6.0.tgz", + "integrity": "sha512-y63TRzPhGCMNsnUwMGJU1MFWc/3GvYw+nzobp9QiyNTTKsgAt5RKAOT1I34+XqVBpX1lC8bScoOjCkP7iRv0Mw==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "^5.13.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0", + "npm": ">=6" + }, + "peerDependencies": { + "eslint": "^7.5.0 || ^8.0.0" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -15102,6 +15119,15 @@ "dev": true, "requires": {} }, + "eslint-plugin-testing-library": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.6.0.tgz", + "integrity": "sha512-y63TRzPhGCMNsnUwMGJU1MFWc/3GvYw+nzobp9QiyNTTKsgAt5RKAOT1I34+XqVBpX1lC8bScoOjCkP7iRv0Mw==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "^5.13.0" + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", diff --git a/package.json b/package.json index 4966b86..322cffc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "format:check": "npx prettier --check .", "format:clear": "rm ./node_modules/.cache/prettier/.prettier-cache", "tidy": "npm run tidy:check -- --write", - "tidy:check": "npx prettier-eslint \"./**/*.@(js|jsx|ts|tsx)\" --config .prettierrc --list-different", + "tidy:check": "npx prettier-eslint \"./**/*.@(js|jsx|ts|tsx)\" --config .prettierrc --list-different", "prepare": "husky install", "pre-commit": "npm test && npx pretty-quick --staged && npm run tidy" }, @@ -56,6 +56,7 @@ "eslint-plugin-jest": "^26.8.2", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-testing-library": "^5.6.0", "husky": "^8.0.1", "jest": "^28.1.3", "jest-environment-jsdom": "^28.1.3", diff --git a/src/tsconfig.json b/src/tsconfig.json index 965b35c..f660276 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -16,6 +16,7 @@ "esModuleInterop": true, "useDefineForClassFields": true, "isolatedModules": true, + "noEmit": true, "allowSyntheticDefaultImports": true, "strict": true },