X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=523f20f8c389d47b15b3b45d5072bad47e31c507;hb=c4424e52e4924efa5eef704cb5dcb82f2760e0da;hp=0a343d6b4e4f5899bd8b7d4f3a80aa541d602c0b;hpb=2fc5cae38554901a21435ef087036a062c9d1632;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 0a343d6b..523f20f8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,3 @@ -// @ts-check const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ @@ -18,58 +17,75 @@ module.exports = defineConfig({ 'plugin:import/recommended', 'plugin:promise/recommended' ], + settings: { + 'import/resolver': { + typescript: { + project: './tsconfig.eslint.json' + } + } + }, rules: { 'sort-imports': [ - 'warn', + 'error', { - ignoreMemberSort: true, ignoreDeclarationSort: true } ], + 'import/order': 'error', 'spellcheck/spell-checker': [ 'warn', { skipWords: [ - 'Benoit', + 'axios', + 'benoit', 'benny', 'browserslist', 'builtins', 'christopher', 'cjs', + 'cloneable', 'comparator', 'cpu', 'cpus', 'ctx', 'deprecations', 'dequeue', + 'dequeued', 'ecma', + 'elu', 'enqueue', 'enum', 'errored', 'esm', + 'fastify', 'fibonacci', + 'fp', 'fs', 'inheritDoc', 'jsdoc', 'microjob', 'mjs', + 'npx', 'num', 'os', + 'perf', 'piscina', 'pnpm', 'poolifier', 'poolify', 'readonly', + 'req', 'resize', - 'serializable', 'sinon', 'threadjs', 'threadwork', + 'tinypool', 'tsconfig', 'tsdoc', 'typedoc', 'unlink', + 'unref', 'unregister', 'utf8', 'workerpool', @@ -85,10 +101,9 @@ module.exports = defineConfig({ plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'], parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.json' + project: './tsconfig.eslint.json' }, extends: [ - 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:import/typescript', @@ -108,7 +123,12 @@ 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/strict-boolean-expressions': 'off', + '@typescript-eslint/return-await': 'off' } }, { @@ -129,7 +149,7 @@ module.exports = defineConfig({ } }, { - files: ['benchmarks/**/*.js'], + files: ['benchmarks/**/*.js', 'benchmarks/**/*.mjs'], rules: { 'jsdoc/require-jsdoc': 'off' } @@ -141,7 +161,14 @@ module.exports = defineConfig({ } }, { - files: ['examples/**/*.js'], + files: ['benchmarks/versus-external-pools/**/*.mjs'], + rules: { + 'n/no-missing-import': 'off', + 'import/no-unresolved': 'off' + } + }, + { + files: ['examples/javascript/**/*.js'], rules: { 'n/no-missing-require': 'off', 'jsdoc/require-jsdoc': 'off'