Skip to content

Commit

Permalink
ci: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed May 28, 2024
1 parent 55d37a9 commit 2b2695f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
- name: 📥 Install Dependencies
run: yarn --frozen-lockfile

- name: Build
run: |
yarn build
- name: Linter
run: |
yarn lint
Expand All @@ -59,6 +63,3 @@ jobs:
run: |
yarn test
- name: Build
run: |
yarn build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/define-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { defineFlatConfig, FlatESLintConfig } from 'eslint-define-config';
import { getDefaultIgnorePatterns } from './getDefaultIgnorePatterns.js';

export const defineConfig = (
config: ReadonlyArray<FlatESLintConfig>
config: ReadonlyArray<FlatESLintConfig>,
ignores: string[] = []
): FlatESLintConfig[] => {
return defineFlatConfig(
config.concat({
ignores: getDefaultIgnorePatterns(),
ignores: getDefaultIgnorePatterns(ignores),
})
);
};
15 changes: 8 additions & 7 deletions src/getDefaultIgnorePatterns.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
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',
'**/dist',
'**/public',
'**/.storybook',
'**/storybook-static',
...ignores,
];
};
6 changes: 6 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
"vitest/globals"
]
},
"exclude": [
"**/node_modules",
"**/.*/",
"dist",
"build",
]
}

0 comments on commit 2b2695f

Please sign in to comment.