npm.io
0.4.0 • Published 1 month ago

@open-xchange/lint

Licence
MIT
Version
0.4.0
Deps
10
Size
10 kB
Vulns
0
Weekly
0

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
  • eslint-plugin-codeceptjs
  • eslint-plugin-jsdoc
  • eslint-plugin-license-header
  • eslint-plugin-mocha
  • eslint-plugin-vue
  • globals
  • neostandard (replaces the older eslint-config-standard family)
  • typescript
  • vue-eslint-parser

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 pnpm-workspace.yaml to be able to invoke eslint:

publicHoistPattern:
  - eslint

Optional:

Customization

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