Skip to content

Commit

Permalink
fix(stark-build): fix warning messages appearing at build time
Browse files Browse the repository at this point in the history
Fix TSLint warnings for rules
  - "no-promise-as-boolean"
  - "strict-comparisons"

Remove temporary fix for Prettier warning

Exclude "google-libphonenumber" library from parsing by babel-loader in DEV build
  • Loading branch information
SuperITMan committed Mar 9, 2021
1 parent 7db18b9 commit d318519
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"no-in-misuse": false,
"no-invalid-await": false,
"no-null-undefined-union": false,
"no-promise-as-boolean": false,
"no-restricted-globals": false,
"no-misleading-array-reverse": false,
"no-redundant-boolean": false,
Expand All @@ -49,6 +50,7 @@
"restrict-plus-operands": false,
"return-undefined": false,
"strict-boolean-expressions": false,
"strict-comparisons": false,
"strict-type-predicates": false,
"unnecessary-bind": false,
"use-default-type-parameter": false,
Expand Down
7 changes: 2 additions & 5 deletions packages/stark-build/config/webpack-partial.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const fixedTSLintConfig = buildUtils.getFixedTSLintConfig(
*
* See: http://webpack.github.io/docs/configuration.html#cli
*/
module.exports = metadata => {
module.exports = (metadata) => {
const isProd = metadata.ENV === "production";
const METADATA = metadata;

Expand Down Expand Up @@ -72,9 +72,6 @@ module.exports = metadata => {
* See: https://webpack.js.org/configuration/module
*/
module: {
// FIXME Remove the following line once Prettier 2.0.0 is released. See: https://github.com/NationalBankBelgium/stark/issues/1483
noParse: /prettier\/parser-typescript/,

rules: [
/**
* TSLint loader support for *.ts files
Expand Down Expand Up @@ -145,7 +142,7 @@ module.exports = metadata => {
new HtmlWebpackPlugin({
template: "!!ejs-loader!src/index.html",
title: METADATA.TITLE,
chunksSortMode: function(a, b) {
chunksSortMode: function (a, b) {
// generated entry points will include those from styles config
// const entryPoints = ["runtime", "polyfills", "sw-register", "styles", "vendor", "main"];
// logic extracted from getBrowserConfig function in @angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js
Expand Down
2 changes: 1 addition & 1 deletion packages/stark-build/config/webpack-partial.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = webpackMerge(commonConfig(METADATA), {
*/
{
test: /node_modules.*\.js$/,
exclude: /node_modules.*(@angular|@mdi|@ng-idle|@nationalbankbelgium|@ngrx|@ngx-translate|@uirouter|cerialize|class-validator|core-js|ibantools|lodash|prettier|rxjs)/,
exclude: /node_modules.*(@angular|@mdi|@ng-idle|@nationalbankbelgium|@ngrx|@ngx-translate|@uirouter|cerialize|class-validator|core-js|google-libphonenumber|ibantools|lodash|prettier|rxjs)/,
use: {
loader: "babel-loader",
options: {
Expand Down

0 comments on commit d318519

Please sign in to comment.