build(ci): temporary disable benchmark run
[poolifier.git] / .eslintrc.cjs
1 const { defineConfig } = require('eslint-define-config')
2
3 module.exports = defineConfig({
4 root: true,
5 env: {
6 es2022: true,
7 node: true,
8 mocha: true
9 },
10 parserOptions: {
11 sourceType: 'module',
12 ecmaVersion: 2022
13 },
14 plugins: ['simple-import-sort', 'promise', 'spellcheck'],
15 extends: [
16 'eslint:recommended',
17 'plugin:import/recommended',
18 'plugin:promise/recommended'
19 ],
20 settings: {
21 'import/resolver': {
22 typescript: {
23 project: './tsconfig.json'
24 }
25 }
26 },
27 rules: {
28 'simple-import-sort/imports': 'error',
29 'simple-import-sort/exports': 'error',
30
31 'spellcheck/spell-checker': [
32 'warn',
33 {
34 skipWords: [
35 'argv',
36 'axios',
37 'benoit',
38 'browserslist',
39 'builtins',
40 'christopher',
41 'cjs',
42 'cloneable',
43 'comparator',
44 'cpu',
45 'cpus',
46 'cryptographically',
47 'ctx',
48 'deprecations',
49 'deque',
50 'dequeue',
51 'dequeued',
52 'deregisters',
53 'dts',
54 'ecma',
55 'elu',
56 'enqueue',
57 'enum',
58 'errored',
59 'esm',
60 'fastify',
61 'fibonacci',
62 'fp',
63 'fs',
64 'func',
65 'inheritDoc',
66 'javascript',
67 'jsdoc',
68 'linebreak',
69 'localhost',
70 'microjob',
71 'mitata',
72 'mjs',
73 'nodemailer',
74 'npx',
75 'num',
76 'os',
77 'perf',
78 'piscina',
79 'pnpm',
80 'poolifier',
81 'prepend',
82 'prepends',
83 'positionals',
84 'readdir',
85 'readonly',
86 'req',
87 'resize',
88 'sinon',
89 'smtp',
90 'threadjs',
91 'threadwork',
92 'tinypool',
93 'tsconfig',
94 'tsdoc',
95 'typedoc',
96 'unlink',
97 'unref',
98 'utf8',
99 'workerpool',
100 'ws',
101 'wss',
102 'wwr'
103 ],
104 skipIfMatch: ['^@.*', '^plugin:.*']
105 }
106 ]
107 },
108 overrides: [
109 {
110 files: ['**/*.ts'],
111 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
112 parser: '@typescript-eslint/parser',
113 parserOptions: {
114 project: './tsconfig.json'
115 },
116 extends: [
117 'plugin:@typescript-eslint/strict-type-checked',
118 'plugin:@typescript-eslint/stylistic-type-checked',
119 'plugin:import/typescript',
120 'love'
121 ],
122 rules: {
123 'operator-linebreak': 'off',
124 'tsdoc/syntax': 'warn'
125 }
126 },
127 {
128 files: ['examples/typescript/**/*.ts'],
129 rules: {
130 'import/no-unresolved': [
131 'error',
132 {
133 ignore: [
134 '^axios$',
135 '^express$',
136 '^fastify$',
137 '^fastify-plugin$',
138 '^node-fetch$',
139 '^nodemailer$',
140 '^poolifier$',
141 '^ws$'
142 ]
143 }
144 ],
145 '@typescript-eslint/no-unsafe-argument': 'off',
146 '@typescript-eslint/no-unsafe-call': 'off',
147 '@typescript-eslint/no-unsafe-return': 'off',
148 '@typescript-eslint/no-unsafe-assignment': 'off',
149 '@typescript-eslint/no-unsafe-member-access': 'off',
150 '@typescript-eslint/no-unnecessary-type-assertion': 'off',
151 '@typescript-eslint/no-redundant-type-constituents': 'off',
152 '@typescript-eslint/strict-boolean-expressions': 'off',
153 '@typescript-eslint/return-await': 'off',
154 '@typescript-eslint/no-non-null-assertion': 'off'
155 }
156 },
157 {
158 files: ['**/*.cjs', '**/*.js', '**/*.mjs'],
159 plugins: ['jsdoc'],
160 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
161 },
162 {
163 files: ['tests/**/*.cjs', 'tests/**/*.js', 'tests/**/*.mjs'],
164 rules: {
165 'jsdoc/require-jsdoc': 'off'
166 }
167 },
168 {
169 files: [
170 'benchmarks/**/*.cjs',
171 'benchmarks/**/*.js',
172 'benchmarks/**/*.mjs'
173 ],
174 rules: {
175 'jsdoc/require-jsdoc': 'off'
176 }
177 },
178 {
179 files: ['examples/javascript/**/*.cjs', 'examples/javascript/**/*.js'],
180 rules: {
181 'jsdoc/require-jsdoc': 'off'
182 }
183 }
184 ]
185 })