X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=e421cd282cf758417b1609b6a887f4335619b708;hb=refs%2Ftags%2Fv2.6.10;hp=cf1544ffba2a53d46373303c68bce80bbe921db6;hpb=30eafb1efdb656c3651d5a1733f06f1327f71bd4;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index cf1544ff..e421cd28 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,3 @@ -// @ts-check const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ @@ -18,31 +17,45 @@ 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', 'benny', 'browserslist', 'builtins', 'christopher', 'cjs', + 'cloneable', 'comparator', 'cpu', 'cpus', 'ctx', 'deprecations', + 'dequeue', + 'dequeued', 'ecma', + 'elu', + 'enqueue', 'enum', + 'errored', 'esm', 'fibonacci', 'fs', @@ -52,21 +65,25 @@ module.exports = defineConfig({ 'mjs', 'num', 'os', + 'perf', 'piscina', + 'pnpm', 'poolifier', 'poolify', 'readonly', - 'serializable', + 'resize', 'sinon', 'threadjs', 'threadwork', + 'tinypool', 'tsconfig', 'tsdoc', 'typedoc', 'unlink', 'unregister', 'utf8', - 'workerpool' + 'workerpool', + 'wwr' ], skipIfMatch: ['^@.*', '^plugin:.*'] } @@ -78,7 +95,7 @@ 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', @@ -92,13 +109,12 @@ module.exports = defineConfig({ 'error', { ignoreProperties: true } ], - 'tsdoc/syntax': 'error' + 'tsdoc/syntax': 'warn' } }, { files: ['examples/typescript/**/*.ts'], rules: { - 'import/no-unresolved': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-assignment': 'off' @@ -122,7 +138,7 @@ module.exports = defineConfig({ } }, { - files: ['benchmarks/**/*.js'], + files: ['benchmarks/**/*.js', 'benchmarks/**/*.mjs'], rules: { 'jsdoc/require-jsdoc': 'off' } @@ -133,6 +149,13 @@ module.exports = defineConfig({ 'n/no-missing-require': 'off' } }, + { + files: ['benchmarks/versus-external-pools/**/*.mjs'], + rules: { + 'n/no-missing-import': 'off', + 'import/no-unresolved': 'off' + } + }, { files: ['examples/**/*.js'], rules: {