Skip to content

Commit dbdadd1

Browse files
committed
refactor: Remove semicolons from all sources
1 parent dc98de3 commit dbdadd1

11 files changed

Lines changed: 188 additions & 188 deletions

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ module.exports = function(config) {
6060
'**/*.js': ['sourcemap'],
6161
'**/*.map': ['sourcemap']
6262
}
63-
});
64-
};
63+
})
64+
}
6565
```
6666

6767
The code below shows a configuration of the preprocessor with remapping of source file paths in source maps using path prefixes. The object `remapPrefixes` contains path prefixes as keys, which if they are detected in a source path, will be replaced by the key value. After the first detected prefix gets replaced, other prefixes will be ignored.
@@ -81,8 +81,8 @@ module.exports = function(config) {
8181
'/otherdep/': '../node_modules/otherdep/'
8282
}
8383
}
84-
});
85-
};
84+
})
85+
}
8686
```
8787

8888
The code below shows a configuration of the preprocessor with remapping of source file paths in source maps using a callback. The function `remapSource` receives an original source path and may return a changed source path. If it returns `undefined` or other false-y result, the source path will not be changed.
@@ -99,12 +99,12 @@ module.exports = function(config) {
9999
sourceMapLoader: {
100100
remapSource(source) {
101101
if (source.startsWith('/myproject/')) {
102-
return '../src/' + source.substring(11);
102+
return '../src/' + source.substring(11)
103103
}
104104
}
105105
}
106-
});
107-
};
106+
})
107+
}
108108
```
109109

110110
The code below shows a sample configuration of the preprocessor with changing the `sourceRoot` property to a custom value, which will change the location where the debugger should locate the source files.
@@ -121,8 +121,8 @@ module.exports = function(config) {
121121
sourceMapLoader: {
122122
useSourceRoot: '/sources'
123123
}
124-
});
125-
};
124+
})
125+
}
126126
```
127127

128128
The code below shows a sample configuration of the preprocessor with changing the `sourceRoot` property using a custom function to be able to compute the value depending on the path to the bundle. The `file` argument is the Karma file object `{ path, originalPath }` for the bundle.
@@ -138,11 +138,11 @@ module.exports = function(config) {
138138
},
139139
sourceMapLoader: {
140140
useSourceRoot(file) {
141-
return '/sources';
141+
return '/sources'
142142
}
143143
}
144-
});
145-
};
144+
})
145+
}
146146
```
147147

148148
The code below shows a sample configuration of the preprocessor with source map loading also for files without the `sourceMappingURL`. The default behaviour tries loading source maps only for JavaScript files with the `sourceMappingURL` set.
@@ -158,8 +158,8 @@ module.exports = function(config) {
158158
sourceMapLoader: {
159159
onlyWithURL: false
160160
}
161-
});
162-
};
161+
})
162+
}
163163
```
164164

165165
The code below shows a sample configuration of the preprocessor with a strict error checking. A missing or an invalid source map will cause the test run fail.
@@ -176,8 +176,8 @@ module.exports = function(config) {
176176
sourceMapLoader: {
177177
strict: true
178178
}
179-
});
180-
};
179+
})
180+
}
181181
```
182182

183183
## Contributing

0 commit comments

Comments
 (0)