Skip to content

Commit 7a82b40

Browse files
committed
feat: allow flow and jsx in javascript
1 parent 307725e commit 7a82b40

3 files changed

Lines changed: 39 additions & 1 deletion

File tree

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
"bump": "ncu -u -x coffeescript"
3333
},
3434
"dependencies": {
35-
"eslint-plugin-only-warn": "npm:@aminya/eslint-plugin-only-warn@^1.2.2",
3635
"@babel/core": "^7",
3736
"@babel/eslint-parser": "^7.14.3",
37+
"@babel/plugin-syntax-flow": "^7.14.5",
38+
"@babel/plugin-syntax-jsx": "^7.14.5",
3839
"@typescript-eslint/eslint-plugin": "^4.25.0",
3940
"@typescript-eslint/parser": "^4.25.0",
4041
"coffeescript": "^1",
@@ -45,6 +46,7 @@
4546
"eslint-plugin-import": "^2.23.3",
4647
"eslint-plugin-json": "^3.0.0",
4748
"eslint-plugin-node": "^11.1.0",
49+
"eslint-plugin-only-warn": "npm:@aminya/eslint-plugin-only-warn@^1.2.2",
4850
"eslint-plugin-optimize-regex": "^1.2.0",
4951
"eslint-plugin-react": "^7.23.2",
5052
"eslint-plugin-yaml": "^0.4.2",

pnpm-lock.yaml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/javascript.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ exports.jsConfig = {
99
ecmaFeatures: {
1010
jsx: true,
1111
},
12+
babelOptions: {
13+
plugins: [
14+
// enable jsx and flow syntax
15+
"@babel/plugin-syntax-flow",
16+
"@babel/plugin-syntax-jsx",
17+
],
18+
},
1219
ecmaVersion: 2021,
1320
sourceType: "module",
1421
},

0 commit comments

Comments
 (0)