Skip to content

Commit db8e1e2

Browse files
authored
Update files to match new Prettier settings (#15030)
1 parent 790f6d7 commit db8e1e2

File tree

894 files changed

+8092
-8105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

894 files changed

+8092
-8105
lines changed

.eslintrc

+3-15
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"plugin:@typescript-eslint/recommended",
1212
"plugin:import/errors",
1313
"plugin:import/warnings",
14-
"plugin:import/typescript"
14+
"plugin:import/typescript",
15+
"prettier"
1516
],
1617
"rules": {
1718
// Overriding ESLint rules with Typescript-specific ones
@@ -40,14 +41,7 @@
4041
"no-useless-constructor": "off",
4142
"@typescript-eslint/no-useless-constructor": "error",
4243
"@typescript-eslint/no-var-requires": "off",
43-
// Overriding formatting rules to let Prettier handle them
44-
"comma-dangle": "off",
45-
"function-paren-newline": "off",
46-
"implicit-arrow-linebreak": "off",
47-
"indent": "off",
48-
"max-len": "off",
49-
"object-curly-newline": ["error", {"ImportDeclaration": {"consistent": true}}],
50-
"operator-linebreak": "off",
44+
5145
// Other rules
5246
"class-methods-use-this": ["error", {"exceptMethods": ["dispose"]}],
5347
"func-names": "off",
@@ -63,12 +57,6 @@
6357
"import/prefer-default-export": "off",
6458
"linebreak-style": "off",
6559
"no-await-in-loop": "off",
66-
"no-confusing-arrow": [
67-
"error",
68-
{
69-
"allowParens": true
70-
}
71-
],
7260
"no-console": "off",
7361
"no-control-regex": "off",
7462
"no-extend-native": "off",

.prettierignore

-3
This file was deleted.

.prettierrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
printWidth: 120,
44
tabWidth: 4,
55
endOfLine: 'auto',
6-
trailingComma: 'none',
6+
trailingComma: 'all',
77
overrides: [
88
{
99
files: ['*.yml', '*.yaml'],

build/webpack/common.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports.nodeModulesToExternalize = [
2424
'diff-match-patch',
2525
'sudo-prompt',
2626
'node-stream-zip',
27-
'xml2js'
27+
'xml2js',
2828
];
2929
exports.nodeModulesToReplacePaths = [...exports.nodeModulesToExternalize];
3030
function getDefaultPlugins(name) {
@@ -37,8 +37,8 @@ function getDefaultPlugins(name) {
3737
reportFilename: `${name}.analyzer.html`,
3838
generateStatsFile: true,
3939
statsFilename: `${name}.stats.json`,
40-
openAnalyzer: false // Open file manually if you want to see it :)
41-
})
40+
openAnalyzer: false, // Open file manually if you want to see it :)
41+
}),
4242
);
4343
}
4444
return plugins;

build/webpack/plugins/less-plugin-base64.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Base64Visitor {
3636
'data-uri',
3737
[new Base64MimeTypeNode(), URLNode.value],
3838
URLNode.index || 0,
39-
URLNode.currentFileInfo
39+
URLNode.currentFileInfo,
4040
);
4141
}
4242
}

build/webpack/webpack.extension.config.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,40 @@ const config = {
1515
mode: 'production',
1616
target: 'node',
1717
entry: {
18-
extension: './src/client/extension.ts'
18+
extension: './src/client/extension.ts',
1919
},
2020
devtool: 'source-map',
2121
node: {
22-
__dirname: false
22+
__dirname: false,
2323
},
2424
module: {
2525
rules: [
2626
{
2727
test: /\.ts$/,
2828
use: [
2929
{
30-
loader: path.join(__dirname, 'loaders', 'externalizeDependencies.js')
31-
}
32-
]
30+
loader: path.join(__dirname, 'loaders', 'externalizeDependencies.js'),
31+
},
32+
],
3333
},
3434
{
3535
test: /\.ts$/,
3636
exclude: /node_modules/,
3737
use: [
3838
{
39-
loader: 'ts-loader'
40-
}
41-
]
39+
loader: 'ts-loader',
40+
},
41+
],
4242
},
4343
{
4444
test: /\.node$/,
4545
use: [
4646
{
47-
loader: 'node-loader'
48-
}
49-
]
50-
}
51-
]
47+
loader: 'node-loader',
48+
},
49+
],
50+
},
51+
],
5252
},
5353
externals: ['vscode', 'commonjs', ...existingModulesInOutDir],
5454
plugins: [...common.getDefaultPlugins('extension')],
@@ -57,17 +57,17 @@ const config = {
5757
// Pointing pdfkit to a dummy js file so webpack doesn't fall over.
5858
// Since pdfkit has been externalized (it gets updated with the valid code by copying the pdfkit files
5959
// into the right destination).
60-
pdfkit: path.resolve(__dirname, 'pdfkit.js')
60+
pdfkit: path.resolve(__dirname, 'pdfkit.js'),
6161
},
6262
extensions: ['.ts', '.js'],
63-
plugins: [new tsconfig_paths_webpack_plugin.TsconfigPathsPlugin({ configFile: configFileName })]
63+
plugins: [new tsconfig_paths_webpack_plugin.TsconfigPathsPlugin({ configFile: configFileName })],
6464
},
6565
output: {
6666
filename: '[name].js',
6767
path: path.resolve(constants.ExtensionRootDir, 'out', 'client'),
6868
libraryTarget: 'commonjs2',
69-
devtoolModuleFilenameTemplate: '../../[resource-path]'
70-
}
69+
devtoolModuleFilenameTemplate: '../../[resource-path]',
70+
},
7171
};
7272
// tslint:disable-next-line:no-default-export
7373
exports.default = config;

build/webpack/webpack.extension.dependencies.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ const config = {
1818
entry: entryItems,
1919
devtool: 'source-map',
2020
node: {
21-
__dirname: false
21+
__dirname: false,
2222
},
2323
module: {},
2424
externals: ['vscode', 'commonjs'],
2525
plugins: [
2626
...common.getDefaultPlugins('dependencies'),
2727
// vsls requires our package.json to be next to node_modules. It's how they
2828
// 'find' the calling extension.
29-
new copyWebpackPlugin([{ from: './package.json', to: '.' }])
29+
new copyWebpackPlugin([{ from: './package.json', to: '.' }]),
3030
],
3131
resolve: {
32-
extensions: ['.js']
32+
extensions: ['.js'],
3333
},
3434
output: {
3535
filename: '[name].js',
3636
path: path.resolve(constants.ExtensionRootDir, 'out', 'client'),
3737
libraryTarget: 'commonjs2',
38-
devtoolModuleFilenameTemplate: '../../[resource-path]'
39-
}
38+
devtoolModuleFilenameTemplate: '../../[resource-path]',
39+
},
4040
};
4141
// tslint:disable-next-line:no-default-export
4242
exports.default = config;

0 commit comments

Comments
 (0)