diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e56bb2ed..3133ce1c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,28 +1,26 @@ module.exports = { env: { + browser: true, es2021: true, node: true }, + root: true, parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, + plugins: ['import', 'prettier'], extends: [ 'eslint:recommended', 'plugin:import/recommended', 'plugin:prettier/recommended' ], - plugins: ['import', 'prettier'], rules: { 'no-unused-vars': 'off', 'import/no-cycle': 2, 'prettier/prettier': [ 'error', { - singleQuote: true, - trailingComma: 'none', - semi: true, - tabWidth: 2, endOfLine: require('os').EOL === '\r\n' ? 'crlf' : 'lf' } ] diff --git a/.gitignore b/.gitignore index 6d240d33..44d1686c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ log/ tests/_temp tmp/ +dist/ .DS_Store .cache diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..b2c47ad0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +node_modules/ +dist/* +README.md diff --git a/.prettierrc b/.prettierrc index 09444c44..065ed7b5 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,7 @@ { + "trailingComma": "none", + "semi": true, "singleQuote": true, - "arrowParens": "always", - "trailingComma": "none" + "tabWidth": 2, + "printWidth": 80 } - diff --git a/README.md b/README.md index 3066495e..66dd80ff 100644 --- a/README.md +++ b/README.md @@ -307,7 +307,7 @@ These are set as variables in your environment. They take precedence over option - `HIGHCHARTS_POOL_QUEUE_SIZE`: The size of the request overflow queue. - `HIGHCHARTS_POOL_TIMEOUT`: The number of milliseconds before timing out. - `HIGHCHARTS_POOL_ACQUIRE_TIMEOUT`: The number of milliseconds to wait for acquiring a resource. -- `HIGHCHARTS_POOL_ENABLE_REAPER`: Whether or not to evict workers after a certain time period. +- `HIGHCHARTS_POOL_REAPER_ENABLE`: Whether or not to evict workers after a certain time period. - `HIGHCHARTS_POOL_BENCHMARKING`: Enable benchmarking. - `HIGHCHARTS_POOL_LISTEN_TO_PROCESS_EXITS`: Set to false in order to skip attaching process.exit handlers. diff --git a/lib/schemas/config.js b/lib/schemas/config.js index d648323e..7f14b839 100644 --- a/lib/schemas/config.js +++ b/lib/schemas/config.js @@ -412,7 +412,7 @@ export const defaultConfig = { 'The number of milliseconds to wait for acquiring a resource.' }, reaper: { - envLink: 'HIGHCHARTS_POOL_ENABLE_REAPER', + envLink: 'HIGHCHARTS_POOL_REAPER_ENABLE', value: true, type: 'boolean', description: