Socket
Book a DemoInstallSign in
Socket

@open-xchange/eslint-config-frontend-standard

Package Overview
Dependencies
Maintainers
14
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-xchange/eslint-config-frontend-standard

Meta package for eslint and common plugins

latest
npmnpm
Version
0.0.7
Version published
Weekly downloads
5
400%
Maintainers
14
Weekly downloads
 
Created
Source

Open-Xchange ESLint Configuration

This is meta npm module contains a standard configuration for linting. Adding this module makes sure that all projects are using the same version of ESLint as well as the same basic rules, which results in a more streamlined codebase.

Included packages

The following packages are already part of the configuration:

  • @eslint/eslintrc
  • @vue/eslint-config-standard
  • eslint
  • eslint-config-standard
  • eslint-plugin-chai-friendly
  • eslint-plugin-codeceptjs
  • eslint-plugin-import
  • eslint-plugin-jsdoc
  • eslint-plugin-license-header
  • eslint-plugin-mocha
  • eslint-plugin-n
  • eslint-plugin-promise
  • eslint-plugin-vue

Migration

To start using this configuration, a few steps are needed:

  • Remove eslint as well as the packages above from the list above
pnpm remove @eslint/eslintrc @vue/eslint-config-standard eslint eslint-config-standard eslint-plugin-chai-friendly eslint-plugin-codeceptjs eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-license-header eslint-plugin-mocha eslint-plugin-n eslint-plugin-promise eslint-plugin-vue
  • Add the package
pnpm add @open-xchange/eslint-config-frontend-standard
  • Create a .npmrc [^1]
echo "public-hoist-pattern[]=*eslint*" >> .npmrc

Although eslint is in public-hoist-pattern by default, it gets manually added here to prevent overwriting it.

  • Create a minimal eslint.config.js
echo "import frontendStandard from '@open-xchange/eslint-config-frontend-standard'

export default [
  ...frontendStandard,
]" > eslint.config.js
  • Add the following entry to the package.json to prevent warnings.
"pnpm": {
  "peerDependencyRules": {
    "allowedVersions": {
      "eslint": "9",
      "eslint-plugin-n": "17"
    }
  }
}
  • Optional: Migrate necessary rules from the old eslint.rc to the new flat config format in the eslint.config.js. For help and references see the official migration guide.

Customization

Customizing the configuration means adding rules or plugins to the eslint.config.js. To do this please refer to the documentation.

FAQs

Package last updated on 30 Apr 2024

Did you know?

Socket

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.

Install

Related posts