Skip to content

Commit

Permalink
chore(eslint): update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Aug 12, 2024
1 parent c7bc9f9 commit 3124b83
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import n from 'eslint-plugin-n';
Expand All @@ -23,7 +25,10 @@ export default tseslint.config(
parserOptions: {
EXPERIMENTAL_useProjectService: {
allowDefaultProjectForFiles: ['./*.*s', 'eslint.config.js'],
defaultProject: './tsconfig.json',
defaultProject: './tsconfig.tsc.json',
// https://github.com/typescript-eslint/typescript-eslint/issues/9032
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING:
Infinity,
},
},
},
Expand All @@ -50,6 +55,13 @@ export default tseslint.config(
'@stylistic/padding-line-between-statements': [
'error',
{blankLine: 'always', next: 'export', prev: '*'},
{blankLine: 'always', next: 'const', prev: '*'},
{blankLine: 'always', next: '*', prev: 'const'},
{blankLine: 'always', next: 'let', prev: '*'},
{blankLine: 'always', next: '*', prev: 'const'},
{blankLine: 'always', next: 'type', prev: '*'},
{blankLine: 'always', next: '*', prev: 'type'},
{blankLine: 'always', next: 'return', prev: '*'},
],

'@stylistic/semi': ['error', 'always'],
Expand Down Expand Up @@ -100,6 +112,9 @@ export default tseslint.config(
// I like my template expressions
'@typescript-eslint/restrict-template-expressions': 'off',

// this conflicts with eslint-plugin-perfectionist (just in case)
'@typescript-eslint/sort-type-constituents': 'off',

'@typescript-eslint/switch-exhaustiveness-check': 'error',

'@typescript-eslint/unified-signatures': [
Expand All @@ -114,6 +129,13 @@ export default tseslint.config(

'n/no-unpublished-import': 'off',

'no-empty': [
'error',
{
allowEmptyCatch: true,
},
],

'no-use-before-define': 'off',
},
}),
Expand Down

0 comments on commit 3124b83

Please sign in to comment.