X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=59f0a1133f6abd76bba4543c75dfa10e861409d9;hb=e4bc7a498d48e2773b2e68fd4ffcaf4d328d5a0b;hp=fe04926fd46565df433f78e3c01a083283bdbc85;hpb=e00a6c53e0d42d4b76791441975b70888ead0a73;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index fe04926f..59f0a113 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,6 +7,10 @@ module.exports = defineConfig({ node: true, mocha: true }, + parserOptions: { + ecmaVersion: 2021, + sourceType: 'module' + }, plugins: ['promise', 'prettierx', 'jsdoc', 'spellcheck'], extends: [ 'standard', @@ -31,16 +35,36 @@ module.exports = defineConfig({ 'warn', { skipWords: [ + 'browserslist', + 'builtins', 'christopher', + 'cjs', 'comparator', + 'cpu', + 'cpus', + 'ctx', 'ecma', 'enum', - 'inheritdoc', + 'fibonacci', + 'fs', + 'inheritDoc', 'jsdoc', + 'microjob', + 'num', + 'os', + 'piscina', 'poolifier', + 'poolify', 'readonly', 'serializable', + 'sinon', + 'threadjs', + 'threadwork', + 'tsconfig', + 'typedoc', + 'unlink', 'unregister', + 'utf8', 'workerpool' ], skipIfMatch: ['^@.*', '^plugin:.*'] @@ -52,8 +76,6 @@ module.exports = defineConfig({ files: ['**/*.ts'], parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: 2020, - sourceType: 'module', project: './tsconfig.json' }, plugins: ['@typescript-eslint'], @@ -106,9 +128,19 @@ module.exports = defineConfig({ 'jsdoc/require-returns-type': 'off' } }, + { + files: ['examples/typescript/**/*.ts'], + rules: { + 'import/no-unresolved': 'off', + 'jsdoc/require-jsdoc': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off' + } + }, { files: ['**/*.js'], - extends: 'plugin:node/recommended' + extends: ['plugin:n/recommended'] }, { files: ['tests/**/*.js'], @@ -116,16 +148,28 @@ module.exports = defineConfig({ 'jsdoc/require-jsdoc': 'off' } }, + { + files: ['tests/pools/selection-strategies/**/*.js'], + rules: { + 'n/no-missing-require': 'off' + } + }, { files: ['benchmarks/**/*.js'], rules: { 'jsdoc/require-jsdoc': 'off' } }, + { + files: ['benchmarks/versus-external-pools/**/*.js'], + rules: { + 'n/no-missing-require': 'off' + } + }, { files: ['examples/**/*.js'], rules: { - 'node/no-missing-require': 'off', + 'n/no-missing-require': 'off', 'jsdoc/require-jsdoc': 'off' } }