@paperless/conventions 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.editorconfig ADDED
@@ -0,0 +1,14 @@
1
+ # Editor configuration, see http://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = tab
7
+ indent_size = 4
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ max_line_length = 140
11
+
12
+ [*.md]
13
+ max_line_length = off
14
+ trim_trailing_whitespace = false
package/.eslintrc.js ADDED
@@ -0,0 +1,29 @@
1
+ module.exports = {
2
+ parserOptions: {
3
+ project: './tsconfig.json',
4
+ },
5
+ extends: [
6
+ 'airbnb',
7
+ 'eslint:recommended',
8
+ 'plugin:@stencil/recommended',
9
+ 'plugin:import/errors',
10
+ 'plugin:react/recommended',
11
+ 'plugin:jsx-a11y/recommended',
12
+ 'plugin:prettier/recommended',
13
+ 'prettier/react',
14
+ 'plugin:@angular-eslint/recommended',
15
+ 'plugin:@angular-eslint/template/process-inline-templates',
16
+ ],
17
+ overrides: [
18
+ {
19
+ files: ['*.html'],
20
+ extends: ['plugin:@angular-eslint/template/recommended'],
21
+ rules: {
22
+ /**
23
+ * Any template/HTML related rules you wish to use/reconfigure over and above the
24
+ * recommended set provided by the @angular-eslint project would go here.
25
+ */
26
+ },
27
+ },
28
+ ],
29
+ };
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ <p align="center">
2
+
3
+ <a href="https://paperless.employes.nl">
4
+ <img src="https://github.com/Employes/paperless/raw/main/packages/core/src/assets/images/paperless.png" alt="Employes UI" width="400" />
5
+ </a>
6
+ <br />
7
+ <span>
8
+ A collection of React & Angular components that conform to the Employes design system.
9
+ </span>
10
+
11
+ </p>
12
+
13
+ <div align="center">
14
+
15
+ [![](https://badgen.net/npm/v/@paperless/core/latest?label=@paperless/core)](https://www.npmjs.com/package/@paperless/core)
16
+ [![](https://badgen.net/npm/v/@paperless/angular/latest?label=@paperless/angular)](https://www.npmjs.com/package/@paperless/angular)
17
+ [![](https://badgen.net/npm/v/@paperless/angular/latest?label=@paperless/react)](https://www.npmjs.com/package/@paperless/react)
18
+
19
+ </div>
20
+
21
+ <div align="center">
22
+ <a href="https://paperless.employes.nl">https://paperless.employes.nl</a>
23
+ </div>
24
+
25
+ ## 📦 Install
26
+
27
+ #### React
28
+
29
+ ```bash
30
+ npm install @paperless/core @paperless/react
31
+ ```
32
+
33
+ ```bash
34
+ yarn add @paperless/core @paperless/react
35
+ ```
36
+
37
+ #### Angular
38
+
39
+ ```bash
40
+ npm install @paperless/core @paperless/angular
41
+ ```
42
+
43
+ ```bash
44
+ yarn add @paperless/core @paperless/angular
45
+ ```
46
+
47
+ #### Web Components
48
+
49
+ ```bash
50
+ npm install @paperless/core
51
+ ```
52
+
53
+ ```bash
54
+ yarn add @paperless/core
55
+ ```
56
+
57
+ ## 🚀 Usage
58
+
59
+ #### React
60
+
61
+ ```jsx
62
+ import { Button } from '@employes/paperless';
63
+
64
+ const App = () => <Button>Click me!</Button>;
65
+ ```
66
+
67
+ #### Angular
68
+
69
+ ```jsx
70
+ import { PaperlessModule } from '@employes/paperless-ngx';
71
+
72
+ @NgModule({
73
+ declarations: [AppComponent],
74
+ imports: [BrowserModule, PaperlessModule],
75
+ providers: [],
76
+ bootstrap: [AppComponent],
77
+ })
78
+ export class AppModule {}
79
+
80
+ @Component({
81
+ selector: 'app-root',
82
+ templateUrl: `
83
+ <p-button>Click me!</p-button>
84
+ `,
85
+ })
86
+ export class AppComponent {}
87
+ ```
88
+
89
+ #### Web Components
90
+
91
+ Add the following code snippet in your project to start using the components
92
+
93
+ ```javascript
94
+ import { defineCustomElements } from '@paperless/core/loader';
95
+ defineCustomElements();
96
+ ```
97
+
98
+ And in your html:
99
+
100
+ ```html
101
+ <p-button>Click me!</p-button>
102
+ ```
103
+
104
+ ## ⌨️ Typescript
105
+
106
+ The library is javascript based but types are supported with `d.ts` files.
107
+ You should get the types automatically when installing `@paperless/core`.
108
+
109
+ ## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
110
+
111
+ We welcome contributions to @paperless!
112
+
113
+ Read our [contributing
114
+ guide](https://github.com/Employes/paperless/blob/main/CONTRIBUTING.md) and help us build or improve our components.
115
+
116
+ ## 📝 License
117
+
118
+ This project is offered under [Apache
119
+ License 2.0](https://github.com/employes/paperless/blob/main/LICENSE).
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ const eslintrc = require('./.eslintrc.js');
2
+
3
+ module.exports = eslintrc;
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@paperless/conventions",
3
+ "description": "Paperless eslint, typescript & prettier recommended configuration",
4
+ "version": "0.0.0",
5
+ "main": "index.js",
6
+ "license": "ISC",
7
+ "scripts": {
8
+ "build": "echo 'skipped conventions'",
9
+ "build:prod": "yarn build",
10
+ "preyarn:publish": "cp ../../README.md .",
11
+ "yarn:publish": "yarn publish"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "registry": "https://registry.npmjs.org"
16
+ },
17
+ "devDependencies": {
18
+ "@angular-eslint/eslint-plugin": "^13.2.1",
19
+ "@angular-eslint/eslint-plugin-template": "^13.2.1",
20
+ "@angular-eslint/template-parser": "^13.2.1",
21
+ "@stencil/eslint-plugin": "^0.4.0",
22
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
23
+ "@typescript-eslint/parser": "^5.19.0",
24
+ "eslint": "^8.13.0",
25
+ "eslint-plugin-react": "^7.29.4",
26
+ "prettier": "^2.6.2",
27
+ "typescript": "^4.6.3"
28
+ },
29
+ "peerDependencies": {
30
+ "@angular-eslint/eslint-plugin": "^13.2.1",
31
+ "@angular-eslint/eslint-plugin-template": "^13.2.1",
32
+ "@angular-eslint/template-parser": "^13.2.1",
33
+ "@stencil/eslint-plugin": "^0.4.0",
34
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
35
+ "@typescript-eslint/parser": "^5.19.0",
36
+ "eslint": "^8.13.0",
37
+ "eslint-plugin-react": "^7.29.4",
38
+ "prettier": "^2.6.2",
39
+ "typescript": "^4.6.3"
40
+ }
41
+ }
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ trailingComma: 'es5',
3
+ tabs: true,
4
+ tabWidth: 4,
5
+ singleQuote: true,
6
+ printWidth: 80,
7
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "sourceMap": true,
6
+ "declaration": false,
7
+ "moduleResolution": "node",
8
+ "downlevelIteration": true,
9
+ "experimentalDecorators": true,
10
+ "emitDecoratorMetadata": true,
11
+ "importHelpers": true,
12
+ "target": "es2015",
13
+ "module": "esnext",
14
+ "allowJs": false,
15
+ "typeRoots": ["node_modules/@types"],
16
+ "lib": ["es2019", "dom"],
17
+ "forceConsistentCasingInFileNames": true,
18
+ "skipLibCheck": true,
19
+ "skipDefaultLibCheck": true,
20
+ "baseUrl": ".",
21
+ "resolveJsonModule": true,
22
+ "noImplicitReturns": false,
23
+ "noImplicitThis": false,
24
+ "noImplicitAny": false,
25
+ "strictNullChecks": false,
26
+ "suppressImplicitAnyIndexErrors": true,
27
+ "noUnusedLocals": true,
28
+ "allowSyntheticDefaultImports": true
29
+ },
30
+ "exclude": ["node_modules", "tmp", "dist"],
31
+ "angularCompilerOptions": {
32
+ "enableIvy": true
33
+ }
34
+ }