Skip to content

Commit 08897a1

Browse files
committed
Force Prettier to fail
1 parent 5b3d1e1 commit 08897a1

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed

.eslintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"plugins": ["prettier"],
3+
"rules": {
4+
"prettier/prettier": "error"
5+
},
26
"overrides": [
37
{
48
"env": {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"eslint-config-prettier": "^8.8.0",
3838
"eslint-plugin-import": "^2.27.5",
3939
"eslint-plugin-n": "^15.7.0",
40+
"eslint-plugin-prettier": "^4.2.1",
4041
"eslint-plugin-promise": "^6.1.1",
4142
"html-webpack-plugin": "^5.5.1",
4243
"merge-jsons-webpack-plugin": "^2.0.1",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"alwaysStrict": true,
1313
"noUnusedLocals": true,
1414
"noImplicitReturns": true,
15-
"forceConsistentCasingInFileNames": true,
15+
"forceConsistentCasingInFileNames": true
1616
}
1717
}

webpack.common.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
66
module.exports = (env, argv) => {
77
const browser = env.BROWSER ?? 'chrome';
88
return {
9-
entry: { background: './src/background/index.ts', content: './src/content/index.ts', options: './src/options/options.ts' },
9+
entry: {
10+
background: './src/background/index.ts',
11+
content: './src/content/index.ts',
12+
options: './src/options/options.ts',
13+
},
1014
output: {
1115
filename: '[name].bundle.js',
1216
path: path.resolve(__dirname, `dist/${browser}`),
@@ -25,19 +29,17 @@ module.exports = (env, argv) => {
2529
extensions: ['.tsx', '.ts', '.js'],
2630
},
2731
experiments: {
28-
topLevelAwait: true
32+
topLevelAwait: true,
2933
},
3034
plugins: [
3135
new HtmlWebpackPlugin({
3236
filename: 'options.html',
3337
template: './src/options/options.html',
3438
chunks: [],
35-
minify: argv.mode === 'production'
39+
minify: argv.mode === 'production',
3640
}),
3741
new CopyPlugin({
38-
patterns: [
39-
{ from: './src/icons', to: 'icons' },
40-
],
42+
patterns: [{ from: './src/icons', to: 'icons' }],
4143
}),
4244
new MergeJsonWebpackPlugin({
4345
space: 2,

webpack.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ module.exports = (env) => {
77
devtool: 'inline-source-map',
88
};
99
return merge(common(env, argv), {
10-
...argv
10+
...argv,
1111
});
1212
};

webpack.prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ module.exports = (env) => {
66
mode: 'production',
77
};
88
return merge(common(env, argv), {
9-
...argv
9+
...argv,
1010
});
1111
};

0 commit comments

Comments
 (0)