Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

81 changes: 0 additions & 81 deletions .eslintrc.yml

This file was deleted.

1 change: 0 additions & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# configure/install nvm
source_nvm() {
Expand Down
1 change: 0 additions & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run run-if-changed
1 change: 0 additions & 1 deletion .husky/post-rewrite
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run run-if-changed
1 change: 0 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint-staged && npm run lint
116 changes: 116 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// eslint.config.js
import { fixupPluginRules } from '@eslint/compat'
import pluginTs from '@typescript-eslint/eslint-plugin'
import parserTs from '@typescript-eslint/parser'
import pluginImport from 'eslint-plugin-import'
import pluginUnused from 'eslint-plugin-unused-imports'
import pluginPrettier from 'eslint-plugin-prettier'
import globals from 'globals'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores([
'.history',
'.vscode',
'build/*',
'dist/*',
'coverage/*',
'node_modules/*',
'vendors/*',
'src/generated-schema.ts',
]),
{
files: ['**/*.ts'],
languageOptions: {
parser: parserTs,
ecmaVersion: 2021,
sourceType: 'module',
parserOptions: {
project: ['./tsconfig.json'],
},
globals: {
...globals.node,
...globals.jest,
},
},
plugins: {
'@typescript-eslint': fixupPluginRules(pluginTs),
import: fixupPluginRules(pluginImport),
'unused-imports': fixupPluginRules(pluginUnused),
prettier: fixupPluginRules(pluginPrettier),
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts'],
paths: ['src'],
},
typescript: {},
},
},
rules: {
// TS rules
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-shadow': [
'error',
{
allow: ['deps', 'secrets', 'values'],
},
],
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^(_|next)',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'function',
format: ['camelCase'],
leadingUnderscore: 'allow',
},
],

// Base rules
'comma-dangle': ['error', 'only-multiline'],
'eol-last': ['error', 'always'],
'func-names': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'no-console': 'off',
'no-debugger': 'warn',
'no-fallthrough': 'warn',
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: ['memo'],
},
],
'no-shadow': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'object-shorthand': 'error',
'prefer-destructuring': 'warn',
'prefer-template': 'error',

// Plugins
'prettier/prettier': 'error',
},
},
])
Loading
Loading