Skip to content

Commit 335f224

Browse files
authored
fix: run lint after build (#3359)
1 parent 2d3fe2b commit 335f224

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ jobs:
1010
- common/setup-node
1111
- run:
1212
name: Build
13-
command: pnpm run build
13+
command: |
14+
pnpm run build
15+
- run:
16+
name: Lint
17+
command: |
18+
pnpm run lint
1419
- persist_to_workspace:
1520
root: .
1621
paths:
@@ -46,6 +51,7 @@ jobs:
4651
NODE_OPTIONS: --max-old-space-size=6144 # 75% of 8GB which is the memory of large resource class
4752
JEST_JUNIT_OUTPUT_DIR: ./test-results
4853
JEST_JUNIT_ADD_FILE_ATTRIBUTE: "true"
54+
JEST_JUNIT_FILE_PATH_PREFIX: "/home/circleci/project/"
4955
- store_test_results:
5056
path: ./test-results
5157
- store_artifacts:

__tests__/feeds.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,10 +2910,10 @@ describe('function feedToFilters', () => {
29102910
},
29112911
]);
29122912
const filters = await feedToFilters(con, '1', '1');
2913-
expect(filters.excludeSources).toEqual([
2914-
'excludedSource',
2915-
'settingsCombinationSource',
2916-
]);
2913+
expect(filters.excludeSources).toEqual(
2914+
expect.arrayContaining(['excludedSource', 'settingsCombinationSource']),
2915+
);
2916+
expect(filters.excludeSources).toHaveLength(2);
29172917
});
29182918

29192919
it('should return filters having following sources based on content preference', async () => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"lint": "eslint . --ext .js,.ts --max-warnings 0",
2424
"start": "pnpm run cli api",
2525
"start:background": "pnpm run cli background",
26-
"pretest": "pnpm run lint && cross-env NODE_ENV=test pnpm run db:migrate:reset",
26+
"pretest": "cross-env NODE_ENV=test pnpm run db:migrate:reset",
2727
"test": "jest --testEnvironment=node --runInBand",
2828
"typeorm": "typeorm-ts-node-commonjs",
2929
"prepare": "corepack enable || true"

0 commit comments

Comments
 (0)