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