X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.cjs;h=ef9e86c091254a8920eecfbe2706ff2c2d71736a;hb=HEAD;hp=ccf04244362008396ba0ce730697bae073b49dfe;hpb=28883f84b5381bb9af4c71e3bccd5297f6ab5fcf;p=poolifier.git diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index ccf04244..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,185 +0,0 @@ -const { defineConfig } = require('eslint-define-config') - -module.exports = defineConfig({ - root: true, - env: { - es2022: true, - node: true, - mocha: true - }, - parserOptions: { - ecmaVersion: 2022, - sourceType: 'module' - }, - plugins: ['promise', 'spellcheck'], - extends: [ - 'eslint:recommended', - 'plugin:import/recommended', - 'plugin:promise/recommended' - ], - settings: { - 'import/resolver': { - typescript: { - project: './tsconfig.json' - } - } - }, - rules: { - 'sort-imports': [ - 'error', - { - ignoreDeclarationSort: true - } - ], - 'import/order': 'error', - - 'spellcheck/spell-checker': [ - 'warn', - { - skipWords: [ - 'axios', - 'benoit', - 'browserslist', - 'builtins', - 'christopher', - 'cjs', - 'cloneable', - 'comparator', - 'cpu', - 'cpus', - 'cryptographically', - 'ctx', - 'deprecations', - 'deque', - 'dequeue', - 'dequeued', - 'deregisters', - 'dts', - 'ecma', - 'elu', - 'enqueue', - 'enum', - 'errored', - 'esm', - 'fastify', - 'fibonacci', - 'fp', - 'fs', - 'func', - 'inheritDoc', - 'javascript', - 'jsdoc', - 'localhost', - 'microjob', - 'mjs', - 'nodemailer', - 'npx', - 'num', - 'os', - 'perf', - 'piscina', - 'pnpm', - 'poolifier', - 'prepend', - 'prepends', - 'readdir', - 'readonly', - 'req', - 'resize', - 'sinon', - 'smtp', - 'threadjs', - 'threadwork', - 'tinypool', - 'tsconfig', - 'tsdoc', - 'typedoc', - 'unlink', - 'unref', - 'utf8', - 'workerpool', - 'ws', - 'wss', - 'wwr' - ], - skipIfMatch: ['^@.*', '^plugin:.*'] - } - ] - }, - overrides: [ - { - files: ['**/*.ts'], - plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: './tsconfig.json' - }, - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'plugin:import/typescript', - 'standard-with-typescript' - ], - rules: { - '@typescript-eslint/non-nullable-type-assertion-style': 'off', - 'tsdoc/syntax': 'warn' - } - }, - { - files: ['examples/typescript/**/*.ts'], - rules: { - 'import/no-unresolved': [ - 'error', - { - ignore: [ - '^axios$', - '^express$', - '^fastify$', - '^fastify-plugin$', - '^node-fetch$', - '^nodemailer$', - '^poolifier$', - '^ws$' - ] - } - ], - '@typescript-eslint/no-unsafe-argument': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unnecessary-type-assertion': 'off', - '@typescript-eslint/no-redundant-type-constituents': 'off', - '@typescript-eslint/strict-boolean-expressions': 'off', - '@typescript-eslint/return-await': 'off' - } - }, - { - files: ['**/*.cjs', '**/*.js', '**/*.mjs'], - plugins: ['jsdoc'], - extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'] - }, - { - files: ['tests/**/*.cjs', 'tests/**/*.js', 'tests/**/*.mjs'], - rules: { - 'jsdoc/require-jsdoc': 'off' - } - }, - { - files: [ - 'benchmarks/**/*.cjs', - 'benchmarks/**/*.js', - 'benchmarks/**/*.mjs' - ], - rules: { - 'jsdoc/require-jsdoc': 'off' - } - }, - { - files: ['examples/javascript/**/*.cjs', 'examples/javascript/**/*.js'], - rules: { - 'jsdoc/require-jsdoc': 'off' - } - } - ] -})