File tree 2 files changed +14
-2
lines changed
packages/react-scripts/config
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,13 @@ module.exports = {
124
124
// First, run the linter.
125
125
// It's important to do this before Babel processes the JS.
126
126
{
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
+ } ,
128
134
enforce : 'pre' ,
129
135
use : [
130
136
{
Original file line number Diff line number Diff line change @@ -130,7 +130,13 @@ module.exports = {
130
130
// First, run the linter.
131
131
// It's important to do this before Babel processes the JS.
132
132
{
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
+ } ,
134
140
enforce : 'pre' ,
135
141
use : [
136
142
{
You can’t perform that action at this time.
0 commit comments