feat: use monotonic high resolution timer for worker tasks statistics
[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: [
ca6c7d70 34 'benny',
fe2f6f84 35 'browserslist',
e4bc7a49 36 'builtins',
5c5a1fb7 37 'christopher',
7a6a0a96 38 'cjs',
74750c7f 39 'comparator',
23ff945a
JB
40 'cpu',
41 'cpus',
7a6a0a96 42 'ctx',
30eafb1e 43 'deprecations',
5c5a1fb7 44 'ecma',
3832ad95 45 'enum',
e5a5c0fc 46 'esm',
bdaf31cd 47 'fibonacci',
7a6a0a96 48 'fs',
3fafb1b2 49 'hrtime',
a76fac14 50 'inheritDoc',
5c5a1fb7 51 'jsdoc',
7a6a0a96 52 'microjob',
fe18768d 53 'mjs',
fe2f6f84 54 'num',
23ff945a 55 'os',
7a6a0a96 56 'piscina',
8d75fd5f 57 'pnpm',
a35560ba 58 'poolifier',
7a6a0a96 59 'poolify',
5c5a1fb7
S
60 'readonly',
61 'serializable',
a3809289 62 'sinon',
7a6a0a96
JB
63 'threadjs',
64 'threadwork',
7d82d90e 65 'tsconfig',
38e795c1 66 'tsdoc',
fe2f6f84 67 'typedoc',
7a6a0a96 68 'unlink',
5c5a1fb7 69 'unregister',
7a6a0a96 70 'utf8',
5c5a1fb7
S
71 'workerpool'
72 ],
73 skipIfMatch: ['^@.*', '^plugin:.*']
74 }
777b7824 75 ]
3c5eaeb9
JB
76 },
77 overrides: [
50eceb07 78 {
a17cc27a 79 files: ['**/*.ts'],
38e795c1 80 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
815d4289 81 parser: '@typescript-eslint/parser',
f3636726 82 parserOptions: {
f3636726
JB
83 project: './tsconfig.json'
84 },
a17cc27a 85 extends: [
f3636726 86 'plugin:@typescript-eslint/eslint-recommended',
a17cc27a 87 'plugin:@typescript-eslint/recommended',
f3636726 88 'plugin:@typescript-eslint/recommended-requiring-type-checking',
3aa14de1
JB
89 'plugin:import/typescript',
90 'standard-with-typescript'
a17cc27a 91 ],
50eceb07 92 rules: {
a17cc27a
JB
93 '@typescript-eslint/no-inferrable-types': [
94 'error',
95 { ignoreProperties: true }
96 ],
afc003b2 97 'tsdoc/syntax': 'warn'
50eceb07
S
98 }
99 },
7a6a0a96
JB
100 {
101 files: ['examples/typescript/**/*.ts'],
102 rules: {
103 'import/no-unresolved': 'off',
7a6a0a96
JB
104 '@typescript-eslint/no-unsafe-argument': 'off',
105 '@typescript-eslint/no-unsafe-call': 'off',
106 '@typescript-eslint/no-unsafe-assignment': 'off'
107 }
108 },
3c5eaeb9 109 {
30eafb1e 110 files: ['**/*.js', '**/*.mjs'],
38e795c1 111 plugins: ['jsdoc'],
3aa14de1 112 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
fa699c42
JB
113 },
114 {
305aeaa7
JB
115 files: ['tests/**/*.js'],
116 rules: {
117 'jsdoc/require-jsdoc': 'off'
118 }
119 },
4bf99d51
JB
120 {
121 files: ['tests/pools/selection-strategies/**/*.js'],
122 rules: {
2f8c5b5c 123 'n/no-missing-require': 'off'
4bf99d51
JB
124 }
125 },
305aeaa7
JB
126 {
127 files: ['benchmarks/**/*.js'],
fa699c42 128 rules: {
a17cc27a 129 'jsdoc/require-jsdoc': 'off'
fa699c42 130 }
583a27ce 131 },
d44e66fc
JB
132 {
133 files: ['benchmarks/versus-external-pools/**/*.js'],
134 rules: {
2f8c5b5c 135 'n/no-missing-require': 'off'
d44e66fc
JB
136 }
137 },
583a27ce
JB
138 {
139 files: ['examples/**/*.js'],
140 rules: {
2f8c5b5c 141 'n/no-missing-require': 'off',
305aeaa7
JB
142 'jsdoc/require-jsdoc': 'off'
143 }
3c5eaeb9 144 }
38e795c1 145 ]
6a6e81d0 146})