Skip to content

Commit 4f94d32

Browse files
committed
v0.0.4 - Add support for decorators, class properties, .eslintrc
1 parent ca80a84 commit 4f94d32

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

Diff for: packages/react-scripts/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ Please refer to its documentation:
55

66
- [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
77
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
8+
9+
# Custom Modifications for Earthling Interactive
10+
11+
1. Support for Decorators without Typescript
12+
2. Support for Class Properties
13+
3. Support for .eslintrc

Diff for: packages/react-scripts/config/jest/babelTransform.js

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
const babelJest = require('babel-jest');
1111

1212
module.exports = babelJest.createTransformer({
13+
// Earthling Interactive Modification - START
14+
plugins: [
15+
['@babel/plugin-proposal-decorators', { legacy: true }],
16+
['@babel/plugin-proposal-class-properties', { loose: true }],
17+
],
18+
// Earthling Interactive Modification - END
1319
presets: [require.resolve('babel-preset-react-app')],
1420
babelrc: false,
1521
configFile: false,

Diff for: packages/react-scripts/config/webpack.config.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ module.exports = function(webpackEnv) {
270270
: false,
271271
},
272272
cssProcessorPluginOptions: {
273-
preset: ['default', { minifyFontValues: { removeQuotes: false } }]
274-
}
273+
preset: ['default', { minifyFontValues: { removeQuotes: false } }],
274+
},
275275
}),
276276
],
277277
// Automatically split vendor and commons
@@ -375,7 +375,9 @@ module.exports = function(webpackEnv) {
375375
};
376376
}
377377
})(),
378-
useEslintrc: false,
378+
// Earthling Interactive Modification - START
379+
useEslintrc: true,
380+
// Earthling Interactive Modification - END
379381
// @remove-on-eject-end
380382
},
381383
loader: require.resolve('eslint-loader'),
@@ -431,6 +433,10 @@ module.exports = function(webpackEnv) {
431433
),
432434
// @remove-on-eject-end
433435
plugins: [
436+
// Earthling Interactive Modification - START
437+
['@babel/plugin-proposal-decorators', { legacy: true }],
438+
['@babel/plugin-proposal-class-properties', { loose: true }],
439+
// Earthling Interactive Modification - END
434440
[
435441
require.resolve('babel-plugin-named-asset-import'),
436442
{

Diff for: packages/react-scripts/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "earthling-interactive-react-scripts",
3-
"version": "0.0.2",
2+
"name": "@earthling-interactive/react-scripts",
3+
"version": "0.0.4",
44
"description": "Configuration and scripts for Create React App customized for Earthling Interactive.",
55
"license": "MIT",
66
"engines": {
@@ -21,6 +21,7 @@
2121
"types": "./lib/react-app.d.ts",
2222
"dependencies": {
2323
"@babel/core": "7.7.5",
24+
"@babel/plugin-proposal-class-properties": "7.7.4",
2425
"@babel/plugin-proposal-decorators": "7.7.4",
2526
"@svgr/webpack": "4.3.3",
2627
"@typescript-eslint/eslint-plugin": "^2.10.0",

0 commit comments

Comments
 (0)