Skip to content

Commit

Permalink
Add babel
Browse files Browse the repository at this point in the history
  • Loading branch information
namelivia committed Jun 9, 2020
1 parent 3009abf commit d59cc63
Show file tree
Hide file tree
Showing 10 changed files with 1,120 additions and 254 deletions.
9 changes: 9 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"parser": "babel-eslint",
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"env": {
"jest": true,
"browser": true,
"node": true
}
}
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
plugins: ['@babel/plugin-proposal-class-properties'],
}
49 changes: 20 additions & 29 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
module.exports = {
coverageDirectory: './coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'/lib/',
'/esm/',
],
coverageReporters: [
'lcov',
],
reporters: ["default", "jest-junit"],
globals: {
__DEV__: true,
'ts-jest': {
babelConfig: true,
coverageDirectory: './coverage',
coveragePathIgnorePatterns: ['/node_modules/', '/lib/', '/esm/'],
coverageReporters: ['lcov'],
reporters: ['default', 'jest-junit'],
globals: {
__DEV__: true,
'ts-jest': {
babelConfig: true,
},
},
},
roots: [
'./src',
'./tests',
],
setupFiles: [],
setupFilesAfterEnv: null,
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.ts?$': 'ts-jest',
},
verbose: false,
preset: 'ts-jest',
testMatch: null,
}
roots: ['./src', './tests'],
setupFiles: [],
setupFilesAfterEnv: null,
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.ts?$': 'ts-jest',
},
verbose: false,
preset: 'ts-jest',
testMatch: null,
}
Loading

0 comments on commit d59cc63

Please sign in to comment.