Skip to content

Commit

Permalink
Babel presets as objects instead of paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Nov 4, 2024
1 parent 13c7508 commit d802ab1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/jsts/src/parsers/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { Linter } from 'eslint';
import { default as babelFlowPreset } from '@babel/preset-flow';
import { default as babelReactPreset } from '@babel/preset-react';
import { default as babelEnvPreset } from '@babel/preset-env';
import babelDecoratorProposalPlugin from '@babel/plugin-proposal-decorators';

/**
* Builds ESLint parser options
Expand Down Expand Up @@ -76,8 +72,12 @@ export function buildParserOptions(initialOptions: Linter.ParserOptions, usingBa
function babelParserOptions(options: Linter.ParserOptions) {
const babelOptions = {
targets: 'defaults',
presets: [babelReactPreset, babelFlowPreset, babelEnvPreset],
plugins: [[babelDecoratorProposalPlugin, { version: '2022-03' }]],
presets: [
['@babel/preset-react', {}],
['@babel/preset-flow', {}],
['@babel/preset-env', {}],
],
plugins: [['@babel/plugin-proposal-decorators', { version: '2022-03' }]],
babelrc: false,
configFile: false,
parserOpts: {
Expand Down

0 comments on commit d802ab1

Please sign in to comment.