Skip to content

Commit 66ccfd0

Browse files
authored
refactor: standardize codebase formatting (#258)
1 parent 42cf79e commit 66ccfd0

31 files changed

Lines changed: 3949 additions & 1829 deletions

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Run lint-staged for linting and formatting checks
2-
cd ./website && npx lint-staged -c lint-staged.config.js
2+
cd ./website && npx lint-staged --no-stash -c lint-staged.config.js

website/.eslintrc.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

website/.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ yarn-debug.log*
1919
yarn-error.log*
2020
.pnpm-debug.log*
2121

22-
# Next.js
23-
.next/
24-
out/
25-
next-env.d.ts
26-
.vercel
27-
.turbo
28-
.swc/
2922

3023
# Testing
3124
coverage/

website/.prettierignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Ignore build artifacts
2-
.next/
3-
out/
2+
43
build/
54
dist/
65

website/.prettierrc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,14 @@
77
"bracketSpacing": true,
88
"bracketSameLine": false,
99
"arrowParens": "avoid",
10-
"endOfLine": "lf"
10+
"endOfLine": "lf",
11+
"plugins": ["prettier-plugin-astro"],
12+
"overrides": [
13+
{
14+
"files": "*.astro",
15+
"options": {
16+
"parser": "astro"
17+
}
18+
}
19+
]
1120
}

website/eslint.config.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import eslintPluginAstro from 'eslint-plugin-astro';
4+
import globals from 'globals';
5+
6+
export default [
7+
{
8+
ignores: ['dist/', '.astro/', 'node_modules/'],
9+
},
10+
js.configs.recommended,
11+
...tseslint.configs.recommended,
12+
...eslintPluginAstro.configs.recommended,
13+
{
14+
languageOptions: {
15+
globals: {
16+
...globals.node,
17+
...globals.browser,
18+
},
19+
},
20+
rules: {
21+
'@typescript-eslint/no-explicit-any': 'off',
22+
'@typescript-eslint/no-unused-vars': 'off',
23+
'@typescript-eslint/no-empty-object-type': 'off',
24+
'@typescript-eslint/triple-slash-reference': 'off',
25+
'no-undef': 'off',
26+
'prefer-const': 'off',
27+
},
28+
},
29+
];

website/lint-staged.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
'*.{js,jsx,ts,tsx,astro}': ['eslint', 'prettier --check'],
3+
'*.{css,md,json}': ['prettier --check'],
4+
};

0 commit comments

Comments
 (0)