mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-01 12:29:49 +01:00
TypeScript & Jest setup cleanup
This commit is contained in:
parent
0576e4f662
commit
24e0b2e8f9
3
babel.config.js
Normal file
3
babel.config.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: ['babel-preset-gatsby', '@babel/preset-typescript']
|
||||
}
|
@ -231,7 +231,6 @@ module.exports = {
|
||||
'gatsby-redirect-from',
|
||||
'gatsby-plugin-meta-redirect',
|
||||
'gatsby-plugin-offline',
|
||||
'gatsby-plugin-typescript',
|
||||
'gatsby-plugin-webpack-size'
|
||||
// {
|
||||
// resolve: 'gatsby-plugin-webpack-bundle-analyser-v2',
|
||||
|
@ -1,16 +1,10 @@
|
||||
module.exports = {
|
||||
transform: {
|
||||
'^.+\\.(tsx?|jsx?)$': 'ts-jest',
|
||||
'^.+\\.jsx?$': '<rootDir>/jest/jest-preprocess.js'
|
||||
},
|
||||
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.([tj]sx?)$',
|
||||
moduleNameMapper: {
|
||||
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
|
||||
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
'<rootDir>/jest/__mocks__/file-mock.js',
|
||||
'\\.svg': '<rootDir>/jest/__mocks__/svgr-mock.js'
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||
testPathIgnorePatterns: ['node_modules', '.cache', 'public', 'coverage'],
|
||||
transformIgnorePatterns: ['node_modules/(?!(gatsby)/)'],
|
||||
globals: {
|
||||
|
@ -1,7 +0,0 @@
|
||||
const { createTransformer } = require('babel-jest')
|
||||
|
||||
const babelOptions = {
|
||||
presets: ['babel-preset-gatsby', '@babel/preset-typescript']
|
||||
}
|
||||
|
||||
module.exports = createTransformer(babelOptions)
|
4548
package-lock.json
generated
4548
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,6 @@
|
||||
"gatsby-plugin-sharp": "^2.6.2",
|
||||
"gatsby-plugin-sitemap": "^2.4.2",
|
||||
"gatsby-plugin-svgr": "^2.0.2",
|
||||
"gatsby-plugin-typescript": "^2.4.2",
|
||||
"gatsby-plugin-use-dark-mode": "^1.1.2",
|
||||
"gatsby-plugin-webpack-size": "^1.0.0",
|
||||
"gatsby-redirect-from": "^0.2.1",
|
||||
@ -91,7 +90,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/node": "^7.8.7",
|
||||
"@babel/preset-env": "^7.9.6",
|
||||
"@babel/preset-typescript": "^7.9.0",
|
||||
"@svgr/webpack": "^5.4.0",
|
||||
"@testing-library/jest-dom": "^5.6.0",
|
||||
@ -111,7 +109,6 @@
|
||||
"@typescript-eslint/parser": "^2.31.0",
|
||||
"@welldone-software/why-did-you-render": "^4.2.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^25.5.1",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-loader": "^4.0.2",
|
||||
@ -123,7 +120,7 @@
|
||||
"fs-extra": "^9.0.0",
|
||||
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.9",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^25.5.4",
|
||||
"jest": "^26.0.1",
|
||||
"markdownlint-cli": "^0.23.0",
|
||||
"node-iptc": "^1.0.5",
|
||||
"node-sass": "^4.14.1",
|
||||
@ -136,7 +133,6 @@
|
||||
"stylelint-config-prettier": "^8.0.1",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"stylelint-prettier": "^1.1.2",
|
||||
"ts-jest": "^25.5.0",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user