X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=c45d2501f2feb0959498a389337bd2a9cdb32bd4;hb=934189db34b85a65ed92ee92db68977be89123bc;hp=ca01b306546da789593b9de39c479763bacf7640;hpb=bdaf31cd0e637aa466c78d54a49f157899a2cb3f;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index ca01b306..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,17 +36,36 @@ module.exports = defineConfig({ 'warn', { skipWords: [ + 'browserslist', + 'builtins', 'christopher', + 'cjs', 'comparator', + 'cpu', + 'cpus', + 'ctx', 'ecma', 'enum', 'fibonacci', - 'inheritdoc', + 'fs', + 'inheritDoc', 'jsdoc', + 'microjob', + 'num', + 'os', + 'piscina', 'poolifier', + 'poolify', 'readonly', 'serializable', + 'sinon', + 'threadjs', + 'threadwork', + 'tsconfig', + 'typedoc', + 'unlink', 'unregister', + 'utf8', 'workerpool' ], skipIfMatch: ['^@.*', '^plugin:.*'] @@ -53,8 +77,6 @@ module.exports = defineConfig({ files: ['**/*.ts'], parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: 2020, - sourceType: 'module', project: './tsconfig.json' }, plugins: ['@typescript-eslint'], @@ -107,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'], @@ -117,16 +149,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' } }