X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=4d8c7ffd0ddd57278e18605e916fb20076accb3a;hb=16671b07d958f4d61f4d982db2cb139ea665886d;hp=2e396436b0d6d4c95af5a4764cb024fe2d1016ef;hpb=2a7995b1242609d257b82b043ee772ee49f5c7ec;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 2e396436..4d8c7ffd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,3 @@ -// @ts-check const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ @@ -18,19 +17,27 @@ 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', @@ -40,8 +47,14 @@ module.exports = defineConfig({ 'cpu', 'cpus', 'ctx', + 'deprecations', + 'dequeue', + 'dequeued', 'ecma', + 'elu', + 'enqueue', 'enum', + 'errored', 'esm', 'fibonacci', 'fs', @@ -51,10 +64,13 @@ module.exports = defineConfig({ 'mjs', 'num', 'os', + 'perf', 'piscina', + 'pnpm', 'poolifier', 'poolify', 'readonly', + 'resize', 'serializable', 'sinon', 'threadjs', @@ -65,7 +81,8 @@ module.exports = defineConfig({ 'unlink', 'unregister', 'utf8', - 'workerpool' + 'workerpool', + 'wwr' ], skipIfMatch: ['^@.*', '^plugin:.*'] } @@ -77,7 +94,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', @@ -91,20 +108,19 @@ 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' } }, { - files: ['**/*.js'], + files: ['**/*.js', '**/*.mjs'], plugins: ['jsdoc'], extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'] },