X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=eslint.config.js;h=67eb035ecc938597a02c8ed0561dd4fc1dc80601;hb=76c7f0cf3b8e9f456d19404bf7632266cd9b10bf;hp=e0fa23c6d758dd007f652bd2d29891d8425bfc61;hpb=260bb73734384fc982006e15359ca1c43463cc55;p=poolifier.git diff --git a/eslint.config.js b/eslint.config.js index e0fa23c6..67eb035e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -17,7 +17,10 @@ export default defineFlatConfig([ js.configs.recommended, ...nodePlugin.configs['flat/mixed-esm-and-cjs'], jsdoc.configs['flat/recommended-typescript'], - ...tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic), + ...tseslint.config( + ...tseslint.configs.strictTypeChecked, + ...tseslint.configs.stylisticTypeChecked + ), ...neostandard({ ts: true, globals: { @@ -25,18 +28,14 @@ export default defineFlatConfig([ ...globals.mocha, }, }), - // ...tseslint.config( - // ...tseslint.configs.strictTypeChecked, - // ...tseslint.configs.stylisticTypeChecked, - // { - // languageOptions: { - // parserOptions: { - // project: true, - // tsconfigRootDir: import.meta.dirname, - // }, - // }, - // } - // ), + { + languageOptions: { + parserOptions: { + project: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, { plugins: { 'simple-import-sort': simpleImportSort, @@ -72,10 +71,21 @@ export default defineFlatConfig([ '@stylistic/operator-linebreak': 'off', }, }, + { + files: ['**/*.js', '**/*.mjs', '**/*.cjs'], + ...tseslint.configs.disableTypeChecked, + }, + // examples specific configuration { files: ['examples/**/*.ts'], rules: { - 'no-undef': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', }, }, { @@ -90,12 +100,14 @@ export default defineFlatConfig([ '@typescript-eslint/no-require-imports': 'off', }, }, + // benchmarks specific configuration { files: ['benchmarks/**/*.cjs'], rules: { '@typescript-eslint/no-require-imports': 'off', }, }, + // tests specific configuration { files: ['tests/**/*.js', 'tests/**/*.mjs', 'tests/**/*.cjs'], rules: {