-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore: Unify linting strategy + enforce linting across repo #2839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ca58f90
d655bba
cd9595d
7cba1b4
096fa12
402830a
c6419da
c751ed2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,3 @@ | ||||||||||
| #!/usr/bin/env sh | ||||||||||
| bun run format && git add . | ||||||||||
| # bun run format && git add . | ||||||||||
| # bun run lint && bun run format:write && git add . | ||||||||||
|
Comment on lines
+2
to
3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pre-commit hook has been commented out without enabling a replacement, effectively disabling Git's pre-commit functionality. Consider either:
Without an active hook, code formatting won't be automatically applied before commits.
Suggested change
Spotted by Diamond |
||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was pulled into |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,14 @@ | ||
| import { FlatCompat } from '@eslint/eslintrc'; | ||
| import tseslint from 'typescript-eslint'; | ||
| import baseConfig, { restrictEnvAccess } from "@onlook/eslint/base"; | ||
| import nextjsConfig from "@onlook/eslint/nextjs"; | ||
| import reactConfig from "@onlook/eslint/react"; | ||
|
|
||
| const compat = new FlatCompat({ | ||
| baseDirectory: import.meta.dirname, | ||
| }); | ||
|
|
||
| export default tseslint.config( | ||
| { | ||
| ignores: ['.next'], | ||
| }, | ||
| ...compat.extends('next/core-web-vitals'), | ||
| { | ||
| files: ['**/*.ts', '**/*.tsx'], | ||
| extends: [ | ||
| ...tseslint.configs.recommended, | ||
| ...tseslint.configs.recommendedTypeChecked, | ||
| ...tseslint.configs.stylisticTypeChecked, | ||
| ], | ||
| rules: { | ||
| '@typescript-eslint/array-type': 'off', | ||
| '@typescript-eslint/consistent-type-definitions': 'off', | ||
| '@typescript-eslint/consistent-type-imports': [ | ||
| 'warn', | ||
| { prefer: 'type-imports', fixStyle: 'inline-type-imports' }, | ||
| ], | ||
| '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
| '@typescript-eslint/require-await': 'off', | ||
| '@typescript-eslint/no-misused-promises': 'warn' | ||
| }, | ||
| }, | ||
| { | ||
| linterOptions: { | ||
| reportUnusedDisableDirectives: true, | ||
| }, | ||
| languageOptions: { | ||
| parserOptions: { | ||
| projectService: true, | ||
| }, | ||
| }, | ||
| }, | ||
| ); | ||
| /** @type {import('typescript-eslint').Config} */ | ||
| export default [ | ||
| { | ||
| ignores: [".next/**"], | ||
| }, | ||
| ...baseConfig, | ||
| ...reactConfig, | ||
| ...nextjsConfig, | ||
| ...restrictEnvAccess, | ||
| ]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| import baseConfig from '@onlook/prettier'; | ||
|
|
||
| /** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */ | ||
| export default { | ||
| plugins: ['prettier-plugin-tailwindcss'], | ||
| ...baseConfig, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import baseConfig from "@onlook/eslint/base"; | ||
|
|
||
| /** @type {import('typescript-eslint').Config} */ | ||
| export default [ | ||
| { | ||
| ignores: ["dist/**"], | ||
| }, | ||
| ...baseConfig, | ||
| ]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import baseConfig from "@onlook/eslint/base"; | ||
|
|
||
| /** @type {import('typescript-eslint').Config} */ | ||
| export default [ | ||
| { | ||
| ignores: ["dist/**"], | ||
| }, | ||
| ...baseConfig, | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling temporarily, otherwise this PR will have 1000's of files touched