Skip to content

Commit f280327

Browse files
committed
Finalize eslint rules
1 parent 3dda687 commit f280327

File tree

5 files changed

+24
-19
lines changed

5 files changed

+24
-19
lines changed

.vscode/extensions.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"mrmlnc.vscode-json5"
6-
]
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["mrmlnc.vscode-json5", "dbaeumer.vscode-eslint"]
75
}

packages/email/src/templates/invite-user.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ export const InviteUserEmail = ({
3535
<Tailwind>
3636
<Body className="mx-auto my-auto bg-white px-2 font-sans">
3737
<Preview>{previewText}</Preview>
38-
<Container className="mx-auto my-[40px] max-w-[465px] rounded border border-[#eaeaea] border-solid p-[20px]">
39-
<Heading className="mx-0 my-[30px] p-0 text-center font-normal text-[24px] text-black">
38+
<Container className="mx-auto my-[40px] max-w-[465px] rounded border border-solid border-[#eaeaea] p-[20px]">
39+
<Heading className="mx-0 my-[30px] p-0 text-center text-[24px] font-normal text-black">
4040
{headingText}
4141
</Heading>
42-
<Text className="text-[14px] text-black leading-[24px]">Hello,</Text>
43-
<Text className="text-[14px] text-black leading-[24px]">
42+
<Text className="text-[14px] leading-[24px] text-black">Hello,</Text>
43+
<Text className="text-[14px] leading-[24px] text-black">
4444
<Link
4545
href={`mailto:${invitedByEmail}`}
46-
className="text-blue-600 no-underline mr-1"
46+
className="mr-1 text-blue-600 no-underline"
4747
>
4848
<strong>{invitedByName ?? invitedByEmail}</strong>
4949
</Link>
@@ -53,20 +53,20 @@ export const InviteUserEmail = ({
5353
</Text>
5454
<Section className="mt-[32px] mb-[32px] text-center">
5555
<Button
56-
className="rounded bg-[#000000] px-5 py-3 text-center font-semibold text-[12px] text-white no-underline"
56+
className="rounded bg-[#000000] px-5 py-3 text-center text-[12px] font-semibold text-white no-underline"
5757
href={inviteLink}
5858
>
5959
Join the project
6060
</Button>
6161
</Section>
62-
<Text className="text-[14px] text-black leading-[24px]">
62+
<Text className="text-[14px] leading-[24px] text-black">
6363
or copy and paste this URL into your browser:{' '}
6464
<Link href={inviteLink} className="text-blue-600 no-underline">
6565
{inviteLink}
6666
</Link>
6767
</Text>
68-
<Hr className="mx-0 my-[26px] w-full border border-[#eaeaea] border-solid" />
69-
<Text className="text-[#666666] text-[12px] leading-[24px]">
68+
<Hr className="mx-0 my-[26px] w-full border border-solid border-[#eaeaea]" />
69+
<Text className="text-[12px] leading-[24px] text-[#666666]">
7070
This invitation was intended for{' '}
7171
<span className="text-black">{inviteeEmail}</span>. If you were not
7272
expecting this invitation, you can ignore this email. If you are
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import baseConfig from "@onlook/eslint/base";
2+
3+
/** @type {import('typescript-eslint').Config} */
4+
export default [...baseConfig];

packages/file-system/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
},
1414
"scripts": {
1515
"clean": "rm -rf node_modules",
16-
"lint": "eslint --fix .",
17-
"format": "prettier --write .",
16+
"lint": "eslint . --max-warnings 0",
17+
"format": "eslint --fix .",
1818
"typecheck": "tsc --noEmit"
1919
},
2020
"keywords": [
@@ -34,9 +34,11 @@
3434
"./hooks": "./src/hooks/index.ts"
3535
},
3636
"devDependencies": {
37+
"@onlook/eslint": "*",
3738
"@onlook/typescript": "*",
3839
"@types/lodash.debounce": "^4.0.9",
3940
"@types/react": "^18.3.1",
41+
"eslint": "^9.0.0",
4042
"react": "^18.3.1",
4143
"typescript": "^5.5.4"
4244
},

tooling/eslint/base.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import * as path from 'node:path';
12
import { includeIgnoreFile } from '@eslint/compat';
23
import eslint from '@eslint/js';
4+
import prettierConfigPlugin from 'eslint-config-prettier';
35
import importPlugin from 'eslint-plugin-import';
46
import * as jsoncPlugin from 'eslint-plugin-jsonc';
57
import onlyWarn from 'eslint-plugin-only-warn';
68
import prettierPlugin from 'eslint-plugin-prettier';
7-
import * as path from 'node:path';
89
import tseslint from 'typescript-eslint';
910

1011
import prettierConfig from '@onlook/prettier';
@@ -47,16 +48,16 @@ export default tseslint.config(
4748
...tseslint.configs.recommended,
4849
...tseslint.configs.recommendedTypeChecked,
4950
...tseslint.configs.stylisticTypeChecked,
51+
prettierConfigPlugin,
5052
],
5153
rules: {
5254
'prettier/prettier': ['error', prettierConfig],
5355
'@typescript-eslint/array-type': 'off',
5456
'@typescript-eslint/consistent-type-definitions': 'off',
5557
'@typescript-eslint/consistent-type-imports': [
5658
'warn',
57-
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
59+
{ prefer: 'type-imports', fixStyle: 'separate-type-imports' },
5860
],
59-
'import/consistent-type-specifier-style': ['warn', 'prefer-inline'],
6061
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
6162
'@typescript-eslint/require-await': 'off',
6263
'@typescript-eslint/no-misused-promises': 'warn',

0 commit comments

Comments
 (0)