@open-xchange/linter-presets
v1.22.0
Published
Configuration presets for ESLint and StyleLint
Maintainers
Keywords
Readme
@open-xchange/linter-presets
This package provides configuration presets for ESLint and StyleLint, including wrappers for various linter plugins.
ESLint
The module eslint exports a defineConfig function for setting up the entire project (e.g. TypeScript files, JSON files, license headers, etc.), and a set of environment presets that apply more ESLint plugins and rules to a specific subset of the project (e.g. browser code, unit test code, etc.).
Usage example:
// eslint.config.ts
import { defineConfig, env } from '@open-xchange/linter-presets/eslint'
export default defineConfig(
// required parameter: global project configuration
{ /* config options */ },
// add environments
env.browser({ files: ['src/**/*.js'], /* ... */ }),
env.vitest({ files: ['test/**/*.js'], /* ... */ }),
// add custom configurations
{ /* ... */ },
)See the eslint module documentation for more details.
StyleLint
The module stylelint exports a defineConfig function for setting up the entire project (e.g. CSS files, SCSS files, license headers, etc.).
Usage example:
// stylelint.config.js
import { defineConfig } from '@open-xchange/linter-presets/stylelint'
export default defineConfig({
/* config options */
})See the stylelint module documentation for more details.
