
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
eslint-config-un
Advanced tools
A universal-ish ESLint config aiming to be reasonably strict and easily configurable.
Grown out of the personal collection of rules, an ESLint config aspiring to cover as many rules as possible, be reasonably strict and easily configurable. Only supports ESLint 9 and the flat config format.
npm i -D eslint-config-un
pnpm i -D eslint-config-un
yarn add -D eslint-config-un
Includes the rules from the following configs & plugins:
eslint-plugin-n
with node
prefix)eslint-plugin-import-x
with import
prefix)cssInJs
(since v0.2.0), using eslint-plugin-css
angular
(since v0.7.0), using @angular-eslint/eslint-plugin
and @angular-eslint/eslint-plugin-template
css
(since v0.7.0), using @eslint/css
noUnusedImports
(since v0.7.0), using eslint-plugin-unused-imports
react
(since v0.8.0), using @eslint-react/eslint-plugin
, eslint-plugin-react
, eslint-plugin-react-hooks
, eslint-plugin-react-refresh
and eslint-plugin-react-compiler
jsxA11y
(since v0.8.0), using eslint-plugin-jsx-a11y
pnpm
(since v0.8.0), using eslint-plugin-pnpm
nextJs
(since v0.9.0), using @next/eslint-plugin-next
casePolice
(since v0.9.0), using eslint-plugin-case-police
astro
(since v0.9.0), using eslint-plugin-astro
svelte
(since v0.10.0), using eslint-plugin-svelte
es
(since v0.10.0), using eslint-plugin-es-x
cloudfrontFunctions
(since v0.10.0) for Amazon CloudFront Functionssolid
(since v0.10.0), using eslint-plugin-solid
nodeDependencies
(since v0.10.0), using eslint-plugin-node-dependencies
jsInline
(since v0.10.0), using eslint-plugin-html
html
(since v0.10.0), using @html-eslint/eslint-plugin
typescript
, vue
, nuxt
, pinia
, jest
, jest-extended
, vitest
, @builder.io/qwik
, @qwik.dev/core
, @angular/core
, react
, next
, astro
, svelte
and solid-js
packages and enables corresponding configurations (which can also be enabled or disabled explicitly).overrides
for rules.In your eslint.config.[cm]?js
:
// @ts-check
import {eslintConfig} from 'eslint-config-un';
export default eslintConfig({
// your configuration (optional)
});
eslint>=9
. Please ensure you have installed the correct version. Some package managers are installing non-optional peer dependencies automatically.typescript
or vue
) is performed using local-pkg
..vue
files if enforceTypescriptInScriptSection
is set to true in vue's config options which in turn is automatically set to true if typescript
package found installed. If you have .vue
files authored in both TypeScript and JavaScript, use enforceTypescriptInScriptSection.{files,ignores}
to manually specify TS & JS Vue components respectively. It is not currently possible to apply different ESLint rules depending on the value of lang
attribute of <script>
SFC section.preferArrowFunctions
security
json
yaml
toml
packageJson
perfectionist
deMorgan
jsonSchemaValidator
casePolice
errorsInsteadOfWarnings
option. You can find all such rules by inspecting the source code of this package.*.md
filesIf markdown
config is enabled (which is the default), the same rules provided by other configs will be applied to code blocks (```lang ... ```) inside Markdown files. This works because under the hood the plugin @eslint/markdown
that provides that functionality will create virtual files for each code block with the same extension as specified after ```.
But applying certain rules for code blocks might not be desirable because some of them are too strict for the code that won't be executed anyway or even unfixable (like missing imports). You can find the full list of disabled rules in src/configs/markdown.ts
file.
languageOptions
: Key globals
: Global AudioWorkletGlobalScope
has leading or trailing whitespace.Install globals
package as a dev dependency.
0.10.0
svelte
via eslint-plugin-svelte
, enabled automatically if svelte
package is installed.es
via eslint-plugin-es-x
, <u>disabled</u> by default.cloudfrontFunctions
for Amazon CloudFront Functions, <u>disabled</u> by default.solid
via eslint-plugin-solid
, enabled automatically if solid-js
package is installed.nodeDependencies
via eslint-plugin-node-dependencies
, <u>disabled</u> by default.jsInline
via eslint-plugin-html
, enabled by default.html
via @html-eslint/eslint-plugin
, enabled by default unless angular
config is enabled.^9.15.0
as support for meta.defaultOptions
is necessary for some rules to work.loadPluginsOnDemand
option to false
.import
config to specify eslint-plugin-import-x
plugin settings.files
will now disable the config.allowRethrowing: true
for @typescript-eslint/only-throw-error
rule.vue/no-custom-modifiers-on-v-model
and vue/no-multiple-template-root
rules for Vue 2 codebases.mode
with possible values of app
and lib
. It currently only controls whether you're allowed to import from devDependencies
or not.peerDependencies
is now allowed by default (rule: import/no-extraneous-dependencies
). Also disabled this rule in cli
config.extraConfigs
now always get a name in the form of eslint-config-un/extra-config/<provided name or "unnamed<config index>">
.reportGlobalThis: true
for no-shadow-restricted-names
rule.typescript-eslint
: 8.31.1 -> 8.32.0
no-unnecessary-type-conversion
.angular-eslint
: 19.3.0 -> 19.4.0
prefer-template-literal
prefer-output-emitter-ref
eslint-plugin-vue
: 10.0.1 -> 10.1.0
define-props-destructuring
. Enforced no props destructuring by default.eslint-plugin-unicorn
: 59.0.0 -> 59.0.1@eslint-react/eslint-plugin
: 1.48.5 -> 1.49.0
jsx-key-before-spread
@next/eslint-plugin-next
: 15.3.1 -> 15.3.2@vitest/eslint-plugin
: 1.1.43 -> 1.1.44eslint-config-prettier
: 10.1.2 -> 10.1.5eslint-plugin-import-x
: 4.11.0 -> 4.11.1eslint-plugin-jsdoc
: 50.6.11 -> 50.6.14FAQs
A universal-ish ESLint config aiming to be reasonably strict and easily configurable.
The npm package eslint-config-un receives a total of 14 weekly downloads. As such, eslint-config-un popularity was classified as not popular.
We found that eslint-config-un demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.