-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(repo): Extend linting * fix(repo): Add backend dep to integation tests * chore(repo): Run Prettier * chore(repo): Update rules to be more in-line with current expectations * chore(repo): Run Prettier * chore(repo): Update precommit call to eslint fix * chore(repo): Test without local dependencies * chore(repo): Update ESLint dependencies * chore(repo): Remove integration from eslint * fix(*): Rebase formatting issues * chore(clerk-js): Temp disable typeof issue * chore(repo): ESLint auto-fix (#1978) * refactor(repo): Speed up linting staged files * chore(repo): Temp disable @typescript-eslint/no-duplicate-type-constituents * chore(repo): Include mjs in precommit hook * chore(repo): Remove integration from npm workspaces
- Loading branch information
Showing
66 changed files
with
3,408 additions
and
2,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'eslint-config-custom': minor | ||
--- | ||
|
||
Extends ESLint capabilities for individual packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,42 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
############################## | ||
# Determine Staged Packages | ||
############################## | ||
|
||
staged_files=$(git diff --name-only --cached --diff-filter=ACM) | ||
|
||
# Initialize an empty string to hold the unique folder paths | ||
unique_folders="" | ||
|
||
# Loop through each staged file | ||
for file in $staged_files; do | ||
# Extract the first two folders from the file path | ||
folder=$(echo $file | awk -F'/' '{print $1 "/" $2}') | ||
|
||
# Filter files which end with .mjs, .js, .jsx, .ts, or .tsx [NOTE: Should match ./.lintstagedrc.json] | ||
if [[ $file =~ \.(mjs|js|jsx|ts|tsx)$ ]]; then | ||
# Check if this folder is already in the list of unique folders | ||
if [[ $folder == packages/* ]] && [[ ! " $unique_folders " =~ "$folder" ]]; then | ||
# Append the folder to the list of unique folders | ||
unique_folders="$unique_folders --filter={./$folder}^..." | ||
fi | ||
fi | ||
done | ||
|
||
############################## | ||
# Build Staged Packages | ||
############################## | ||
|
||
if [ -n "$unique_folders" ]; then | ||
npx turbo run build --output-logs=errors-only $unique_folders | ||
else | ||
echo "SKIPPING: No packages to build" | ||
fi | ||
|
||
############################## | ||
# Run Lint Staged | ||
############################## | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"*.{mjs,js,jsx,ts,tsx}": ["npx prettier --write", "npx eslint --fix"], | ||
"*.{mjs,js,jsx,ts,tsx}": ["npx eslint --fix", "npx prettier --write"], | ||
"*.{json,md,mdx}": ["npx prettier --write"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// TODO: All rules below should be set to their defaults | ||
// when we're able to make the appropriate changes. | ||
const disabledRules = { | ||
'playwright/expect-expect': 'off', | ||
'playwright/no-skipped-test': 'off', | ||
'playwright/no-page-pause': 'warn', | ||
}; | ||
|
||
module.exports = { | ||
root: true, | ||
ignorePatterns: ['!.*.js', '*.snap', 'templates/**'], | ||
extends: ['custom/node', 'custom/typescript', 'custom/playwright'], | ||
rules: { | ||
...disabledRules, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['./models/deployment.ts', './testUtils/emailService.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'warn', // TODO: Remove when we able to update tests | ||
}, | ||
}, | ||
{ | ||
files: ['./testUtils/testAgainstRunningApps.ts', './presets/longRunningApps.ts'], | ||
rules: { | ||
'@typescript-eslint/no-redundant-type-constituents': 'warn', // TODO: Remove when we able to update tests | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": ["./*.ts", "deployments", "presets", "scripts", "tests", "testUtils"], | ||
"exclude": ["templates"] | ||
} |
Oops, something went wrong.