From ed1fec1e57f5c772638296150a0613a9de2dfcc5 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 20 Mar 2021 10:46:38 -0500 Subject: [PATCH] chore: jsx --- packages/build/package.json | 1 + packages/build/src/build/.eslint.defaults.js | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/packages/build/package.json b/packages/build/package.json index 687fc8a..a16918f 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -25,6 +25,7 @@ "@babel/eslint-parser": "^7.13.10", "@babel/plugin-proposal-class-properties": "^7.12.13", "@babel/plugin-proposal-private-methods": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", "@neutrinojs/airbnb": "^9.4.0", "@neutrinojs/banner": "^9.4.0", "@neutrinojs/copy": "^9.4.0", diff --git a/packages/build/src/build/.eslint.defaults.js b/packages/build/src/build/.eslint.defaults.js index 466db63..1dccaa0 100644 --- a/packages/build/src/build/.eslint.defaults.js +++ b/packages/build/src/build/.eslint.defaults.js @@ -1,3 +1,7 @@ +const { + LATUS_WEBPACK_CONFIG = require.resolve('@latus/build/build/webpack.config.js'), +} = process.env; + const config = { globals: { __non_webpack_require__: true, @@ -15,6 +19,7 @@ const config = { plugins: [ '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-private-methods', + '@babel/plugin-syntax-jsx', ], }, }, @@ -28,6 +33,14 @@ const config = { 'padded-blocks': ['error', {classes: 'always'}], yoda: 'off', }, + settings: { + 'import/resolver': { + node: {}, + webpack: { + config: LATUS_WEBPACK_CONFIG, + }, + }, + }, }; module.exports = config;