Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@voxpelli/eslint-config

voxpelli3.8kMIT22.2.0TypeScript support: included

My personal ESLint config. Based on neostandard

readme

@voxpelli/eslint-config

npm version npm downloads neostandard javascript style Follow @voxpelli@mastodon.social

My personal ESLint config – a superset of the neostandard base config that I co-created and co-maintain.

This config contains a couple of more opinionated checks that I find helpful in my projects.

Install

To easily install correct peer dependencies, you can use install-peerdeps:

install-peerdeps --dev @voxpelli/eslint-config

Usage

Add an eslint.config.js (or eslint.config.mjs if your project is CJS) that exports this config:

export { default } from '@voxpelli/eslint-config';

If you need to configure something, instead do:

import { voxpelli } from '@voxpelli/eslint-config';

export default voxpelli({
  cjs: true,     // Ensures the config has rules fit for a CJS context rather than an ESM context
  noMocha: true, // By standard this config expects tests to be of the Mocha kind, but one can opt out
});

You can also do custom extensions:

import { voxpelli } from '@voxpelli/eslint-config';

export default [
  ...voxpelli({
    // Config options
  }),
  {
    // Custom ESLint config
  },
];

#

How does this differ from pure neostandard?

  • :stop_sign: = changed to error level
  • :warning: = changed to warn level
  • :mute: = deactivated
  • :wrench: = changed config

:wrench: Changed neostandard rules

  • :wrench: @stylistic/comma-danglechanged – set to enforce dangling commas in arrays, objects, imports and exports
  • :wrench: no-unused-varschanged – sets "args": "all", "argsIgnorePattern": "^_", because I personally don't feel limited by Express error handlers + wants to stay in sync with TypeScript noUnusedParameters

:heavy_plus_sign: Added ESLint core rules

  • :warning: func-style – disallows function declarations, good to be consistent with how functions are declared
  • :warning: no-console – warns on existence of console.log and similar, as they are mostly used for debugging and should not be committed
  • :stop_sign: no-constant-binary-expression – errors when binary expressions are detected to constantly evaluate a specific way
  • :stop_sign: no-nonoctal-decimal-escape – there's no reason not to ban it
  • :stop_sign: no-unsafe-optional-chaining – enforces one to be careful with .? and not use it in ways that can inadvertently cause errors or NaN results
  • :warning: no-warning-comments – warns of the existence of FIXME comments, as they should always be fixed before pushing
  • :stop_sign: object-shorthand – requires the use of object shorthands for properties, more tidy

:package: Added ESLint rule packages

:wrench: Overrides of added ESLint rule packages

:heavy_plus_sign: Additional standalone ESLint rules

  • :stop_sign: @stylistic/quote-props – requires properties to be quoted when needed but otherwise disallows it

  • :warning: es-x/no-exponential-operators – disallows the use of the ** operator, as that's in most cases a mistake and one really meant to write *

ESM specific rules

Unless one configures cjs: true these additional rules will be applied:

:wrench: Overrides of rules

  • :warning: func-style – enforces function declarations whenever an arrow function isn't used. Better to do export function foo () { than export const foo = function () {
  • :stop_sign: unicorn/prefer-modulechanged – restored to its plugin:unicorn/recommended value of error

Can I use this in my own project?

You may want to use neostandard instead, it's the general base config that I help maintain for the community.

I do maintain this project though as if multiple people are using it, so sure, you can use it, but its ultimate purpose is to support my projects.

I do follow semantic versioning, so the addition or tightening of any checks will trigger major releases whereas minor and patch releases should only ever have relaxation of rules and bug fixes.

Alternatives

See also

changelog

Changelog

22.2.0 (2024-12-02)

🌟 Features

  • deps: update dependency eslint-plugin-jsdoc to ^50.6.0 (#386) (cdc54d6)

🩹 Fixes

  • deps: update dependency eslint-plugin-es-x to ^8.4.1 (#385) (a3959bc)
  • deps: update neostandard (56da8cd)

🧹 Chores

22.1.0 (2024-11-20)

🌟 Features

  • deps: update dependency eslint-plugin-es-x to ^8.1.0 (#377) (2ca3fbb)
  • deps: update dependency eslint-plugin-jsdoc to ^50.5.0 (#378) (04f6893)
  • deps: update dependency eslint-plugin-regexp to ^2.7.0 (#379) (d6efb98)

🩹 Fixes

  • deps: update dependency eslint-plugin-unicorn to ^56.0.1 (#381) (1011df6)

🧹 Chores

  • deps: lock file maintenance (#376) (019a6e6)
  • deps: update dependency @types/node to ^18.19.64 (#351) (767a322)
  • deps: update dependency husky to ^9.1.7 (#380) (6951836)
  • deps: update dependency knip to ^5.34.0 (#356) (638bbad)
  • deps: update dependency npm-run-all2 to v7 (#370) (6374ee1)
  • deps: update linting dependencies (#375) (3658b8e)

22.0.0 (2024-10-24)

⚠ BREAKING CHANGES

  • add eslint-plugin-regexp recommended (#373)
  • update dependency eslint-plugin-unicorn to v56 (#371)
  • deps: update neostandard and eslint

🌟 Features

  • add eslint-plugin-regexp recommended (#373) (523197d)
  • deps: update dependency eslint-plugin-jsdoc to ^50.4.3 (#368) (a66f39c)
  • deps: update neostandard and eslint (b2ce5e2)
  • update dependency eslint-plugin-unicorn to v56 (#371) (f009a44)

🧹 Chores

  • deps: lock file maintenance (#359) (af501fd)
  • deps: update dev dependencies (b2dbbd8)
  • deps: update to latest npm-run-all2 6.x (80f5910)

21.0.0 (2024-08-20)

⚠ BREAKING CHANGES

  • update eslint-plugin-unicorn to v55

🌟 Features

  • update eslint-plugin-unicorn to v55 (c6c717c)

🩹 Fixes

20.1.0 (2024-08-20)

🌟 Features

  • deps: update dependency eslint-plugin-mocha to ^10.5.0 (#363) (9440a7d)

🩹 Fixes

  • update neostandard, but keep comma-dangle (40a43b9)
  • use @types/eslint@9.x (f6ed27d)

📚 Documentation

🧹 Chores

  • add "types": ["node"] to tsconfig.json (85b223a)
  • add some plugin @types/ (5989b99)
  • deps: update dependency eslint-plugin-jsdoc to v50 (#361) (15f269f)
  • deps: update husky and knip (429da48)
  • deps: update type dependencies (4f92135)
  • husky script tweak (2c8b953)
  • improve renovate grouping (e247ece)
  • improve renovate pattern matching (6feb945)

20.0.1 (2024-07-21)

🩹 Fixes

  • deactivate n/no-unsupported-features/es-syntax in *.ts files (#353) (0ff9dc1)
  • do not publish eslint.config.js (0570f29)

📚 Documentation

🧹 Chores

20.0.0 (2024-07-12)

To summarize the changes from all the alpha and beta releases of 20.0.0:

  • BREAKING: Requires ESLint 9 now
  • BREAKING: Is an ESLint Flat Config now, which means replacing .eslintrc with eslint.config.js / eslint.config.mjs
  • BREAKING: Now has only a single peer dependency: ESLint. Plugins should no longer be added separately.
  • BREAKING: Based on neostandard

No intentional rule changes has been made, but the import/* rules have been deactivated as eslint-plugin-import has not yet been possible to add to neostandard, due to lack of ESLint 9 support

20.0.0-beta.6 (2024-07-11)

🌟 Features

📚 Documentation

🧹 Chores

  • deps: lock file maintenance (#269) (303d306)
  • deps: update dependency eslint-plugin-es-x to v8 (#342) (f1a872b)
  • deps: update dependency knip to ^5.25.2 (#334) (5b152d4)
  • deps: update dependency list-dependents-cli to ^2.4.0 (#325) (4b1a438)
  • deps: update dependency npm-run-all2 to ^6.2.2 (#343) (33c5e11)
  • deps: update dependency validate-conventional-commit to ^1.0.4 (#341) (203694a)
  • deps: update husky (c4e85da)
  • deps: update type dependencies (#340) (8ae4a02)

20.0.0-beta.5 (2024-07-01)

🩹 Fixes

  • avoid potential clash with neostandard n/ (4e70c1a)
  • deps: remove unused eslint-plugin-n (dd364c8)
  • deps: update neostandard (844ad13)
  • revert avoid potential clash with neostandard n/ (a07f6cb)
  • update neostandard and use its node plugin (59e4604)

20.0.0-beta.4 (2024-06-29)

🩹 Fixes

  • deps: update dependency neostandard to ^0.9.0 (#332) (4ce25d7)

🧹 Chores

20.0.0-beta.3 (2024-06-24)

🩹 Fixes

20.0.0-beta.2 (2024-06-24)

🩹 Fixes

  • deps: update dependency neostandard to ^0.8.0 (#327) (2154c19)

20.0.0-beta.1 (2024-06-20)

🧹 Chores

20.0.0-alpha10 (2024-06-20)

🩹 Fixes

  • deactivate n/no-missing-import for ts-files (5abfa8f)

20.0.0-alpha9 (2024-06-18)

⚠ BREAKING CHANGES

  • update dependency eslint to ^9.5.0 (#320)

🩹 Fixes

🧹 Chores

  • deps: update dependencies (d3df232)

20.0.0-alpha8 (2024-06-14)

🩹 Fixes

20.0.0-alpha7 (2024-06-14)

🩹 Fixes

  • ensure ignores are global ignores (e0d2065)
  • neostandard modifications (527dee6)
  • temp remove node recommended from cjs / mjs (09b7052)

20.0.0-alpha6 (2024-06-14)

🩹 Fixes

  • add names to configs to help config inspector (#315) (9786a4c)

20.0.0-alpha5 (2024-06-13)

🩹 Fixes

  • restore default ignores (961695d)

20.0.0-alpha4 (2024-06-12)

⚠ BREAKING CHANGES

  • update dependency eslint to ^9.4.0 (#294)

chore

🩹 Fixes

  • deps: update dependency neostandard to ^0.7.0 (#312) (103005f)

20.0.0-alpha3 (2024-06-07)

🌟 Features

  • update neostandard to 0.6.0 + other deps (433c277)

🩹 Fixes

  • improved mocha config (c5a4840)
  • remove redundant globals dependency (62fba11)
  • restore no-unused-vars to pre-neostandard (3c6e165)
  • update to latest neostandard (f32a047)

📚 Documentation

20.0.0-alpha2 (2024-05-27)

Features

  • add ignore and expose all of neostandard (914435c)

Bug Fixes

  • make ignore option work (6a8bff7)
  • use pre-release of typescript-eslint (3b69a72)

20.0.0-alpha1 (2024-05-27)

⚠ BREAKING CHANGES

  • initial neostandard based release (#293)
  • update dependency eslint-plugin-es-x to ^7.5.0 (#267)
  • update dependency eslint-plugin-es-x to ^7.4.0 (#261)
  • update dependency eslint-plugin-n to ^16.3.1 (#243)
  • update dependency eslint-plugin-es-x to ^7.3.0 (#259)
  • update dependency eslint-plugin-mocha to ^10.2.0 (#250)
  • update dependency eslint-plugin-import to ^2.29.0 (#240)
  • update dependency eslint-plugin-unicorn to v49 (#256)

Features

  • initial neostandard based release (#293) (fa27fa1)
  • update dependency eslint-plugin-unicorn to v49 (#256) (4e3ff07)

Miscellaneous Chores

  • update dependency eslint-plugin-es-x to ^7.3.0 (#259) (73ff977)
  • update dependency eslint-plugin-es-x to ^7.4.0 (#261) (56fb8e3)
  • update dependency eslint-plugin-es-x to ^7.5.0 (#267) (bd3fa19)
  • update dependency eslint-plugin-import to ^2.29.0 (#240) (a0938e4)
  • update dependency eslint-plugin-mocha to ^10.2.0 (#250) (84214ca)
  • update dependency eslint-plugin-n to ^16.3.1 (#243) (fcca43a)

19.0.0 (2023-07-25)

⚠ BREAKING CHANGES

  • update dependency eslint-plugin-es-x to ^7.2.0 (#234)
  • update dependency eslint-plugin-n to ^16.0.1 (#224)
  • update dependency eslint to ^8.45.0 (#220)
  • update dependency eslint-plugin-jsdoc to ^46.4.4 (#219)
  • update dependency eslint-plugin-unicorn to v48 (#231)

Features

  • update dependency eslint-plugin-unicorn to v48 (#231) (fb00678)

Miscellaneous Chores

  • update dependency eslint to ^8.45.0 (#220) (9473eff)
  • update dependency eslint-plugin-es-x to ^7.2.0 (#234) (d2d65ab)
  • update dependency eslint-plugin-jsdoc to ^46.4.4 (#219) (205427e)
  • update dependency eslint-plugin-n to ^16.0.1 (#224) (e53cb27)

18.0.0 (2023-06-03)

⚠ BREAKING CHANGES

  • fix update minor peer dependency versions
  • update minor dependencies
  • update eslint-plugin-es-x
  • update dependency eslint-plugin-jsdoc to v46 (#217)
  • fully separate mocha config + add types

Features

  • fully separate mocha config + add types (bfc1b87)
  • update dependency eslint-plugin-jsdoc to v46 (#217) (afafbc8)

Miscellaneous Chores

  • fix update minor peer dependency versions (a15dde7)
  • update eslint-plugin-es-x (2da23c7)
  • update minor dependencies (b9502db)

17.0.3 (2023-05-19)

Bug Fixes

  • extend supported eslint-plugin-es-x version (9e096b7)

17.0.2 (2023-05-16)

Bug Fixes

  • export selfhosted standard (6770537)

17.0.1 (2023-05-16)

Bug Fixes

  • selfhost eslint-config-standard (ba10275)

17.0.0 (2023-05-16)

⚠ BREAKING CHANGES

  • add import/no-deprecated (#197)
  • move to eslint-plugin-es-x (#195)
  • update dependency eslint-plugin-jsdoc to ^44.2.4 (#189)
  • update dependency eslint-plugin-n to v16 (#193)

Features

Miscellaneous Chores

  • update dependency eslint-plugin-jsdoc to ^44.2.4 (#189) (f0ac16c)

16.0.7 (2023-05-10)

Bug Fixes

  • give release-please access to secrets (429a559)

16.0.6 (2023-05-10)

Bug Fixes

  • permissions for reused release-please flow (e16853c)
  • permissions for reused release-please flow (b151be9)
  • use reusable release-please flow (eeb98f6)

16.0.5 (2023-05-10)

Bug Fixes

16.0.4 (2023-05-09)

⚠ BREAKING CHANGES

  • update dependency eslint-plugin-sort-destructure-keys to ^1.5.0 (#169)
  • update dependency eslint-plugin-security to ^1.7.1 (#164)
  • update dependency eslint-plugin-jsdoc to ^44.0.2 (#185)
  • update dependency eslint-plugin-import to ^2.27.5 (#163)
  • update dependency eslint-plugin-n to ^15.7.0 (#150)

Bug Fixes

  • tweak jsdoc/tag-lines to enforce my style (00767e9)

Miscellaneous Chores

  • update dependency eslint-plugin-import to ^2.27.5 (#163) (28177f0)
  • update dependency eslint-plugin-jsdoc to ^44.0.2 (#185) (d21f187)
  • update dependency eslint-plugin-n to ^15.7.0 (#150) (398b38f)
  • update dependency eslint-plugin-security to ^1.7.1 (#164) (a2ebb87)
  • update dependency eslint-plugin-sort-destructure-keys to ^1.5.0 (#169) (036b41c)

16.0.3 (2023-05-09)

Bug Fixes

  • redo release one more time, previous 16.x were failing (b5951bf)

16.0.2 (2023-05-09)

Bug Fixes

  • redo release one more time, previous 16.x were failing (039a148)

16.0.1 (2023-05-09)

Bug Fixes

  • add id-token: write to publish step (1edcde9)

16.0.0 (2023-05-09)

⚠ BREAKING CHANGES

  • update dependency eslint to ^8.40.0 (#124)
  • update dependency eslint-plugin-jsdoc to v44 (#174)
  • update eslint-plugin-unicorn to v47
  • drop support for node 14 as its EOL
  • update dependency eslint-plugin-jsdoc to ^39.6.4 (#157)
  • update dependency eslint-plugin-promise to ^6.1.1
  • update dependency eslint-plugin-jsdoc to ^39.6.2
  • update dependency eslint-plugin-promise to ^6.1.0
  • rule: enforce having a comma dangle

Features

  • deps: update dependency eslint-plugin-jsdoc to ^39.3.13 (7b2cb64)
  • deps: update dependency eslint-plugin-mocha to ^10.1.0 (14723f2)
  • rule: enforce having a comma dangle (cc83a48)
  • update dependency eslint-plugin-jsdoc to v44 (#174) (0a0a6bc)
  • update eslint-plugin-unicorn to v47 (19ceeef)

Bug Fixes

  • added trailing commas requested by linting (952c2fa)
  • lower unicorn/prefer-string-replace-all to warn (#177) (07c8ab0)
  • turn off unicorn/no-negated-condition (#178) (ffb2ad4)
  • update dependency eslint-plugin-jsdoc to ^39.6.2 (bae5310)
  • update dependency eslint-plugin-promise to ^6.1.0 (f1eca82)
  • update dependency eslint-plugin-promise to ^6.1.1 (3f80408)

Miscellaneous Chores

  • drop support for node 14 as its EOL (a051a0d)
  • update dependency eslint to ^8.40.0 (#124) (b8af246)
  • update dependency eslint-plugin-jsdoc to ^39.6.4 (#157) (c983ba6)