1- import tseslint from '@typescript-eslint/eslint-plugin' ;
2- import prettier from 'eslint-config-prettier' ;
3- export default [
1+ // @ts -check
2+
3+ import eslint from "@eslint/js" ;
4+ import tseslint from "typescript-eslint" ;
5+ import prettierConfig from "eslint-config-prettier" ;
6+ import tsDocsPlugin from "eslint-plugin-tsdoc" ;
7+ import simpleImportSort from "eslint-plugin-simple-import-sort" ;
8+
9+ export default tseslint . config (
410 {
5- files : [ '**/*.ts' ] ,
6- ignores : [ '**/node_modules/**' , '**/dist/**' , '**/build/**' ] ,
11+ ignores : [
12+ "eslint.config.ts" ,
13+ "**/dist/" ,
14+ "**/.turbo/" ,
15+ "**/vitest.*.ts" ,
16+ "**/vite.config.ts" ,
17+ "**/rollup.config.js" ,
18+ "**/node_modules/" ,
19+ "**/*.test.ts" ,
20+ ] ,
21+ } ,
22+ eslint . configs . recommended ,
23+ ...tseslint . configs . recommendedTypeChecked ,
24+ prettierConfig ,
25+ {
26+ plugins : {
27+ tsdoc : tsDocsPlugin ,
28+ "simple-import-sort" : simpleImportSort ,
29+ } ,
730 languageOptions : {
831 parserOptions : {
932 project : [ "./packages/*/tsconfig*.json" ] ,
1033 tsconfigRootDir : import . meta. dirname ,
1134 } ,
1235 } ,
13- plugins : {
14- '@typescript-eslint' : tseslint ,
15- } ,
1636 rules : {
17- 'no-console' : 'warn' ,
18- 'no-unused-vars' : 'off' ,
19- '@typescript-eslint/no-unused-vars' : [ 'warn' ] ,
20- '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
21- '@typescript-eslint/no-explicit-any' : 'off' ,
37+ "no-console" : "error" ,
38+ "tsdoc/syntax" : "error" ,
39+ "@typescript-eslint/no-unused-vars" : [
40+ "error" ,
41+ {
42+ args : "all" ,
43+ argsIgnorePattern : "^_" ,
44+ caughtErrors : "all" ,
45+ caughtErrorsIgnorePattern : "^_" ,
46+ destructuredArrayIgnorePattern : "^_" ,
47+ varsIgnorePattern : "^_" ,
48+ ignoreRestSiblings : true ,
49+ } ,
50+ ] ,
51+ "@typescript-eslint/consistent-type-imports" : [
52+ "error" ,
53+ {
54+ prefer : "type-imports" ,
55+ disallowTypeAnnotations : false ,
56+ fixStyle : "separate-type-imports" ,
57+ } ,
58+ ] ,
59+ "simple-import-sort/imports" : "error" ,
60+ "simple-import-sort/exports" : "error" ,
2261 } ,
2362 } ,
2463 {
64+ files : [ "**/*.test.ts" ] ,
2565 rules : {
26- ... prettier . rules ,
66+ "@typescript-eslint/no-unsafe-assignment" : "off" ,
2767 } ,
2868 } ,
29- ] ;
69+ {
70+ files : [
71+ "packages/*/**/*.test.ts" ,
72+ ] ,
73+ rules : {
74+ "no-restricted-syntax" : "off" ,
75+ } ,
76+ }
77+ ) ;
78+
0 commit comments