X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=0a343d6b4e4f5899bd8b7d4f3a80aa541d602c0b;hb=73491b698f5793d8a927fcbf87c268312f83b411;hp=5c52e0f02b5b11cbb743d115c0def7d20e634531;hpb=38e795c12f0e9daeff7b025147f36f85f486366e;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 5c52e0f0..0a343d6b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,12 +4,12 @@ const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ root: true, env: { - es2021: true, + es2022: true, node: true, mocha: true }, parserOptions: { - ecmaVersion: 2021, + ecmaVersion: 2022, sourceType: 'module' }, plugins: ['promise', 'spellcheck'], @@ -19,8 +19,6 @@ module.exports = defineConfig({ 'plugin:promise/recommended' ], rules: { - 'no-void': 'off', - 'sort-imports': [ 'warn', { @@ -33,6 +31,7 @@ module.exports = defineConfig({ 'warn', { skipWords: [ + 'Benoit', 'benny', 'browserslist', 'builtins', @@ -42,19 +41,27 @@ module.exports = defineConfig({ 'cpu', 'cpus', 'ctx', + 'deprecations', + 'dequeue', 'ecma', + 'enqueue', 'enum', + 'errored', + 'esm', 'fibonacci', 'fs', 'inheritDoc', 'jsdoc', 'microjob', + 'mjs', 'num', 'os', 'piscina', + 'pnpm', 'poolifier', 'poolify', 'readonly', + 'resize', 'serializable', 'sinon', 'threadjs', @@ -65,7 +72,8 @@ module.exports = defineConfig({ 'unlink', 'unregister', 'utf8', - 'workerpool' + 'workerpool', + 'wwr' ], skipIfMatch: ['^@.*', '^plugin:.*'] } @@ -83,20 +91,14 @@ module.exports = defineConfig({ 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'standard-with-typescript', - 'plugin:import/typescript' + 'plugin:import/typescript', + 'standard-with-typescript' ], rules: { - // We have some intentionally empty functions - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-inferrable-types': [ 'error', { ignoreProperties: true } ], - - 'no-useless-constructor': 'off', - 'tsdoc/syntax': 'warn' } }, @@ -110,9 +112,9 @@ module.exports = defineConfig({ } }, { - files: ['**/*.js'], + files: ['**/*.js', '**/*.mjs'], plugins: ['jsdoc'], - extends: ['plugin:n/recommended', 'standard', 'plugin:jsdoc/recommended'] + extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard'] }, { files: ['tests/**/*.js'],