Skip to content

Commit 2bd7bcd

Browse files
committed
chore: remove prettier
1 parent e81785f commit 2bd7bcd

File tree

5 files changed

+2
-31
lines changed

5 files changed

+2
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default config;
5151
@tailwind base;
5252
@tailwind components;
5353
@tailwind utilities;
54-
@import "keen-slider/keen-slider.min.css";
54+
@import 'keen-slider/keen-slider.min.css';
5555

5656
* {
5757
scroll-behavior: smooth;

lint-staged.common.mjs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import path from 'path';
2-
import { quote } from 'shell-quote';
3-
4-
const isWin = process.platform === 'win32';
52

63
const eslintGlobalRulesForFix = [
74
// react-hooks/eslint and react in general is very strict about exhaustively
@@ -62,19 +59,3 @@ export const getEslintFixCmd = ({
6259
].join(' ');
6360
return `eslint ${args}`;
6461
};
65-
66-
/**
67-
* Concatenate and escape a list of filenames that can be passed as args to prettier cli
68-
*
69-
* Prettier has an issue with special characters in filenames,
70-
* such as the ones uses for nextjs dynamic routes (ie: [id].tsx...)
71-
*
72-
* @link https://github.com/okonet/lint-staged/issues/676
73-
*
74-
* @param {string[]} filenames
75-
* @returns {string} Return concatenated and escaped filenames
76-
*/
77-
export const concatFilesForPrettier = (filenames) =>
78-
filenames
79-
.map((filename) => `"${isWin ? filename : quote([filename])}"`)
80-
.join(' ');

lint-staged.config.mjs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import { fileURLToPath } from 'node:url';
55
* A good practice is to override this base configuration in each package and/or application
66
* where we are able to add customization depending on the nature of the project (eslint...).
77
*/
8-
import {
9-
concatFilesForPrettier,
10-
getEslintFixCmd,
11-
} from './lint-staged.common.mjs';
8+
import { getEslintFixCmd } from './lint-staged.common.mjs';
129

1310
/**
1411
* @type {Record<string, (filenames: string[]) => string | string[] | Promise<string | string[]>>}
@@ -26,11 +23,6 @@ const rules = {
2623
files: filenames,
2724
});
2825
},
29-
'**/*.{json,md,mdx,css,html,yml,yaml,scss,ts,js,tsx,jsx,mjs}': (
30-
filenames
31-
) => {
32-
return [`prettier --write ${concatFilesForPrettier(filenames)}`];
33-
},
3426
};
3527

3628
export default rules;

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"lint-staged": "15.2.5",
6565
"npm-run-all": "^4.1.5",
6666
"postcss": "^8.4.38",
67-
"prettier": "^3.2.5",
6867
"shell-quote": "1.8.1",
6968
"tsup": "^8.0.2",
7069
"typescript": "^5.4.5",

yarn.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,6 @@ __metadata:
959959
npm-run-all: "npm:^4.1.5"
960960
postcss: "npm:^8.4.38"
961961
postcss-js: "npm:^4.0.1"
962-
prettier: "npm:^3.2.5"
963962
sade: "npm:^1.8.1"
964963
shell-quote: "npm:1.8.1"
965964
tsup: "npm:^8.0.2"

0 commit comments

Comments
 (0)