X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=49838a24cbfd6ed9746ae52557b5772c58a188ed;hb=b04bd0f17e1ef9d2b5bd13ec69405f03ee86ff51;hp=ae288a7c0ae81acc761208fa7045df0dce0e5eef;hpb=da3098610d6cf6155bbbe53c84b6ac6ccd400ff5;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index ae288a7c..49838a24 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,3 @@ -// @ts-check const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ @@ -18,60 +17,91 @@ module.exports = defineConfig({ 'plugin:import/recommended', 'plugin:promise/recommended' ], + settings: { + 'import/resolver': { + typescript: { + project: './tsconfig.json' + } + } + }, rules: { 'sort-imports': [ - 'warn', + 'error', { - ignoreMemberSort: true, ignoreDeclarationSort: true } ], + 'import/order': 'error', 'spellcheck/spell-checker': [ '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', - 'workerpool' + 'webcrypto', + 'workerpool', + 'ws', + 'wss', + 'wwr' ], skipIfMatch: ['^@.*', '^plugin:.*'] } @@ -86,7 +116,6 @@ module.exports = defineConfig({ project: './tsconfig.json' }, extends: [ - 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:import/typescript', @@ -106,7 +135,13 @@ module.exports = defineConfig({ 'import/no-unresolved': 'off', '@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' } }, { @@ -121,25 +156,13 @@ module.exports = defineConfig({ } }, { - files: ['tests/pools/selection-strategies/**/*.js'], - rules: { - 'n/no-missing-require': 'off' - } - }, - { - files: ['benchmarks/**/*.js'], + files: ['benchmarks/**/*.js', 'benchmarks/**/*.mjs'], rules: { 'jsdoc/require-jsdoc': 'off' } }, { - files: ['benchmarks/versus-external-pools/**/*.js'], - rules: { - 'n/no-missing-require': 'off' - } - }, - { - files: ['examples/**/*.js'], + files: ['examples/javascript/**/*.js'], rules: { 'n/no-missing-require': 'off', 'jsdoc/require-jsdoc': 'off'