Skip to content

Commit e354bf8

Browse files
chore(formatter): run prettier and eslint separately
1 parent b037a31 commit e354bf8

126 files changed

Lines changed: 2007 additions & 5116 deletions

File tree

Some content is hidden

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

eslint.config.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22
import tseslint from 'typescript-eslint';
33
import unusedImports from 'eslint-plugin-unused-imports';
4-
import prettier from 'eslint-plugin-prettier';
54

65
export default tseslint.config(
76
{
@@ -14,11 +13,9 @@ export default tseslint.config(
1413
plugins: {
1514
'@typescript-eslint': tseslint.plugin,
1615
'unused-imports': unusedImports,
17-
prettier,
1816
},
1917
rules: {
2018
'no-unused-vars': 'off',
21-
'prettier/prettier': 'error',
2219
'unused-imports/no-unused-imports': 'error',
2320
'no-restricted-imports': [
2421
'error',

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"@typescript-eslint/eslint-plugin": "8.31.1",
3939
"@typescript-eslint/parser": "8.31.1",
4040
"eslint": "^9.39.1",
41-
"eslint-plugin-prettier": "^5.4.1",
4241
"eslint-plugin-unused-imports": "^4.1.4",
4342
"iconv-lite": "^0.6.3",
4443
"jest": "^29.4.0",

scripts/fast-format

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ if ! [ -z "$ESLINT_FILES" ]; then
3131
fi
3232

3333
echo "==> Running prettier --write"
34-
# format things eslint didn't
35-
PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
34+
PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)"
3635
if ! [ -z "$PRETTIER_FILES" ]; then
3736
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
38-
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
39-
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
37+
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern
4038
fi

scripts/format

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ echo "==> Running eslint --fix"
88
./node_modules/.bin/eslint --fix .
99

1010
echo "==> Running prettier --write"
11-
# format things eslint didn't
12-
./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
11+
./node_modules/.bin/prettier --write --cache --cache-strategy metadata .

scripts/lint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7+
echo "==> Running prettier --check"
8+
./node_modules/.bin/prettier --check .
9+
710
echo "==> Running eslint"
811
./node_modules/.bin/eslint .
912

src/api-promise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/** @deprecated Import from ./core/api-promise instead */
2-
export * from './core/api-promise';
2+
export * from "./core/api-promise"

0 commit comments

Comments
 (0)