build(deps-dev): bump tatami-ng from 0.3.0 to 0.3.1
[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 'mjs',
72 'nodemailer',
73 'npx',
74 'num',
75 'os',
76 'perf',
77 'piscina',
78 'pnpm',
79 'poolifier',
80 'prepend',
81 'prepends',
82 'positionals',
83 'readdir',
84 'readonly',
85 'req',
86 'resize',
87 'sinon',
88 'smtp',
89 'threadjs',
90 'threadwork',
91 'tinypool',
92 'tld',
93 'tos',
94 'tsconfig',
95 'tsdoc',
96 'typedoc',
97 'unlink',
98 'unref',
99 'utf8',
100 'workerpool',
101 'ws',
102 'wss',
103 'wwr'
104 ],
105 skipIfMatch: ['^@.*', '^plugin:.*']
106 }
107 ]
108 },
109 overrides: [
110 {
111 files: ['**/*.ts'],
112 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
113 parser: '@typescript-eslint/parser',
114 parserOptions: {
115 project: './tsconfig.json'
116 },
117 extends: [
118 'plugin:@typescript-eslint/strict-type-checked',
119 'plugin:@typescript-eslint/stylistic-type-checked',
120 'plugin:import/typescript',
121 'love'
122 ],
123 rules: {
124 'operator-linebreak': 'off',
125 'tsdoc/syntax': 'warn'
126 }
127 },
128 {
129 files: ['examples/typescript/**/*.ts'],
130 rules: {
131 'import/no-unresolved': [
132 'error',
133 {
134 ignore: [
135 '^axios$',
136 '^express$',
137 '^fastify$',
138 '^fastify-plugin$',
139 '^node-fetch$',
140 '^nodemailer$',
141 '^poolifier$',
142 '^ws$'
143 ]
144 }
145 ],
146 '@typescript-eslint/no-unsafe-argument': 'off',
147 '@typescript-eslint/no-unsafe-call': 'off',
148 '@typescript-eslint/no-unsafe-return': 'off',
149 '@typescript-eslint/no-unsafe-assignment': 'off',
150 '@typescript-eslint/no-unsafe-member-access': 'off',
151 '@typescript-eslint/no-unnecessary-type-assertion': 'off',
152 '@typescript-eslint/no-redundant-type-constituents': 'off',
153 '@typescript-eslint/strict-boolean-expressions': 'off',
154 '@typescript-eslint/return-await': 'off',
155 '@typescript-eslint/no-non-null-assertion': 'off'
156 }
157 },
158 {
159 files: ['**/*.cjs', '**/*.js', '**/*.mjs'],
160 plugins: ['jsdoc'],
161 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
162 },
163 {
164 files: ['tests/**/*.cjs', 'tests/**/*.js', 'tests/**/*.mjs'],
165 rules: {
166 'jsdoc/require-jsdoc': 'off'
167 }
168 },
169 {
170 files: [
171 'benchmarks/**/*.cjs',
172 'benchmarks/**/*.js',
173 'benchmarks/**/*.mjs'
174 ],
175 rules: {
176 'jsdoc/require-jsdoc': 'off'
177 }
178 },
179 {
180 files: ['examples/javascript/**/*.cjs', 'examples/javascript/**/*.js'],
181 rules: {
182 'jsdoc/require-jsdoc': 'off'
183 }
184 }
185 ]
186 })