Skip to content

Commit 55f453b

Browse files
committed
refactor(examples): integrate Babel parser and update parser options in ESLint config
1 parent 2c9ad13 commit 55f453b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/vite-react-dom-js-with-babel-app/eslint.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import js from "@eslint/js";
22
import react from "@eslint-react/eslint-plugin";
33
import reactHooks from "eslint-plugin-react-hooks";
44
import reactRefresh from "eslint-plugin-react-refresh";
5+
import parser from "@babel/eslint-parser";
56
import globals from "globals";
67

78
import JSCONFIG from "./jsconfig.json" with { type: "json" };
@@ -14,9 +15,13 @@ export default [
1415
globals: {
1516
...globals.browser,
1617
},
18+
parser,
1719
parserOptions: {
18-
ecmaFeatures: {
19-
jsx: true,
20+
requireConfigFile: false,
21+
babelOptions: {
22+
babelrc: false,
23+
configFile: false,
24+
presets: ["@babel/preset-env", "@babel/preset-react"],
2025
},
2126
},
2227
},

0 commit comments

Comments
 (0)