docs: spell fix
[poolifier.git] / .eslintrc.js
1 // @ts-check
2 const { defineConfig } = require('eslint-define-config')
3
4 module.exports = defineConfig({
5 root: true,
6 env: {
7 es2022: true,
8 node: true,
9 mocha: true
10 },
11 parserOptions: {
12 ecmaVersion: 2022,
13 sourceType: 'module'
14 },
15 plugins: ['promise', 'spellcheck'],
16 extends: [
17 'eslint:recommended',
18 'plugin:import/recommended',
19 'plugin:promise/recommended'
20 ],
21 rules: {
22 'sort-imports': [
23 'warn',
24 {
25 ignoreMemberSort: true,
26 ignoreDeclarationSort: true
27 }
28 ],
29
30 'spellcheck/spell-checker': [
31 'warn',
32 {
33 skipWords: [
34 'Benoit',
35 'benny',
36 'browserslist',
37 'builtins',
38 'christopher',
39 'cjs',
40 'comparator',
41 'cpu',
42 'cpus',
43 'ctx',
44 'deprecations',
45 'dequeue',
46 'ecma',
47 'enqueue',
48 'enum',
49 'errored',
50 'esm',
51 'fibonacci',
52 'fs',
53 'inheritDoc',
54 'jsdoc',
55 'microjob',
56 'mjs',
57 'num',
58 'os',
59 'piscina',
60 'pnpm',
61 'poolifier',
62 'poolify',
63 'readonly',
64 'resize',
65 'serializable',
66 'sinon',
67 'threadjs',
68 'threadwork',
69 'tsconfig',
70 'tsdoc',
71 'typedoc',
72 'unlink',
73 'unregister',
74 'utf8',
75 'workerpool'
76 ],
77 skipIfMatch: ['^@.*', '^plugin:.*']
78 }
79 ]
80 },
81 overrides: [
82 {
83 files: ['**/*.ts'],
84 plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
85 parser: '@typescript-eslint/parser',
86 parserOptions: {
87 project: './tsconfig.json'
88 },
89 extends: [
90 'plugin:@typescript-eslint/eslint-recommended',
91 'plugin:@typescript-eslint/recommended',
92 'plugin:@typescript-eslint/recommended-requiring-type-checking',
93 'plugin:import/typescript',
94 'standard-with-typescript'
95 ],
96 rules: {
97 '@typescript-eslint/no-inferrable-types': [
98 'error',
99 { ignoreProperties: true }
100 ],
101 'tsdoc/syntax': 'warn'
102 }
103 },
104 {
105 files: ['examples/typescript/**/*.ts'],
106 rules: {
107 'import/no-unresolved': 'off',
108 '@typescript-eslint/no-unsafe-argument': 'off',
109 '@typescript-eslint/no-unsafe-call': 'off',
110 '@typescript-eslint/no-unsafe-assignment': 'off'
111 }
112 },
113 {
114 files: ['**/*.js', '**/*.mjs'],
115 plugins: ['jsdoc'],
116 extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
117 },
118 {
119 files: ['tests/**/*.js'],
120 rules: {
121 'jsdoc/require-jsdoc': 'off'
122 }
123 },
124 {
125 files: ['tests/pools/selection-strategies/**/*.js'],
126 rules: {
127 'n/no-missing-require': 'off'
128 }
129 },
130 {
131 files: ['benchmarks/**/*.js'],
132 rules: {
133 'jsdoc/require-jsdoc': 'off'
134 }
135 },
136 {
137 files: ['benchmarks/versus-external-pools/**/*.js'],
138 rules: {
139 'n/no-missing-require': 'off'
140 }
141 },
142 {
143 files: ['examples/**/*.js'],
144 rules: {
145 'n/no-missing-require': 'off',
146 'jsdoc/require-jsdoc': 'off'
147 }
148 }
149 ]
150 })