Skip to content

Commit

Permalink
fix(eslint): enable jest/no-export
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Aug 5, 2024
1 parent 551da4e commit 6a1a125
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 175 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
- run: yarn --frozen-lockfile --prefer-offline
- run: yarn build
- run: yarn dev-lib tsc
- name: test
run: |
curl -s -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter
Expand Down
2 changes: 1 addition & 1 deletion cfg/eslint-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ module.exports = {
'guard-for-in': 2,
'jest/expect-expect': 0,
'jest/no-commented-out-tests': 0,
'jest/no-export': 0, // conflicts with typescript isolatedModules
'jest/no-export': 2,
'jest/no-conditional-expect': 0,
'jest/no-disabled-tests': 0,
'@typescript-eslint/no-namespace': [
Expand Down
2 changes: 0 additions & 2 deletions scripts/script.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
test('scriptTest', () => {})

export {}
2 changes: 0 additions & 2 deletions src/some.manual.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
test('some integration test', () => {})

export {}
2 changes: 1 addition & 1 deletion src/test/cfg/eslint.config.dump.json
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@
0
],
"jest/no-export": [
0
2
],
"jest/prefer-equality-matcher": [
2
Expand Down
2 changes: 0 additions & 2 deletions src/test/empty.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
test.todo('empty')

export {}
2 changes: 0 additions & 2 deletions src/test/env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ test('APP_ENV should be `test`', () => {
test('TZ should be UTC', () => {
expect(process.env.TZ).toBe('UTC')
})

export {}
2 changes: 0 additions & 2 deletions src/test/setupJest.integration.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
console.log('setupJest.integration.ts')

export {}
2 changes: 0 additions & 2 deletions src/test/setupJest.manual.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
console.log('setupJest.manual.ts')

export {}
3 changes: 1 addition & 2 deletions src/test/setupJest.unit.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// console.log('setupJest.unit.ts')

export {}
// eslint-disable-next-line unicorn/no-empty-file
2 changes: 0 additions & 2 deletions src/test/some.integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
test('some manual test', () => {})

export {}
2 changes: 0 additions & 2 deletions src/testing/time.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ test('time should work as normal', () => {
console.log(d)
expect(d.getFullYear()).toBeGreaterThan(2018)
})

export {}
Loading

0 comments on commit 6a1a125

Please sign in to comment.