Merge pull request #2172 from poolifier/dependabot/npm_and_yarn/tatami-ng-0.3.1
[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',
fe2f6f84 38 'browserslist',
e4bc7a49 39 'builtins',
5c5a1fb7 40 'christopher',
7a6a0a96 41 'cjs',
e102732c 42 'cloneable',
74750c7f 43 'comparator',
23ff945a
JB
44 'cpu',
45 'cpus',
147be6fe 46 'cryptographically',
7a6a0a96 47 'ctx',
30eafb1e 48 'deprecations',
574b351d 49 'deque',
adc3c320 50 'dequeue',
a0d41544 51 'dequeued',
dad86fd8 52 'deregisters',
b40c4b06 53 'dts',
5c5a1fb7 54 'ecma',
62c15a68 55 'elu',
adc3c320 56 'enqueue',
3832ad95 57 'enum',
02706357 58 'errored',
e5a5c0fc 59 'esm',
a8706532 60 'fastify',
bdaf31cd 61 'fibonacci',
a8706532 62 'fp',
7a6a0a96 63 'fs',
e97e8563 64 'func',
a76fac14 65 'inheritDoc',
02999424 66 'javascript',
5c5a1fb7 67 'jsdoc',
a29a2fac 68 'linebreak',
72855e92 69 'localhost',
7a6a0a96 70 'microjob',
fe18768d 71 'mjs',
3c5dc3fb 72 'nodemailer',
2ab81545 73 'npx',
fe2f6f84 74 'num',
23ff945a 75 'os',
62c15a68 76 'perf',
7a6a0a96 77 'piscina',
8d75fd5f 78 'pnpm',
a35560ba 79 'poolifier',
574b351d
JB
80 'prepend',
81 'prepends',
0804b9b4 82 'positionals',
02999424 83 'readdir',
5c5a1fb7 84 'readonly',
167c661c 85 'req',
d21911e6 86 'resize',
a3809289 87 'sinon',
9aef1431 88 'smtp',
7a6a0a96
JB
89 'threadjs',
90 'threadwork',
afd32690 91 'tinypool',
88c482fa
JB
92 'tld',
93 'tos',
7d82d90e 94 'tsconfig',
38e795c1 95 'tsdoc',
fe2f6f84 96 'typedoc',
7a6a0a96 97 'unlink',
dcd9851c 98 'unref',
7a6a0a96 99 'utf8',
2fc5cae3 100 'workerpool',
72855e92
JB
101 'ws',
102 'wss',
2fc5cae3 103 'wwr'
5c5a1fb7
S
104 ],
105 skipIfMatch: ['^@.*', '^plugin:.*']
106 }
777b7824 107 ]
3c5eaeb9
JB
108 },
109 overrides: [
50eceb07 110 {
a17cc27a 111 files: ['**/*.ts'],
38e795c1 112 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
815d4289 113 parser: '@typescript-eslint/parser',
f3636726 114 parserOptions: {
7d1fc6d3 115 project: './tsconfig.json'
f3636726 116 },
a17cc27a 117 extends: [
c63a35a0
JB
118 'plugin:@typescript-eslint/strict-type-checked',
119 'plugin:@typescript-eslint/stylistic-type-checked',
3aa14de1 120 'plugin:import/typescript',
7471ae6b 121 'love'
a17cc27a 122 ],
50eceb07 123 rules: {
67f3f2d6 124 'operator-linebreak': 'off',
afc003b2 125 'tsdoc/syntax': 'warn'
50eceb07
S
126 }
127 },
7a6a0a96
JB
128 {
129 files: ['examples/typescript/**/*.ts'],
130 rules: {
26bb464f
JB
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 ],
7288e334 146 '@typescript-eslint/no-unsafe-argument': 'off',
7a6a0a96 147 '@typescript-eslint/no-unsafe-call': 'off',
7288e334 148 '@typescript-eslint/no-unsafe-return': 'off',
95e50651 149 '@typescript-eslint/no-unsafe-assignment': 'off',
7288e334
JB
150 '@typescript-eslint/no-unsafe-member-access': 'off',
151 '@typescript-eslint/no-unnecessary-type-assertion': 'off',
417b3b41 152 '@typescript-eslint/no-redundant-type-constituents': 'off',
7288e334 153 '@typescript-eslint/strict-boolean-expressions': 'off',
8b81cdcf 154 '@typescript-eslint/return-await': 'off',
67f3f2d6 155 '@typescript-eslint/no-non-null-assertion': 'off'
7a6a0a96
JB
156 }
157 },
3c5eaeb9 158 {
28883f84 159 files: ['**/*.cjs', '**/*.js', '**/*.mjs'],
38e795c1 160 plugins: ['jsdoc'],
3aa14de1 161 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
fa699c42
JB
162 },
163 {
28883f84 164 files: ['tests/**/*.cjs', 'tests/**/*.js', 'tests/**/*.mjs'],
305aeaa7
JB
165 rules: {
166 'jsdoc/require-jsdoc': 'off'
167 }
168 },
169 {
28883f84
JB
170 files: [
171 'benchmarks/**/*.cjs',
172 'benchmarks/**/*.js',
173 'benchmarks/**/*.mjs'
174 ],
fa699c42 175 rules: {
a17cc27a 176 'jsdoc/require-jsdoc': 'off'
fa699c42 177 }
583a27ce
JB
178 },
179 {
28883f84 180 files: ['examples/javascript/**/*.cjs', 'examples/javascript/**/*.js'],
583a27ce 181 rules: {
305aeaa7
JB
182 'jsdoc/require-jsdoc': 'off'
183 }
3c5eaeb9 184 }
38e795c1 185 ]
6a6e81d0 186})