Commit | Line | Data |
---|---|---|
6a6e81d0 S |
1 | const { defineConfig } = require('eslint-define-config') |
2 | ||
3 | module.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: { |
54541487 | 11 | ecmaVersion: 2022, |
6d0425b4 JB |
12 | sourceType: 'module' |
13 | }, | |
38e795c1 | 14 | plugins: ['promise', 'spellcheck'], |
777b7824 | 15 | extends: [ |
777b7824 | 16 | 'eslint:recommended', |
305aeaa7 | 17 | 'plugin:import/recommended', |
78cea37e | 18 | 'plugin:promise/recommended' |
777b7824 S |
19 | ], |
20 | rules: { | |
fa699c42 JB |
21 | 'sort-imports': [ |
22 | 'warn', | |
23 | { | |
24 | ignoreMemberSort: true, | |
50aa7901 | 25 | ignoreDeclarationSort: true |
fa699c42 | 26 | } |
5c5a1fb7 S |
27 | ], |
28 | ||
29 | 'spellcheck/spell-checker': [ | |
30 | 'warn', | |
31 | { | |
32 | skipWords: [ | |
d21911e6 | 33 | 'Benoit', |
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', |
adc3c320 | 44 | 'dequeue', |
5c5a1fb7 | 45 | 'ecma', |
adc3c320 | 46 | 'enqueue', |
3832ad95 | 47 | 'enum', |
02706357 | 48 | 'errored', |
e5a5c0fc | 49 | 'esm', |
bdaf31cd | 50 | 'fibonacci', |
7a6a0a96 | 51 | 'fs', |
a76fac14 | 52 | 'inheritDoc', |
5c5a1fb7 | 53 | 'jsdoc', |
7a6a0a96 | 54 | 'microjob', |
fe18768d | 55 | 'mjs', |
fe2f6f84 | 56 | 'num', |
23ff945a | 57 | 'os', |
7a6a0a96 | 58 | 'piscina', |
8d75fd5f | 59 | 'pnpm', |
a35560ba | 60 | 'poolifier', |
7a6a0a96 | 61 | 'poolify', |
5c5a1fb7 | 62 | 'readonly', |
d21911e6 | 63 | 'resize', |
5c5a1fb7 | 64 | 'serializable', |
a3809289 | 65 | 'sinon', |
7a6a0a96 JB |
66 | 'threadjs', |
67 | 'threadwork', | |
7d82d90e | 68 | 'tsconfig', |
38e795c1 | 69 | 'tsdoc', |
fe2f6f84 | 70 | 'typedoc', |
7a6a0a96 | 71 | 'unlink', |
5c5a1fb7 | 72 | 'unregister', |
7a6a0a96 | 73 | 'utf8', |
2fc5cae3 JB |
74 | 'workerpool', |
75 | 'wwr' | |
5c5a1fb7 S |
76 | ], |
77 | skipIfMatch: ['^@.*', '^plugin:.*'] | |
78 | } | |
777b7824 | 79 | ] |
3c5eaeb9 JB |
80 | }, |
81 | overrides: [ | |
50eceb07 | 82 | { |
a17cc27a | 83 | files: ['**/*.ts'], |
38e795c1 | 84 | plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'], |
815d4289 | 85 | parser: '@typescript-eslint/parser', |
f3636726 | 86 | parserOptions: { |
2092c35f | 87 | project: './tsconfig.eslint.json' |
f3636726 | 88 | }, |
a17cc27a | 89 | extends: [ |
f3636726 | 90 | 'plugin:@typescript-eslint/eslint-recommended', |
a17cc27a | 91 | 'plugin:@typescript-eslint/recommended', |
f3636726 | 92 | 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
3aa14de1 JB |
93 | 'plugin:import/typescript', |
94 | 'standard-with-typescript' | |
a17cc27a | 95 | ], |
50eceb07 | 96 | rules: { |
a17cc27a JB |
97 | '@typescript-eslint/no-inferrable-types': [ |
98 | 'error', | |
99 | { ignoreProperties: true } | |
100 | ], | |
afc003b2 | 101 | 'tsdoc/syntax': 'warn' |
50eceb07 S |
102 | } |
103 | }, | |
7a6a0a96 JB |
104 | { |
105 | files: ['examples/typescript/**/*.ts'], | |
106 | rules: { | |
107 | 'import/no-unresolved': 'off', | |
7a6a0a96 JB |
108 | '@typescript-eslint/no-unsafe-argument': 'off', |
109 | '@typescript-eslint/no-unsafe-call': 'off', | |
110 | '@typescript-eslint/no-unsafe-assignment': 'off' | |
111 | } | |
112 | }, | |
3c5eaeb9 | 113 | { |
30eafb1e | 114 | files: ['**/*.js', '**/*.mjs'], |
38e795c1 | 115 | plugins: ['jsdoc'], |
3aa14de1 | 116 | extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'] |
fa699c42 JB |
117 | }, |
118 | { | |
305aeaa7 JB |
119 | files: ['tests/**/*.js'], |
120 | rules: { | |
121 | 'jsdoc/require-jsdoc': 'off' | |
122 | } | |
123 | }, | |
4bf99d51 JB |
124 | { |
125 | files: ['tests/pools/selection-strategies/**/*.js'], | |
126 | rules: { | |
2f8c5b5c | 127 | 'n/no-missing-require': 'off' |
4bf99d51 JB |
128 | } |
129 | }, | |
305aeaa7 JB |
130 | { |
131 | files: ['benchmarks/**/*.js'], | |
fa699c42 | 132 | rules: { |
a17cc27a | 133 | 'jsdoc/require-jsdoc': 'off' |
fa699c42 | 134 | } |
583a27ce | 135 | }, |
d44e66fc JB |
136 | { |
137 | files: ['benchmarks/versus-external-pools/**/*.js'], | |
138 | rules: { | |
2f8c5b5c | 139 | 'n/no-missing-require': 'off' |
d44e66fc JB |
140 | } |
141 | }, | |
583a27ce JB |
142 | { |
143 | files: ['examples/**/*.js'], | |
144 | rules: { | |
2f8c5b5c | 145 | 'n/no-missing-require': 'off', |
305aeaa7 JB |
146 | 'jsdoc/require-jsdoc': 'off' |
147 | } | |
3c5eaeb9 | 148 | } |
38e795c1 | 149 | ] |
6a6e81d0 | 150 | }) |