Skip to content
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

chore: upgrade all dev dependencies #376

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

63 changes: 0 additions & 63 deletions .eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.experimental.useFlatConfig": true
}
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/main.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 89 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import tsEslint from 'typescript-eslint'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import stylistic from '@stylistic/eslint-plugin'
import js from '@eslint/js'

import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
})

const recommendedConfig = [
{
files: ['**/*.ts', '**/*.tsx'],
...tsEslint.configs.base,
languageOptions: {
...tsEslint.configs.base.languageOptions,
parserOptions: {
EXPERIMENTAL_useProjectService: true,
sourceType: 'module',
},
},
},
// extract recommended config from typescript-eslint and enable it only for TS files
...[
...tsEslint.configs.recommended,
...tsEslint.configs.recommendedTypeChecked,
...tsEslint.configs.stylistic,
...tsEslint.configs.stylisticTypeChecked,
]
.map(({ rules, files }) =>
rules ? { rules, files: files ?? ['**/*.ts', '**/*.tsx'] } : undefined,
)
.filter(Boolean),
]

export default [
{ ignores: ['**/__generated__/**', 'node_modules/**', 'lib/**', 'dist/**'] },
{
linterOptions: {
reportUnusedDisableDirectives: true,
},
},
...recommendedConfig,
stylistic.configs['recommended-flat'],
js.configs.recommended,
...compat
.config({
extends: ['prettier'],
})
.map(config => ({
...config,
})),
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
/**
* SECTION START: Disabled rules colliding with Prettier
*/
'@stylistic/no-tabs': 'off',
'@stylistic/indent': 'off',
'@stylistic/semi': 'off',
'@stylistic/brace-style': 'off',
'@stylistic/member-delimiter-style': 'off',
'@stylistic/quotes': 'off',
'@stylistic/indent-binary-ops': 'off',
'@stylistic/operator-linebreak': 'off',
'@stylistic/arrow-parens': 'off',
'@stylistic/quote-props': 'off',
'@stylistic/no-mixed-spaces-and-tabs': 'off',
/**
* SECTION END
*/
'no-console': 'off',
'no-restricted-syntax': 'off',
'arrow-parens': 'off',
'no-underscore-dangle': 'off',
camelcase: 'off',
semi: 'off',
'implicit-arrow-linebreak': 'off',
'no-undef': 'off',
},
},
]
Loading