Skip to content

Commit

Permalink
Fix process.cwd mock
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Dec 1, 2023
1 parent be4da0c commit 0720cc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions src/configs/eslint/__snapshots__/config.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2806,7 +2806,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -3109,7 +3109,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -3410,7 +3410,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -3718,7 +3718,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -4052,7 +4052,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -4352,7 +4352,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -4649,7 +4649,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -4936,7 +4936,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -5241,7 +5241,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -5541,7 +5541,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -5839,7 +5839,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -6144,7 +6144,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -6477,7 +6477,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -6774,7 +6774,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -7068,7 +7068,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down Expand Up @@ -7352,7 +7352,7 @@ exports[`eslint > with options > should return a config for { language: 'TypeScr
"./tsconfig.json",
],
"sourceType": "module",
"tsconfigRootDir": "/Users/connorbar/Projects/github.com/sumup-oss/foundry",
"tsconfigRootDir": "/project/dir",
},
"plugins": [
"@typescript-eslint",
Expand Down
4 changes: 2 additions & 2 deletions src/configs/eslint/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

import process from 'process';
import { cwd } from 'process';

import { flow, mergeWith, isArray, isObject, isEmpty, uniq } from 'lodash/fp';

Expand Down Expand Up @@ -166,7 +166,7 @@ function customizeLanguage(language?: Language) {
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: process.cwd(),
tsconfigRootDir: cwd(),
project: ['./tsconfig.json'],
extraFileExtensions: ['.json'],
sourceType: 'module',
Expand Down

0 comments on commit 0720cc0

Please sign in to comment.