X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=eslint.config.js;h=4b1c621a05269051d3476712155a562a754a407a;hb=12c527c5cc57ef94ee1753a7e7a800838a6357ca;hp=8666f4c4a02ac7287b1a85bf448d62f9848d8cda;hpb=01caf77910a88fe7cf23625cbeec8a132b05ead1;p=poolifier.git diff --git a/eslint.config.js b/eslint.config.js index 8666f4c4..4b1c621a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -17,8 +17,10 @@ export default defineFlatConfig([ js.configs.recommended, ...nodePlugin.configs['flat/mixed-esm-and-cjs'], jsdoc.configs['flat/recommended-typescript'], - // ...tseslint.config(...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked), - ...tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic), + ...tseslint.config( + ...tseslint.configs.strictTypeChecked, + ...tseslint.configs.stylisticTypeChecked + ), ...neostandard({ ts: true, globals: { @@ -26,6 +28,14 @@ export default defineFlatConfig([ ...globals.mocha, }, }), + { + languageOptions: { + parserOptions: { + project: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, { plugins: { 'simple-import-sort': simpleImportSort, @@ -61,10 +71,17 @@ 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-call': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', }, }, { @@ -79,12 +96,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: {