Skip to content

Commit

Permalink
Revert change on Babel paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Nov 6, 2024
1 parent 4995f50 commit c46e04e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/jsts/src/parsers/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { Linter } from 'eslint';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';

/**
* Builds ESLint parser options
Expand Down Expand Up @@ -72,15 +70,14 @@ export function buildParserOptions(initialOptions: Linter.ParserOptions, usingBa
* @returns the extend parser options
*/
function babelParserOptions(options: Linter.ParserOptions) {
const pluginPath = `${dirname(fileURLToPath(import.meta.url))}/../../../../node_modules`;
const babelOptions = {
targets: 'defaults',
presets: [
`${pluginPath}/@babel/preset-react`,
`${pluginPath}/@babel/preset-flow`,
`${pluginPath}/@babel/preset-env`,
['@babel/preset-react', {}],
['@babel/preset-flow', {}],
['@babel/preset-env', {}],
],
plugins: [[`${pluginPath}/@babel/plugin-proposal-decorators`, { version: '2022-03' }]],
plugins: [['@babel/plugin-proposal-decorators', { version: '2022-03' }]],
babelrc: false,
configFile: false,
parserOpts: {
Expand Down

0 comments on commit c46e04e

Please sign in to comment.