8000 Update prettier to v2 (#11579) · babel/babel@4108524 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4108524

Browse files
Update prettier to v2 (#11579)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
1 parent 426acf3 commit 4108524

File tree

147 files changed

+1021
-1109
lines changed

Some content is hidden

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

147 files changed

+1021
-1109
lines changed

Gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function getIndexFromPackage(name) {
3333
}
3434

3535
function compilationLogger() {
36-
return through.obj(function(file, enc, callback) {
36+
return through.obj(function (file, enc, callback) {
3737
fancyLog(`Compiling '${chalk.cyan(file.relative)}'...`);
3838
callback(null, file);
3939
});
@@ -48,7 +48,7 @@ function errorsLogger() {
4848
}
4949

5050
function rename(fn) {
51-
return through.obj(function(file, enc, callback) {
51+
return through.obj(function (file, enc, callback) {
5252
file.path = fn(file);
5353
callback(null, file);
5454
});

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
module.exports = function(api) {
3+
module.exports = function (api) {
44
const env = api.env();
55

66
const includeCoverage = process.env.BABEL_COVERAGE === "true";

codemods/babel-plugin-codemod-object-assign-to-object-spread/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import syntaxObjectRestSpread from "@babel/plugin-syntax-object-rest-spread";
22

3-
export default function({ types: t }) {
3+
export default function ({ types: t }) {
44
return {
55
inherits: syntaxObjectRestSpread,
66

codemods/babel-plugin-codemod-optional-catch-binding/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import syntaxOptionalCatchBinding from "@babel/plugin-syntax-optional-catch-binding";
22

3-
export default function({ types: t }) {
3+
export default function ({ types: t }) {
44
return {
55
inherits: syntaxOptionalCatchBinding,
66

eslint/babel-eslint-parser/src/analyze-scope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class Referencer extends OriginalReferencer {
237237
this._checkIdentifierOrVisit(name);
238238
}
239239
}
240-
scope.__define = function() {
240+
scope.__define = function () {
241241
return parentScope.__define.apply(parentScope, arguments);
242242
};
243243

eslint/babel-eslint-parser/src/convert/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import convertTokens from "./convertTokens";
22
import convertComments from "./convertComments";
33
import convertAST from "./convertAST";
44

5-
export default function(ast, code) {
5+
export default function (ast, code) {
66
ast.tokens = convertTokens(ast.tokens, code);
77
convertComments(ast.comments);
88
convertAST(ast, code);

eslint/babel-eslint-parser/test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe("Babel and Espree", () => {
8484
});
8585

8686
describe("compatibility", () => {
87-
it("should allow ast.analyze to be called without options", function() {
87+
it("should allow ast.analyze to be called without options", function () {
8888
const ast = parseForESLint("`test`", {
8989
eslintScopeManager: true,
9090
eslintVisitorKeys: true,

eslint/babel-eslint-plugin/src/rules/semi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ function report(context, node, missing) {
5757
if (!missing) {
5858
message = "Missing semicolon.";
5959
loc = loc.end;
60-
fix = function(fixer) {
60+
fix = function (fixer) {
6161
return fixer.insertTextAfter(lastToken, ";");
6262
};
6363
} else {
6464
message = "Extra semicolon.";
6565
loc = loc.start;
66-
fix = function(fixer) {
66+
fix = function (fixer) {
6767
return fixer.remove(lastToken);
6868
};
6969
}

eslint/babel-eslint-plugin/test/rules/no-invalid-this.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ function MODULES(pattern) {
5050
*/
5151
function extractPatterns(patterns, type) {
5252
// Clone and apply the pattern environment.
53-
const patternsList = patterns.map(function(pattern) {
54-
return pattern[type].map(function(applyCondition) {
53+
const patternsList = patterns.map(function (pattern) {
54+
return pattern[type].map(function (applyCondition) {
5555
const thisPattern = cloneDeep(pattern);
5656

5757
applyCondition(thisPattern);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"lodash": "^4.17.13",
5858
"mergeiterator": "^1.2.5",
5959
"output-file-sync": "^2.0.0",
60-
"prettier": "^1.19.1",
60+
"prettier": "^2.0.5",
6161
"pump": "^3.0.0",
6262
"rimraf": "^2.6.3",
6363
"rollup": "1.27.9",

0 commit comments

Comments
 (0)
0