forked from webiny/webiny-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: TypeScript && improved SSR mechanisms (webiny#677)
- Loading branch information
Showing
3,238 changed files
with
83,374 additions
and
76,284 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const alias = require("@webiny/project-utils/aliases/jest"); | ||
|
||
const babel = { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
node: "8.10" | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript" | ||
], | ||
plugins: [ | ||
["@babel/plugin-proposal-class-properties"], | ||
["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }], | ||
["@babel/plugin-transform-runtime", { useESModules: false }], | ||
["babel-plugin-dynamic-import-node"], | ||
["babel-plugin-lodash"], | ||
process.env.NODE_ENV === "test" ? ["babel-plugin-module-resolver", { alias }] : null | ||
].filter(Boolean) | ||
}; | ||
|
||
module.exports = babel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
browsers: ["last 2 versions", "safari >= 7"] | ||
}, | ||
// Allow importing core-js in entrypoint and use browserlist to select polyfills | ||
useBuiltIns: "entry", | ||
// Set the corejs version we are using to avoid warnings in console | ||
// This will need to change once we upgrade to corejs@3 | ||
corejs: 3, | ||
// Do not transform modules to CJS | ||
modules: false, | ||
// Exclude transforms that make all code slower | ||
exclude: ["transform-typeof-symbol"] | ||
} | ||
], | ||
["@babel/preset-react", { useBuiltIns: true }], | ||
["@babel/preset-typescript", { isTSX: true, allExtensions: true }] | ||
], | ||
plugins: [ | ||
"babel-plugin-lodash", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-throw-expressions", | ||
[ | ||
"@babel/plugin-transform-runtime", | ||
{ | ||
corejs: false, | ||
version: require("@babel/runtime/package.json").version, | ||
regenerator: true, | ||
useESModules: false | ||
} | ||
], | ||
"@babel/plugin-proposal-optional-chaining", | ||
"@babel/plugin-proposal-nullish-coalescing-operator", | ||
["babel-plugin-emotion", { autoLabel: true }], | ||
[ | ||
"@babel/plugin-proposal-object-rest-spread", | ||
{ | ||
useBuiltIns: true | ||
} | ||
], | ||
[ | ||
"babel-plugin-named-asset-import", | ||
{ | ||
loaderMap: { | ||
svg: { | ||
ReactComponent: "@svgr/webpack![path]" | ||
} | ||
} | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
const aliases = require("@webiny/project-utils/aliases"); | ||
|
||
module.exports = { | ||
parser: "babel-eslint", | ||
extends: ["eslint:recommended", "plugin:jest/recommended", "plugin:react/recommended"], | ||
plugins: ["flowtype", "jest", "import"], | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jest/recommended", | ||
"plugin:react/recommended" | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: "module" | ||
}, | ||
plugins: ["@typescript-eslint", "jest", "import", "react"], | ||
env: { | ||
jest: true, | ||
commonjs: true, | ||
node: true, | ||
es6: true | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: "module" | ||
}, | ||
rules: { | ||
"flowtype/define-flow-type": 1, | ||
"flowtype/use-flow-type": 1, | ||
"react/prop-types": 0, | ||
"import/no-unresolved": [2, { commonjs: true, amd: true }] | ||
"import/no-unresolved": 0, // [2, { commonjs: true, amd: true }], | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-use-before-define": 0, | ||
"@typescript-eslint/no-var-requires": 0 | ||
}, | ||
settings: { | ||
flowtype: { | ||
onlyFilesWithFlowAnnotation: true | ||
}, | ||
"import/resolver": { | ||
"babel-module": { alias: aliases } | ||
react: { | ||
pragma: "React", | ||
version: "detect" | ||
} | ||
}, | ||
globals: { | ||
window: true, | ||
document: true | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,7 @@ build/ | |
.files/ | ||
.changelog | ||
.verdaccio | ||
.history | ||
.history | ||
*.tsbuildinfo | ||
.cloudfnsrc.js | ||
.cloudfns/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.