feat: add tasks queue to pool data structure
[poolifier.git] / .eslintrc.js
CommitLineData
6a6e81d0
S
1// @ts-check
2const { defineConfig } = require('eslint-define-config')
3
4module.exports = defineConfig({
97c16550 5 root: true,
777b7824 6 env: {
54541487 7 es2022: true,
777b7824
S
8 node: true,
9 mocha: true
10 },
6d0425b4 11 parserOptions: {
54541487 12 ecmaVersion: 2022,
6d0425b4
JB
13 sourceType: 'module'
14 },
38e795c1 15 plugins: ['promise', 'spellcheck'],
777b7824 16 extends: [
777b7824 17 'eslint:recommended',
305aeaa7 18 'plugin:import/recommended',
78cea37e 19 'plugin:promise/recommended'
777b7824
S
20 ],
21 rules: {
fa699c42
JB
22 'sort-imports': [
23 'warn',
24 {
25 ignoreMemberSort: true,
50aa7901 26 ignoreDeclarationSort: true
fa699c42 27 }
5c5a1fb7
S
28 ],
29
30 'spellcheck/spell-checker': [
31 'warn',
32 {
33 skipWords: [
d21911e6 34 'Benoit',
ca6c7d70 35 'benny',
fe2f6f84 36 'browserslist',
e4bc7a49 37 'builtins',
5c5a1fb7 38 'christopher',
7a6a0a96 39 'cjs',
74750c7f 40 'comparator',
23ff945a
JB
41 'cpu',
42 'cpus',
7a6a0a96 43 'ctx',
30eafb1e 44 'deprecations',
5c5a1fb7 45 'ecma',
3832ad95 46 'enum',
e5a5c0fc 47 'esm',
bdaf31cd 48 'fibonacci',
7a6a0a96 49 'fs',
3fafb1b2 50 'hrtime',
a76fac14 51 'inheritDoc',
5c5a1fb7 52 'jsdoc',
7a6a0a96 53 'microjob',
fe18768d 54 'mjs',
fe2f6f84 55 'num',
23ff945a 56 'os',
7a6a0a96 57 'piscina',
8d75fd5f 58 'pnpm',
a35560ba 59 'poolifier',
7a6a0a96 60 'poolify',
5c5a1fb7 61 'readonly',
d21911e6 62 'resize',
5c5a1fb7 63 'serializable',
a3809289 64 'sinon',
7a6a0a96
JB
65 'threadjs',
66 'threadwork',
7d82d90e 67 'tsconfig',
38e795c1 68 'tsdoc',
fe2f6f84 69 'typedoc',
7a6a0a96 70 'unlink',
5c5a1fb7 71 'unregister',
7a6a0a96 72 'utf8',
5c5a1fb7
S
73 'workerpool'
74 ],
75 skipIfMatch: ['^@.*', '^plugin:.*']
76 }
777b7824 77 ]
3c5eaeb9
JB
78 },
79 overrides: [
50eceb07 80 {
a17cc27a 81 files: ['**/*.ts'],
38e795c1 82 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
815d4289 83 parser: '@typescript-eslint/parser',
f3636726 84 parserOptions: {
f3636726
JB
85 project: './tsconfig.json'
86 },
a17cc27a 87 extends: [
f3636726 88 'plugin:@typescript-eslint/eslint-recommended',
a17cc27a 89 'plugin:@typescript-eslint/recommended',
f3636726 90 'plugin:@typescript-eslint/recommended-requiring-type-checking',
3aa14de1
JB
91 'plugin:import/typescript',
92 'standard-with-typescript'
a17cc27a 93 ],
50eceb07 94 rules: {
a17cc27a
JB
95 '@typescript-eslint/no-inferrable-types': [
96 'error',
97 { ignoreProperties: true }
98 ],
afc003b2 99 'tsdoc/syntax': 'warn'
50eceb07
S
100 }
101 },
7a6a0a96
JB
102 {
103 files: ['examples/typescript/**/*.ts'],
104 rules: {
105 'import/no-unresolved': 'off',
7a6a0a96
JB
106 '@typescript-eslint/no-unsafe-argument': 'off',
107 '@typescript-eslint/no-unsafe-call': 'off',
108 '@typescript-eslint/no-unsafe-assignment': 'off'
109 }
110 },
3c5eaeb9 111 {
30eafb1e 112 files: ['**/*.js', '**/*.mjs'],
38e795c1 113 plugins: ['jsdoc'],
3aa14de1 114 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
fa699c42
JB
115 },
116 {
305aeaa7
JB
117 files: ['tests/**/*.js'],
118 rules: {
119 'jsdoc/require-jsdoc': 'off'
120 }
121 },
4bf99d51
JB
122 {
123 files: ['tests/pools/selection-strategies/**/*.js'],
124 rules: {
2f8c5b5c 125 'n/no-missing-require': 'off'
4bf99d51
JB
126 }
127 },
305aeaa7
JB
128 {
129 files: ['benchmarks/**/*.js'],
fa699c42 130 rules: {
a17cc27a 131 'jsdoc/require-jsdoc': 'off'
fa699c42 132 }
583a27ce 133 },
d44e66fc
JB
134 {
135 files: ['benchmarks/versus-external-pools/**/*.js'],
136 rules: {
2f8c5b5c 137 'n/no-missing-require': 'off'
d44e66fc
JB
138 }
139 },
583a27ce
JB
140 {
141 files: ['examples/**/*.js'],
142 rules: {
2f8c5b5c 143 'n/no-missing-require': 'off',
305aeaa7
JB
144 'jsdoc/require-jsdoc': 'off'
145 }
3c5eaeb9 146 }
38e795c1 147 ]
6a6e81d0 148})