Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

fix(formatting): fix remove code formatting - fixes: #40 #41

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module.exports = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep this file please as it's for this repo, not projects being migrated.

endOfLine: 'lf',
semi: true,
singleQuote: true,
semi: false,
singleQuote: false,
quoteProps: 'preserve',
tabWidth: 2,
trailingComma: 'es5',
printWidth: 100,
printWidth: 120,
Comment on lines +3 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change these values they are set to match the config we use in the Strapi core repo

};
6 changes: 0 additions & 6 deletions bin/commands/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ const runJscodeshift = require('../../lib/v4/utils/run-jscodeshift');
registerPrompt('fuzzypath', require('inquirer-fuzzy-path'));

// global utils
const { utils } = require('../../lib/global');
const { logger } = require('../../lib/global/utils');

const { formatCode } = utils;

const fuzzyPathOptions = {
type: 'fuzzypath',
excludePath: (nodePath) =>
Expand Down Expand Up @@ -91,9 +88,6 @@ const transform = async (transform, path) => {

// execute jscodeshift's Runner
await runJscodeshift(args.path, args.type, { stdio: 'inherit', cwd: process.cwd() });

// format code with prettier
await formatCode(args.path);
} catch (error) {
logger.error(error.message);
process.exit(1);
Expand Down
46 changes: 0 additions & 46 deletions lib/global/utils/format-code.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/global/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
const formatCode = require('./format-code');
const isPathStrapiApp = require('./is-path-strapi-app');
const logger = require('./logger');
const isCleanGitRepo = require('./is-clean-git-repo');
const promptUser = require('./prompt-user');

module.exports = {
formatCode,
isPathStrapiApp,
logger,
isCleanGitRepo,
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"inquirer-fuzzy-path": "^2.3.0",
"jscodeshift": "^0.13.0",
"lodash": "^4.17.21",
"pluralize": "^8.0.0",
"prettier": "^2.4.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here can we keep prettier for this repo

"pluralize": "^8.0.0"
},
"engines": {
"node": ">=12.x.x <=16.x.x",
Expand Down
Loading