diff --git a/src/__tests__/public-methods-error-boundary.test.js b/custom_eslint/__tests__/public-methods-error-boundary.test.js similarity index 96% rename from src/__tests__/public-methods-error-boundary.test.js rename to custom_eslint/__tests__/public-methods-error-boundary.test.js index 014c00b..9bb1343 100644 --- a/src/__tests__/public-methods-error-boundary.test.js +++ b/custom_eslint/__tests__/public-methods-error-boundary.test.js @@ -1,4 +1,4 @@ -import errorBoundaryCheck from "../../custom_eslint/public-methods-error-boundary"; +import errorBoundaryCheck from "../public-methods-error-boundary"; import { RuleTester } from "eslint"; const ruleTester = new RuleTester({ diff --git a/custom_eslint/index.js b/custom_eslint/index.js index c34454c..f5d813b 100644 --- a/custom_eslint/index.js +++ b/custom_eslint/index.js @@ -3,7 +3,7 @@ const path = require("path"); const ruleFiles = fs .readdirSync(__dirname) - .filter((file) => file !== "index.js" && !file.endsWith("test.js")); + .filter((file) => file !== "index.js" && !file.includes('__tests__') && !file.endsWith("test.js")); const rules = Object.fromEntries( ruleFiles.map((file) => [path.basename(file, ".js"), require("./" + file)]) diff --git a/jest.config.js b/jest.config.js index 31db313..c3660fa 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,7 @@ module.exports = { roots: ['./'], setupFilesAfterEnv: ['/src/__tests__/jest.setup.ts'], testMatch: ['**/__tests__/**/*.test.(j|t)s', '**/?(*.)+test.(j|t)s'], - testPathIgnorePatterns: ['/node_modules/', '/dist/'], + testPathIgnorePatterns: ['/custom_eslint/', '/node_modules/', '/dist/'], transform: { '^.+\\.ts$': 'ts-jest', },