X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=9d0d7ce4cea3efda4777c7004a459cd307f8df57;hb=5aa31a743fde300612ae89a242b809ae7db083ed;hp=d40ff6691de0b5a9f4b3e24e11d368ba2c262afe;hpb=6056130c34d951fde16849f2c09bd8367fa94181;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index d40ff669..9d0d7ce4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,7 +20,7 @@ module.exports = defineConfig({ settings: { 'import/resolver': { typescript: { - project: './tsconfig.eslint.json' + project: './tsconfig.json' } } }, @@ -37,51 +37,70 @@ module.exports = defineConfig({ 'warn', { skipWords: [ - 'Benoit', - 'benny', + 'axios', + 'benoit', 'browserslist', 'builtins', 'christopher', 'cjs', + 'cloneable', 'comparator', 'cpu', 'cpus', + 'cryptographically', 'ctx', 'deprecations', + 'deque', 'dequeue', 'dequeued', + 'deregisters', + 'dts', 'ecma', 'elu', 'enqueue', 'enum', 'errored', 'esm', + 'fastify', 'fibonacci', + 'fp', 'fs', + 'func', 'inheritDoc', + 'javascript', 'jsdoc', + 'localhost', 'microjob', 'mjs', + 'nodemailer', + 'npx', 'num', 'os', 'perf', 'piscina', 'pnpm', 'poolifier', - 'poolify', + 'prepend', + 'prepends', + 'readdir', 'readonly', + 'req', 'resize', - 'serializable', 'sinon', + 'smtp', 'threadjs', 'threadwork', + 'tinypool', 'tsconfig', 'tsdoc', 'typedoc', 'unlink', - 'unregister', + 'unref', 'utf8', + 'webcrypto', 'workerpool', + 'ws', + 'wss', 'wwr' ], skipIfMatch: ['^@.*', '^plugin:.*'] @@ -94,10 +113,9 @@ module.exports = defineConfig({ plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'], parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.eslint.json' + project: './tsconfig.json' }, extends: [ - 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:import/typescript', @@ -114,9 +132,30 @@ module.exports = defineConfig({ { files: ['examples/typescript/**/*.ts'], rules: { + 'import/no-unresolved': [ + 'error', + { + ignore: [ + '^axios$', + '^express$', + '^fastify$', + '^fastify-plugin$', + '^node-fetch$', + '^nodemailer$', + '^poolifier$', + '^ws$' + ] + } + ], '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-assignment': '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', + '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/return-await': 'off' } }, { @@ -125,17 +164,11 @@ module.exports = defineConfig({ extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'] }, { - files: ['tests/**/*.js'], + files: ['tests/**/*.js', 'tests/**/*.mjs'], rules: { 'jsdoc/require-jsdoc': 'off' } }, - { - files: ['tests/pools/selection-strategies/**/*.js'], - rules: { - 'n/no-missing-require': 'off' - } - }, { files: ['benchmarks/**/*.js', 'benchmarks/**/*.mjs'], rules: { @@ -143,22 +176,8 @@ module.exports = defineConfig({ } }, { - files: ['benchmarks/versus-external-pools/**/*.js'], - rules: { - 'n/no-missing-require': 'off' - } - }, - { - files: ['benchmarks/versus-external-pools/**/*.mjs'], - rules: { - 'n/no-missing-import': 'off', - 'import/no-unresolved': 'off' - } - }, - { - files: ['examples/**/*.js'], + files: ['examples/javascript/**/*.js'], rules: { - 'n/no-missing-require': 'off', 'jsdoc/require-jsdoc': 'off' } }