Skip to content

Commit 176dc26

Browse files
committed
style: fix indentation in configuration files
Standardize whitespace by converting spaces to tabs across all Webpack configuration files to align with project linting standards.
1 parent 16ccad9 commit 176dc26

File tree

6 files changed

+218
-218
lines changed

6 files changed

+218
-218
lines changed

config/entries.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
app: ['./src/js/index.js', './src/scss/style.scss'],
3-
editor: ['./src/js/editor.js', './src/scss/editor.scss'],
4-
'post-build': './src/js/post-build.js',
5-
login: './src/scss/login.scss',
2+
app: ['./src/js/index.js', './src/scss/style.scss'],
3+
editor: ['./src/js/editor.js', './src/scss/editor.scss'],
4+
'post-build': './src/js/post-build.js',
5+
login: './src/scss/login.scss',
66
}

config/loaders.js

Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -5,123 +5,123 @@ const nodeModulesPath = path.resolve(__dirname, '../node_modules')
55
const browserslistConfig = require('@wordpress/browserslist-config')
66

77
function isEditor(loaderContext) {
8-
return loaderContext.resource.indexOf('editor.scss') > -1
8+
return loaderContext.resource.indexOf('editor.scss') > -1
99
}
1010

1111
module.exports = {
12-
get: function (mode) {
13-
const isProduction = mode === 'production'
12+
get: function (mode) {
13+
const isProduction = mode === 'production'
1414

15-
return [
16-
/* FontsLoader */ {
17-
test: /\.(woff|woff2)$/,
18-
type: 'asset/resource',
19-
include: [srcPath + '/fonts', nodeModulesPath + '/@fontsource-variable', nodeModulesPath + '/@fontsource'],
20-
generator: {
21-
filename: 'fonts/[name][ext][query]',
22-
},
23-
},
24-
/* ImagesLoader */ {
25-
test: /\.(png|jpe?g|gif|svg|avif|webp)$/,
26-
type: 'asset/resource',
27-
exclude: /icons/,
28-
include: srcPath + '/img',
29-
generator: {
30-
filename: 'images/[name][ext][query]',
31-
},
32-
},
33-
/* JSLoader */ {
34-
test: /\.js$/i,
35-
include: srcPath + '/js',
36-
use: {
37-
loader: 'esbuild-loader',
38-
options: {
39-
loader: 'js',
40-
target: 'es2016',
41-
legalComments: 'inline',
42-
},
43-
},
44-
},
45-
/* SCSSLoader */ {
46-
test: /\.(scss|css)$/,
47-
include: srcPath + '/scss',
48-
use: [
49-
MiniCssExtractPlugin.loader,
50-
{
51-
loader: 'css-loader',
52-
options: {
53-
url: true,
54-
esModule: false,
55-
importLoaders: 1,
56-
},
57-
},
58-
{
59-
loader: 'postcss-loader',
60-
options: {
61-
postcssOptions: function (loaderContext) {
62-
let obj = {
63-
plugins: {
64-
'postcss-import': {},
65-
'postcss-preset-env': {
66-
browsers: browserslistConfig,
67-
stage: 2,
68-
features: {
69-
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values
70-
// https://stackoverflow.com/questions/64565180/how-to-prevent-postcss-preset-env-from-removing-css-logical-properties#answer-66966232
71-
// Use stage 2 features + disable logical properties and values rule
72-
'logical-properties-and-values': false,
73-
},
74-
},
75-
'postcss-pxtorem': { propWhiteList: [] },
76-
'postcss-sort-media-queries': {},
77-
},
78-
}
15+
return [
16+
/* FontsLoader */ {
17+
test: /\.(woff|woff2)$/,
18+
type: 'asset/resource',
19+
include: [srcPath + '/fonts', nodeModulesPath + '/@fontsource-variable', nodeModulesPath + '/@fontsource'],
20+
generator: {
21+
filename: 'fonts/[name][ext][query]',
22+
},
23+
},
24+
/* ImagesLoader */ {
25+
test: /\.(png|jpe?g|gif|svg|avif|webp)$/,
26+
type: 'asset/resource',
27+
exclude: /icons/,
28+
include: srcPath + '/img',
29+
generator: {
30+
filename: 'images/[name][ext][query]',
31+
},
32+
},
33+
/* JSLoader */ {
34+
test: /\.js$/i,
35+
include: srcPath + '/js',
36+
use: {
37+
loader: 'esbuild-loader',
38+
options: {
39+
loader: 'js',
40+
target: 'es2016',
41+
legalComments: 'inline',
42+
},
43+
},
44+
},
45+
/* SCSSLoader */ {
46+
test: /\.(scss|css)$/,
47+
include: srcPath + '/scss',
48+
use: [
49+
MiniCssExtractPlugin.loader,
50+
{
51+
loader: 'css-loader',
52+
options: {
53+
url: true,
54+
esModule: false,
55+
importLoaders: 1,
56+
},
57+
},
58+
{
59+
loader: 'postcss-loader',
60+
options: {
61+
postcssOptions: function (loaderContext) {
62+
let obj = {
63+
plugins: {
64+
'postcss-import': {},
65+
'postcss-preset-env': {
66+
browsers: browserslistConfig,
67+
stage: 2,
68+
features: {
69+
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values
70+
// https://stackoverflow.com/questions/64565180/how-to-prevent-postcss-preset-env-from-removing-css-logical-properties#answer-66966232
71+
// Use stage 2 features + disable logical properties and values rule
72+
'logical-properties-and-values': false,
73+
},
74+
},
75+
'postcss-pxtorem': { propWhiteList: [] },
76+
'postcss-sort-media-queries': {},
77+
},
78+
}
7979

80-
if (isProduction && !isEditor(loaderContext)) {
81-
obj.plugins.cssnano = {}
82-
}
80+
if (isProduction && !isEditor(loaderContext)) {
81+
obj.plugins.cssnano = {}
82+
}
8383

84-
return obj
85-
},
86-
},
87-
},
88-
{
89-
loader: 'sass-loader',
90-
options: {
91-
sassOptions: function (loaderContext) {
92-
let obj = {
93-
quietDeps: true,
94-
sourceMap: true,
95-
}
84+
return obj
85+
},
86+
},
87+
},
88+
{
89+
loader: 'sass-loader',
90+
options: {
91+
sassOptions: function (loaderContext) {
92+
let obj = {
93+
quietDeps: true,
94+
sourceMap: true,
95+
}
9696

97-
if (isProduction && isEditor(loaderContext)) {
98-
obj.outputStyle = 'expanded'
99-
}
97+
if (isProduction && isEditor(loaderContext)) {
98+
obj.outputStyle = 'expanded'
99+
}
100100

101-
return obj
102-
},
103-
},
104-
},
105-
],
106-
},
107-
/* SVGLoader */ {
108-
test: /\.svg$/,
109-
include: srcPath + '/img/icons',
110-
use: [
111-
{
112-
loader: 'svg-sprite-loader',
113-
options: {
114-
extract: true,
115-
publicPath: 'icons/',
116-
spriteFilename: (svgPath) => `${/icons([\\|/])(.*?)\1/gm.exec(svgPath)[2]}.svg`,
117-
symbolId: (filePath) => `icon-${path.basename(filePath).slice(0, -4)}`,
118-
},
119-
},
120-
{
121-
loader: 'svgo-loader',
122-
},
123-
],
124-
},
125-
]
126-
},
101+
return obj
102+
},
103+
},
104+
},
105+
],
106+
},
107+
/* SVGLoader */ {
108+
test: /\.svg$/,
109+
include: srcPath + '/img/icons',
110+
use: [
111+
{
112+
loader: 'svg-sprite-loader',
113+
options: {
114+
extract: true,
115+
publicPath: 'icons/',
116+
spriteFilename: (svgPath) => `${/icons([\\|/])(.*?)\1/gm.exec(svgPath)[2]}.svg`,
117+
symbolId: (filePath) => `icon-${path.basename(filePath).slice(0, -4)}`,
118+
},
119+
},
120+
{
121+
loader: 'svgo-loader',
122+
},
123+
],
124+
},
125+
]
126+
},
127127
}

config/svgo.config.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
module.exports = {
2-
plugins: [
3-
{ cleanupAttrs: true },
4-
{ removeDoctype: true },
5-
{ removeXMLProcInst: true },
6-
{ removeComments: true },
7-
{ removeMetadata: true },
8-
{ removeTitle: true },
9-
{ removeDesc: true },
10-
{ removeUselessDefs: true },
11-
{ removeEditorsNSData: true },
12-
{ removeEmptyAttrs: true },
13-
{ removeHiddenElems: true },
14-
{ removeEmptyText: true },
15-
{ removeEmptyContainers: true },
16-
{ cleanupEnableBackground: true },
17-
{ convertStyleToAttrs: true },
18-
{ convertColors: true },
19-
{ convertPathData: true },
20-
{ convertTransform: true },
21-
{ removeUnknownsAndDefaults: true },
22-
{ removeNonInheritableGroupAttrs: true },
23-
{ removeUselessStrokeAndFill: true },
24-
{ removeUnusedNS: true },
25-
{ cleanupIDs: true },
26-
{ cleanupNumericValues: true },
27-
{ moveElemsAttrsToGroup: true },
28-
{ moveGroupAttrsToElems: true },
29-
{ collapseGroups: true },
30-
{ removeRasterImages: false },
31-
{ mergePaths: true },
32-
{ convertShapeToPath: true },
33-
{ sortAttrs: true },
34-
{ removeDimensions: false },
35-
{ prefixIds: true },
36-
{ removeViewBox: false },
37-
],
2+
plugins: [
3+
{ cleanupAttrs: true },
4+
{ removeDoctype: true },
5+
{ removeXMLProcInst: true },
6+
{ removeComments: true },
7+
{ removeMetadata: true },
8+
{ removeTitle: true },
9+
{ removeDesc: true },
10+
{ removeUselessDefs: true },
11+
{ removeEditorsNSData: true },
12+
{ removeEmptyAttrs: true },
13+
{ removeHiddenElems: true },
14+
{ removeEmptyText: true },
15+
{ removeEmptyContainers: true },
16+
{ cleanupEnableBackground: true },
17+
{ convertStyleToAttrs: true },
18+
{ convertColors: true },
19+
{ convertPathData: true },
20+
{ convertTransform: true },
21+
{ removeUnknownsAndDefaults: true },
22+
{ removeNonInheritableGroupAttrs: true },
23+
{ removeUselessStrokeAndFill: true },
24+
{ removeUnusedNS: true },
25+
{ cleanupIDs: true },
26+
{ cleanupNumericValues: true },
27+
{ moveElemsAttrsToGroup: true },
28+
{ moveGroupAttrsToElems: true },
29+
{ collapseGroups: true },
30+
{ removeRasterImages: false },
31+
{ mergePaths: true },
32+
{ convertShapeToPath: true },
33+
{ sortAttrs: true },
34+
{ removeDimensions: false },
35+
{ prefixIds: true },
36+
{ removeViewBox: false },
37+
],
3838
}

0 commit comments

Comments
 (0)