diff --git a/.github/workflows/ci-integrity.yml b/.github/workflows/ci-integrity.yml index ff55193..9dfc3e5 100644 --- a/.github/workflows/ci-integrity.yml +++ b/.github/workflows/ci-integrity.yml @@ -51,6 +51,10 @@ jobs: - name: 📥 Install Dependencies run: yarn --frozen-lockfile + - name: Build + run: | + yarn build + - name: Linter run: | yarn lint @@ -59,6 +63,3 @@ jobs: run: | yarn test - - name: Build - run: | - yarn build diff --git a/package.json b/package.json index b6954f6..1f9c2b4 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "build": "rimraf dist && tsc -p ./tsconfig.build.json ", "clean": "rimraf --no-glob ./dist ./coverage ./.eslintcache ./tsconfig.tsbuildinfo", "test": "vitest run", - "lint": "yarn run typecheck && eslint .", + "lint": "eslint .", "lint:fix": "npm run lint -- --fix", "typecheck": "tsc --project ./tsconfig.json --noEmit", "lint-staged-files": "lint-staged --allow-empty", diff --git a/src/define-config.ts b/src/define-config.ts index 53db9b7..74fb7d4 100644 --- a/src/define-config.ts +++ b/src/define-config.ts @@ -2,11 +2,12 @@ import { defineFlatConfig, FlatESLintConfig } from 'eslint-define-config'; import { getDefaultIgnorePatterns } from './getDefaultIgnorePatterns.js'; export const defineConfig = ( - config: ReadonlyArray + config: ReadonlyArray, + ignores: string[] = [] ): FlatESLintConfig[] => { return defineFlatConfig( config.concat({ - ignores: getDefaultIgnorePatterns(), + ignores: getDefaultIgnorePatterns(ignores), }) ); }; diff --git a/src/getDefaultIgnorePatterns.ts b/src/getDefaultIgnorePatterns.ts index bce1519..a474f7f 100644 --- a/src/getDefaultIgnorePatterns.ts +++ b/src/getDefaultIgnorePatterns.ts @@ -1,14 +1,14 @@ -export const getDefaultIgnorePatterns = () => { +export const getDefaultIgnorePatterns = (ignores: string[] = []) => { return [ // Hacky way to silence @yarnpkg/doctor about node_modules detection `**/${'node'}_modules`, '**/node_modules', - '.cache', - '.changeset', - '.github', - '.husky', - '.yarn', - '.next', + '**/.cache', + '**/.changeset', + '**/.github', + '**/.husky', + '**/.yarn', + '**/.next', '**/_release', '**/.cache', '**/build', @@ -16,5 +16,6 @@ export const getDefaultIgnorePatterns = () => { '**/public', '**/.storybook', '**/storybook-static', + ...ignores, ]; }; diff --git a/tsconfig.json b/tsconfig.json index 1ff2fb7..6334181 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,4 +13,10 @@ "vitest/globals" ] }, + "exclude": [ + "**/node_modules", + "**/.*/", + "dist", + "build", + ] } \ No newline at end of file