Skip to content

Commit

Permalink
Merge pull request #1212 from KaiVolland/typescript
Browse files Browse the repository at this point in the history
Introduces TypeScript
  • Loading branch information
KaiVolland committed Nov 12, 2019
2 parents c27163e + 7d36aad commit 122baf6
Show file tree
Hide file tree
Showing 126 changed files with 6,608 additions and 6,656 deletions.
51 changes: 0 additions & 51 deletions .eslint-common.js

This file was deleted.

5 changes: 0 additions & 5 deletions .eslint-src.js

This file was deleted.

38 changes: 36 additions & 2 deletions .eslint-styleguide.js
@@ -1,11 +1,45 @@
module.exports = {
"extends": [
".eslint-common.js"
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"react",
"markdown"
],
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"globals": {
"Promise": false
},
"rules": {
"react/react-in-jsx-scope": "off",
"no-console": "off",
"semi": "off",
"require-jsdoc": "off"
"require-jsdoc": "off",
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"one-var": ["error", "never"],
"no-confusing-arrow": "error",
"no-unused-vars": ["error", {
"ignoreRestSiblings": true
}],
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"react/jsx-tag-spacing": ["error", {
"beforeSelfClosing": "always"
}],
"space-infix-ops": ["error", { "int32Hint": false }]
},
"settings": {
"react": {
"version": "16.0"
}
}
};
Empty file removed .eslintignore
Empty file.
3 changes: 2 additions & 1 deletion .vscode/settings.json
@@ -1,5 +1,6 @@
{
"eslint.options": {
"configFile": ".eslint-src.js"
}
},
"typescript.tsdk": "node_modules/typescript/lib"
}
13 changes: 1 addition & 12 deletions babel.config.js
@@ -1,25 +1,14 @@
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-typescript',
'@babel/preset-react'
],
env: {
test: {
plugins: [
'@babel/plugin-transform-modules-commonjs'
]
},
build: {
plugins: [
[
'module-resolver',
{
resolvePath(sourcePath) {
return sourcePath.replace('.jsx', '.js');
}
}
]
]
}
},
plugins: [
Expand Down
12 changes: 8 additions & 4 deletions jest.config.js
Expand Up @@ -2,7 +2,8 @@ module.exports = {
testURL: 'http://localhost/',
moduleFileExtensions: [
'js',
'jsx'
'ts',
'tsx'
],
moduleDirectories: [
'node_modules'
Expand All @@ -26,10 +27,13 @@ module.exports = {
'<rootDir>/jest/__mocks__/shim.js',
'<rootDir>/jest/setup.js'
],
collectCoverage: false,
transform: {
'^.+\\.jsx?$': '<rootDir>/node_modules/babel-jest',
'^.+\\.tsx?$': '<rootDir>/node_modules/babel-jest'
},
collectCoverageFrom: [
'src/**/*.jsx',
'src/**/*.js',
'src/**/*.{tsx}',
'src/**/*.{ts,js}',
'!src/**/*example*.*'
],
coverageDirectory: '<rootDir>/coverage',
Expand Down
1 change: 1 addition & 0 deletions jest/setup.js
@@ -1,3 +1,4 @@
import '@babel/polyfill';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { XMLSerializer } from 'xmldom';
Expand Down

0 comments on commit 122baf6

Please sign in to comment.