1.0.0 • Published 5 months ago

@zextras/carbonio-ui-configs v1.0.0

Weekly downloads
-
License
AGPL-3.0-only
Repository
-
Last release
5 months ago

This is the configurations set used by Zextras Carbonio ui projects

Contributors Activity License Project Twitter

Installation

npm install --save-dev @zextras/carbonio-ui-configs

Setup

To use the configuration set, you need to configure eslint, prettier and typescript to extend the rules defined in this package.

Eslint

The eslint configuration to extends is included in rules/eslint.js, extends your configuration file as the following

// .eslintrc.js

module.exports = {
  extends: ['./node_modules/@zextras/carbonio-ui-configs/rules/eslint.js']
};

In order to make eslint recognize the plugins configured within this package, an additional parameter is required when running eslint command: --resolve-plugins-relative-to node_modules/@zextras/carbonio-ui-configs

You can configure a script inside the package.json and then run npm run lint to easily run eslint with the required configuration:

// package.json
{
    "scripts": {
        "lint": "eslint --ext .js,.jsx,.ts,.tsx --resolve-plugins-relative-to node_modules/@zextras/carbonio-ui-configs src"
        // other scripts
    }
}

Prettier

Prettier needs to be configured to extend the rules defined in rules/prettier.js

// .prettierrc.js
module.exports = {
  ...require('@zextras/carbonio-ui-configs/rules/prettier')
}

Typescript

Typescript configuration is located in rules/typescript.json and need to be extended too.

// tsconfig.json
{
  "extends": "@zextras/carbonio-ui-configs/rules/typescript.json"
}

License

Carbonio UI Configs - Configurations set for Zextras Carbonio UI projects

Copyright (C) 2022 Zextras https://www.zextras.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 only of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see Licenses - GNU Project - Free Software Foundation

See COPYING file for the project license details

See THIRDPARTIES file for other licenses details

Copyright notice

All non-software material (such as, for example, names, images, logos, sounds) is owned by Zextras s.r.l. and is licensed under CC-BY-NC-SA.

Where not specified, all source files owned by Zextras s.r.l. are licensed under AGPL-3.0-only