Skip to content

Commit

Permalink
style: default prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Nov 9, 2020
1 parent 8ef95a6 commit 562d121
Show file tree
Hide file tree
Showing 39 changed files with 2,436 additions and 2,055 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
@@ -1,7 +1,7 @@
module.exports = {
root: true,
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
extends: ["@webpack-contrib/eslint-config-webpack", "prettier"],
rules: {
'import/no-namespace': 'off',
"import/no-namespace": "off",
},
};
1 change: 0 additions & 1 deletion .prettierrc.js

This file was deleted.

12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -31,7 +31,7 @@ Then add the plugin to your `webpack` config. For example:
**webpack.config.js**

```js
const TerserPlugin = require('terser-webpack-plugin');
const TerserPlugin = require("terser-webpack-plugin");

module.exports = {
optimization: {
Expand Down Expand Up @@ -202,7 +202,7 @@ module.exports = {

// Custom logic for extract comments

const { map, code } = require('uglify-module') // Or require('./path/to/uglify-module')
const { map, code } = require("uglify-module") // Or require('./path/to/uglify-module')
.minify(file, {
/* Your options for minification */
});
Expand Down Expand Up @@ -293,7 +293,7 @@ module.exports = {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: 'all',
extractComments: "all",
}),
],
},
Expand Down Expand Up @@ -387,7 +387,7 @@ module.exports = {
minimizer: [
new TerserPlugin({
extractComments: {
condition: 'some',
condition: "some",
filename: (fileData) => {
// The "fileData" argument contains object with "filename", "basename", "query" and "hash"
return `${fileData.filename}.LICENSE.txt${fileData.query}`;
Expand Down Expand Up @@ -424,7 +424,7 @@ module.exports = {
new TerserPlugin({
extractComments: {
condition: /^\**!|@preserve|@license|@cc_on/i,
filename: 'extracted-comments.js',
filename: "extracted-comments.js",
banner: (licenseFile) => {
return `License information can be found in ${licenseFile}`;
},
Expand Down Expand Up @@ -542,7 +542,7 @@ module.exports = {
};
}

return require('uglify-js').minify(file, uglifyJsOptions);
return require("uglify-js").minify(file, uglifyJsOptions);
},
}),
],
Expand Down
4 changes: 2 additions & 2 deletions babel.config.js
Expand Up @@ -7,10 +7,10 @@ module.exports = (api) => {
return {
presets: [
[
'@babel/preset-env',
"@babel/preset-env",
{
targets: {
node: '10.13.0',
node: "10.13.0",
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
@@ -1,3 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
extends: ["@commitlint/config-conventional"],
};
4 changes: 2 additions & 2 deletions husky.config.js
@@ -1,6 +1,6 @@
module.exports = {
hooks: {
'pre-commit': 'lint-staged',
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
},
};
2 changes: 1 addition & 1 deletion jest.config.js
@@ -1,3 +1,3 @@
module.exports = {
testEnvironment: 'node',
testEnvironment: "node",
};
4 changes: 2 additions & 2 deletions lint-staged.config.js
@@ -1,4 +1,4 @@
module.exports = {
'*.js': ['eslint --fix', 'prettier --write'],
'*.{json,md,yml,css,ts}': ['prettier --write'],
"*.js": ["eslint --fix", "prettier --write"],
"*.{json,md,yml,css,ts}": ["prettier --write"],
};

0 comments on commit 562d121

Please sign in to comment.