Meta package that provides Typescript, eslint and prettier configurations and common dev dependencies for GLSP projects
npm install @eclipse-glsp/configCommon shared configuration for Eclipse GLSP components that are implemented with Typescript.
Provides a meta package that export common configuration objects for:
- Typescript (tsconfig.json)
- ESLint (.eslintrc)
- Prettier (.prettierrc).
The package is available via npm and is used by all GLSP components implemented with Typescript.
ESLint and prettier are included as direct dependencies.
- @eclipse-glsp/ts-config: Shared Typescript configuration for GLSP projects
- @eclipse-glsp/eslint-config: Shared ESLint configuration for GLSP projects
- @eclipse-glsp/prettier-config: Shared Prettier configuration for GLSP projects
``bash`
yarn add --dev @eclipse-glsp/config
Create a tsconfig.json:
`json`
{
"extends": "@eclipse-glsp/ts-config",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
}
}
In addition, a custom configuration for projects that use mocha is available:
- @eclipse-glsp/ts-config/mocha
Create a .eslintrc.js:
`javascript`
/* @type {import('eslint').Linter.Config} /
module.exports = {
extends: '@eclipse-glsp',
parserOptions: {
tsconfigRootDir: __dirname,
project: 'tsconfig.json'
}
};
Add to the package.json:
`json`
{
// ...
"prettier": "@eclipse-glsp/prettier-config"
}
Or add a .prettierrc file to the workspace root:
`json``
"@eclipse-glsp/prettier-config"
For more information, please visit the Eclipse GLSP Umbrella repository and the Eclipse GLSP Website.
If you have questions, please raise them in the discussions and have a look at our communication and support options.