@open-xchange/lint

0.2.0 • Public • Published

Open-Xchange ESLint Configuration

This is a meta npm module that 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-plugin-chai-friendly
  • eslint-plugin-codeceptjs
  • eslint-plugin-import
  • eslint-plugin-license-header
  • eslint-plugin-mocha
  • eslint-plugin-vue

Migration

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

Remove eslint as well as the packages from the list above.

Add the package:

pnpm i -D @open-xchange/lint

Create a minimal eslint.config.js

echo "import config from '@open-xchange/lint'

export default [
  ...config,
]" > 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 .eslintrc to the new flat config format in the eslint.config.js. For help and references see the official migration guide.
  • If you have a .npmrc file, add the following line:
echo "public-hoist-pattern[]=*eslint*" >> .npmrc

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

Customization

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

Readme

Keywords

none

Package Sidebar

Install

npm i @open-xchange/lint

Weekly Downloads

1,682

Version

0.2.0

License

MIT

Unpacked Size

14.9 kB

Total Files

9

Last publish

Collaborators

  • moritz.bach
  • johnyb
  • davidbauer
  • solygen
  • daniel.rentz
  • alexquast
  • d.haus
  • maik.schaefer
  • anne.matthes
  • andree
  • bjoern.koester
  • tran-dong.tran
  • ox-kaci