X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=c45d2501f2feb0959498a389337bd2a9cdb32bd4;hb=d32eb966642d1108a42b5930e04bb9f867eb1328;hp=8349a186d427042acf07ca85601142640afb89ac;hpb=4bf99d517e8e39c7aa777124140fad41910495b1;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 8349a186..c45d2501 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,11 +2,16 @@ const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ + root: true, env: { es2021: true, node: true, mocha: true }, + parserOptions: { + ecmaVersion: 2021, + sourceType: 'module' + }, plugins: ['promise', 'prettierx', 'jsdoc', 'spellcheck'], extends: [ 'standard', @@ -31,18 +36,36 @@ module.exports = defineConfig({ 'warn', { skipWords: [ + 'browserslist', + 'builtins', 'christopher', + 'cjs', 'comparator', + 'cpu', + 'cpus', + 'ctx', 'ecma', 'enum', 'fibonacci', + 'fs', 'inheritDoc', 'jsdoc', + 'microjob', + 'num', + 'os', + 'piscina', 'poolifier', + 'poolify', 'readonly', 'serializable', 'sinon', + 'threadjs', + 'threadwork', + 'tsconfig', + 'typedoc', + 'unlink', 'unregister', + 'utf8', 'workerpool' ], skipIfMatch: ['^@.*', '^plugin:.*'] @@ -54,8 +77,6 @@ module.exports = defineConfig({ files: ['**/*.ts'], parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: 2020, - sourceType: 'module', project: './tsconfig.json' }, plugins: ['@typescript-eslint'], @@ -108,9 +129,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'], @@ -121,8 +152,7 @@ module.exports = defineConfig({ { files: ['tests/pools/selection-strategies/**/*.js'], rules: { - 'node/no-missing-require': 'off', - 'jsdoc/require-jsdoc': 'off' + 'n/no-missing-require': 'off' } }, { @@ -131,10 +161,16 @@ module.exports = defineConfig({ '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' } }