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',
'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:.*']
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
- ecmaVersion: 2020,
- sourceType: 'module',
project: './tsconfig.json'
},
plugins: ['@typescript-eslint'],
'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'],
'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'
}
}