Skip to content

Commit

Permalink
Expand prettier and add prettierignore
Browse files Browse the repository at this point in the history
  • Loading branch information
typpo committed May 1, 2023
1 parent 94e176c commit d3873a3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .jest/setEnvVars.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
process.env.OPENAI_API_KEY = 'foo'
process.env.OPENAI_API_KEY = 'foo';
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
2 changes: 1 addition & 1 deletion .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
trailingComma: "all"
trailingComma: 'all'
singleQuote: true
printWidth: 100
9 changes: 4 additions & 5 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ import type { Config } from 'jest';

const config: Config = {
transform: {
'\\.[jt]sx?$': 'ts-jest'
'\\.[jt]sx?$': 'ts-jest',
},
globals: {
'ts-jest': {
useESM: true,
}
},
},
moduleNameMapper: {
'(.+)\\.js': '$1'
'(.+)\\.js': '$1',
},
extensionsToTreatAsEsm: ['.ts'],
setupFiles: ["<rootDir>/.jest/setEnvVars.js"],

setupFiles: ['<rootDir>/.jest/setEnvVars.js'],
};

export default config;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prepare": "tsc",
"test": "jest",
"test:watch": "jest --watch",
"format": "prettier -w src/ test/ examples/"
"format": "prettier -w ."
},
"devDependencies": {
"@types/async": "^3.2.20",
Expand Down

0 comments on commit d3873a3

Please sign in to comment.