File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,13 @@ module.exports = {
124124 // First, run the linter.
125125 // It's important to do this before Babel processes the JS.
126126 {
127- test : / \. ( j s | j s x | m j s ) $ / ,
127+ test : function testForJsFilesExcludingBsFiles ( fileName ) {
128+ // Do not lint `*.bs.js` files, generated by BuckleScript.
129+ if ( fileName . endsWith ( '.bs.js' ) ) {
130+ return false ;
131+ }
132+ return / \. ( j s | j s x | m j s ) $ / . test ( fileName ) ;
133+ } ,
128134 enforce : 'pre' ,
129135 use : [
130136 {
Original file line number Diff line number Diff line change @@ -130,7 +130,13 @@ module.exports = {
130130 // First, run the linter.
131131 // It's important to do this before Babel processes the JS.
132132 {
133- test : / \. ( j s | j s x | m j s ) $ / ,
133+ test : function testForJsFilesExcludingBsFiles ( fileName ) {
134+ // Do not lint `*.bs.js` files, generated by BuckleScript.
135+ if ( fileName . endsWith ( '.bs.js' ) ) {
136+ return false ;
137+ }
138+ return / \. ( j s | j s x | m j s ) $ / . test ( fileName ) ;
139+ } ,
134140 enforce : 'pre' ,
135141 use : [
136142 {
You can’t perform that action at this time.
0 commit comments