test: add fixed priority queue get() test
[poolifier.git] / .eslintrc.cjs
CommitLineData
6a6e81d0
S
1const { defineConfig } = require('eslint-define-config')
2
3module.exports = defineConfig({
97c16550 4 root: true,
777b7824 5 env: {
54541487 6 es2022: true,
777b7824
S
7 node: true,
8 mocha: true
9 },
6d0425b4 10 parserOptions: {
ded253e2
JB
11 sourceType: 'module',
12 ecmaVersion: 2022
6d0425b4 13 },
ded253e2 14 plugins: ['simple-import-sort', 'promise', 'spellcheck'],
777b7824 15 extends: [
777b7824 16 'eslint:recommended',
305aeaa7 17 'plugin:import/recommended',
78cea37e 18 'plugin:promise/recommended'
777b7824 19 ],
b70e9c5e
JB
20 settings: {
21 'import/resolver': {
22 typescript: {
7d1fc6d3 23 project: './tsconfig.json'
b70e9c5e
JB
24 }
25 }
26 },
777b7824 27 rules: {
ded253e2
JB
28 'simple-import-sort/imports': 'error',
29 'simple-import-sort/exports': 'error',
5c5a1fb7
S
30
31 'spellcheck/spell-checker': [
32 'warn',
33 {
34 skipWords: [
0804b9b4 35 'argv',
d68ce4c6 36 'axios',
494d9576 37 'benoit',
8f01ffbe 38 'bmf',
fe2f6f84 39 'browserslist',
e4bc7a49 40 'builtins',
5c5a1fb7 41 'christopher',
7a6a0a96 42 'cjs',
e102732c 43 'cloneable',
74750c7f 44 'comparator',
23ff945a
JB
45 'cpu',
46 'cpus',
147be6fe 47 'cryptographically',
7a6a0a96 48 'ctx',
65729b19 49 'decrement',
30eafb1e 50 'deprecations',
574b351d 51 'deque',
adc3c320 52 'dequeue',
a0d41544 53 'dequeued',
dad86fd8 54 'deregisters',
b40c4b06 55 'dts',
5c5a1fb7 56 'ecma',
62c15a68 57 'elu',
adc3c320 58 'enqueue',
3832ad95 59 'enum',
02706357 60 'errored',
e5a5c0fc 61 'esm',
a8706532 62 'fastify',
bdaf31cd 63 'fibonacci',
a8706532 64 'fp',
7a6a0a96 65 'fs',
e97e8563 66 'func',
f12182ad 67 'idx',
a76fac14 68 'inheritDoc',
02999424 69 'javascript',
5c5a1fb7 70 'jsdoc',
a29a2fac 71 'linebreak',
72855e92 72 'localhost',
7a6a0a96 73 'microjob',
fe18768d 74 'mjs',
3c5dc3fb 75 'nodemailer',
2ab81545 76 'npx',
fe2f6f84 77 'num',
23ff945a 78 'os',
62c15a68 79 'perf',
7a6a0a96 80 'piscina',
8d75fd5f 81 'pnpm',
a35560ba 82 'poolifier',
574b351d
JB
83 'prepend',
84 'prepends',
0804b9b4 85 'positionals',
02999424 86 'readdir',
5c5a1fb7 87 'readonly',
167c661c 88 'req',
d21911e6 89 'resize',
a3809289 90 'sinon',
9aef1431 91 'smtp',
7a6a0a96
JB
92 'threadjs',
93 'threadwork',
afd32690 94 'tinypool',
88c482fa
JB
95 'tld',
96 'tos',
7d82d90e 97 'tsconfig',
38e795c1 98 'tsdoc',
fe2f6f84 99 'typedoc',
7a6a0a96 100 'unlink',
dcd9851c 101 'unref',
7a6a0a96 102 'utf8',
2fc5cae3 103 'workerpool',
72855e92
JB
104 'ws',
105 'wss',
2fc5cae3 106 'wwr'
5c5a1fb7
S
107 ],
108 skipIfMatch: ['^@.*', '^plugin:.*']
109 }
777b7824 110 ]
3c5eaeb9
JB
111 },
112 overrides: [
50eceb07 113 {
a17cc27a 114 files: ['**/*.ts'],
38e795c1 115 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
815d4289 116 parser: '@typescript-eslint/parser',
f3636726 117 parserOptions: {
7d1fc6d3 118 project: './tsconfig.json'
f3636726 119 },
a17cc27a 120 extends: [
c63a35a0
JB
121 'plugin:@typescript-eslint/strict-type-checked',
122 'plugin:@typescript-eslint/stylistic-type-checked',
3aa14de1 123 'plugin:import/typescript',
7471ae6b 124 'love'
a17cc27a 125 ],
50eceb07 126 rules: {
67f3f2d6 127 'operator-linebreak': 'off',
afc003b2 128 'tsdoc/syntax': 'warn'
50eceb07
S
129 }
130 },
7a6a0a96
JB
131 {
132 files: ['examples/typescript/**/*.ts'],
133 rules: {
26bb464f
JB
134 'import/no-unresolved': [
135 'error',
136 {
137 ignore: [
138 '^axios$',
139 '^express$',
140 '^fastify$',
141 '^fastify-plugin$',
142 '^node-fetch$',
143 '^nodemailer$',
144 '^poolifier$',
145 '^ws$'
146 ]
147 }
148 ],
7288e334 149 '@typescript-eslint/no-unsafe-argument': 'off',
7a6a0a96 150 '@typescript-eslint/no-unsafe-call': 'off',
7288e334 151 '@typescript-eslint/no-unsafe-return': 'off',
95e50651 152 '@typescript-eslint/no-unsafe-assignment': 'off',
7288e334
JB
153 '@typescript-eslint/no-unsafe-member-access': 'off',
154 '@typescript-eslint/no-unnecessary-type-assertion': 'off',
417b3b41 155 '@typescript-eslint/no-redundant-type-constituents': 'off',
7288e334 156 '@typescript-eslint/strict-boolean-expressions': 'off',
8b81cdcf 157 '@typescript-eslint/return-await': 'off',
67f3f2d6 158 '@typescript-eslint/no-non-null-assertion': 'off'
7a6a0a96
JB
159 }
160 },
3c5eaeb9 161 {
28883f84 162 files: ['**/*.cjs', '**/*.js', '**/*.mjs'],
38e795c1 163 plugins: ['jsdoc'],
3aa14de1 164 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
fa699c42
JB
165 },
166 {
28883f84 167 files: ['tests/**/*.cjs', 'tests/**/*.js', 'tests/**/*.mjs'],
305aeaa7
JB
168 rules: {
169 'jsdoc/require-jsdoc': 'off'
170 }
171 },
172 {
28883f84
JB
173 files: [
174 'benchmarks/**/*.cjs',
175 'benchmarks/**/*.js',
176 'benchmarks/**/*.mjs'
177 ],
fa699c42 178 rules: {
a17cc27a 179 'jsdoc/require-jsdoc': 'off'
fa699c42 180 }
583a27ce
JB
181 },
182 {
28883f84 183 files: ['examples/javascript/**/*.cjs', 'examples/javascript/**/*.js'],
583a27ce 184 rules: {
305aeaa7
JB
185 'jsdoc/require-jsdoc': 'off'
186 }
3c5eaeb9 187 }
38e795c1 188 ]
6a6e81d0 189})