meta: move config files to typescript
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I60de4abb5b81c4b14d95d7b6f1da8aa66a6a6964
This commit is contained in:
parent
7d8bc6943d
commit
ad491d69e8
5 changed files with 67 additions and 46 deletions
32
eslint.config.ts
Normal file
32
eslint.config.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import tseslint from '@typescript-eslint/eslint-plugin';
|
||||
import tsparser from '@typescript-eslint/parser';
|
||||
|
||||
export default [
|
||||
{ ignores: ['dist/**', 'node_modules/**', '**/*.d.ts'] },
|
||||
{
|
||||
files: ['src/**/*.ts', '**/*.js', 'config.example.ts', 'tsup.config.ts'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module',
|
||||
parser: tsparser,
|
||||
globals: {
|
||||
console: 'readonly',
|
||||
process: 'readonly',
|
||||
setTimeout: 'readonly',
|
||||
setInterval: 'readonly',
|
||||
clearTimeout: 'readonly',
|
||||
clearInterval: 'readonly',
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': tseslint as unknown as Record<string, unknown>,
|
||||
},
|
||||
|
||||
rules: {
|
||||
...tseslint.configs.recommended.rules,
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
'no-console': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue