Skip to content

Commit 92ca4c6

Browse files
committed
updated configs && linting fixes
1 parent 908c8cf commit 92ca4c6

36 files changed

Lines changed: 2963 additions & 952 deletions

eslint.config.js

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
import { defineConfig } from "eslint/config";
2-
import tsParser from "@typescript-eslint/parser";
3-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
4-
import js from "@eslint/js";
5-
import { FlatCompat } from "@eslint/eslintrc";
1+
import tsParser from '@typescript-eslint/parser';
2+
import tseslint from '@typescript-eslint/eslint-plugin';
3+
import importPlugin from 'eslint-plugin-import';
64

7-
const compat = new FlatCompat({
8-
baseDirectory: import.meta.dirname,
9-
recommendedConfig: js.configs.recommended,
10-
allConfig: js.configs.all
11-
});
12-
13-
export default defineConfig([{
5+
export default [
6+
{
7+
files: ['src/**/*.ts', 'test/**/*.test.ts'],
8+
ignores: ['lib/**', 'node_modules/**'],
149
languageOptions: {
15-
parser: tsParser,
10+
parser: tsParser,
11+
parserOptions: {
12+
project: ['./tsconfig.json', './tsconfig.test.json'],
13+
sourceType: 'module',
14+
},
1615
},
17-
1816
plugins: {
19-
"@typescript-eslint": typescriptEslint,
17+
'@typescript-eslint': tseslint,
18+
import: importPlugin,
2019
},
21-
22-
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
23-
}]);
20+
rules: {
21+
'semi': ['error', 'never'],
22+
'quotes': ['error', 'single'],
23+
'no-unused-vars': 'off', // handled by TS
24+
'@typescript-eslint/no-unused-vars': ['warn'],
25+
'@typescript-eslint/no-explicit-any': 'warn',
26+
},
27+
},
28+
];

0 commit comments

Comments
 (0)