X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=c1e571d5fda56bf1c550cac7c0c4e78fa3712239;hb=96f8e6b29466ced347e1a317a1864a136ed6a5ab;hp=6e20d78ffeda55d04643a7d2bcdf3ccd5609f453;hpb=dcd9851c015e556ed0509744c5459ba3f16bff7c;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 6e20d78f..c1e571d5 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,8 +37,8 @@ module.exports = defineConfig({ 'warn', { skipWords: [ - 'Benoit', - 'benny', + 'axios', + 'benoit', 'browserslist', 'builtins', 'christopher', @@ -47,32 +47,47 @@ module.exports = defineConfig({ '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', 'sinon', + 'smtp', 'threadjs', 'threadwork', 'tinypool', @@ -81,9 +96,10 @@ module.exports = defineConfig({ 'typedoc', 'unlink', 'unref', - 'unregister', 'utf8', 'workerpool', + 'ws', + 'wss', 'wwr' ], skipIfMatch: ['^@.*', '^plugin:.*'] @@ -96,7 +112,7 @@ 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/recommended', @@ -105,19 +121,37 @@ module.exports = defineConfig({ 'standard-with-typescript' ], rules: { - '@typescript-eslint/no-inferrable-types': [ - 'error', - { ignoreProperties: true } - ], + '@typescript-eslint/non-nullable-type-assertion-style': 'off', 'tsdoc/syntax': 'warn' } }, { 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' } }, { @@ -126,17 +160,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: { @@ -144,22 +172,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' } }