@paperless/conventions 0.1.0 → 1.3.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/README.md CHANGED
@@ -1,25 +1,29 @@
1
- <p align="center">
1
+ <div class="pb-10">
2
+ <p align="center">
2
3
 
3
4
  <a href="https://paperless.employes.nl">
4
5
  <img src="https://github.com/Employes/paperless/raw/main/packages/core/src/assets/images/paperless.png" alt="Employes UI" width="400" />
5
6
  </a>
6
7
  <br />
7
- <span>
8
- A collection of React & Angular components that conform to the Employes design system.
9
- </span>
10
8
 
11
- </p>
9
+ <span>
10
+ A collection of Web, React & Angular components that conform to the Employes design system.
11
+ </span>
12
12
 
13
- <div align="center">
13
+ </p>
14
+
15
+ <div align="center">
14
16
 
15
17
  [![](https://badgen.net/npm/v/@paperless/core/latest?label=@paperless/core)](https://www.npmjs.com/package/@paperless/core)
16
18
  [![](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)
19
+ [![](https://badgen.net/npm/v/@paperless/react/latest?label=@paperless/react)](https://www.npmjs.com/package/@paperless/react)
20
+ [![](https://badgen.net/npm/v/@paperless/conventions/latest?label=@paperless/conventions)](https://www.npmjs.com/package/@paperless/conventions)
18
21
 
19
- </div>
22
+ </div>
20
23
 
21
- <div align="center">
22
- <a href="https://paperless.employes.nl">https://paperless.employes.nl</a>
24
+ <div align="center" >
25
+ <a href="https://paperless.employes.nl">https://paperless.employes.nl</a>
26
+ </div>
23
27
  </div>
24
28
 
25
29
  ## 📦 Install
@@ -59,6 +63,12 @@ yarn add @paperless/core
59
63
  #### React
60
64
 
61
65
  ```jsx
66
+ // setup
67
+ import { applyPolyfills, defineCustomElements } from '@paperless/core/loader';
68
+
69
+ applyPolyfills().then(() => defineCustomElements());
70
+
71
+ // usage
62
72
  import { Button } from '@employes/paperless';
63
73
 
64
74
  const App = () => <Button>Click me!</Button>;
@@ -67,16 +77,35 @@ const App = () => <Button>Click me!</Button>;
67
77
  #### Angular
68
78
 
69
79
  ```jsx
80
+ // main.ts
81
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
82
+ import { applyPolyfills, defineCustomElements } from '@paperless/core/loader';
83
+
84
+ applyPolyfills()
85
+ .then(() => defineCustomElements())
86
+ .then(() => platformBrowserDynamic().bootstrapModule(AppModule))
87
+ .catch((err) => console.error(err));
88
+
89
+ // App Module
70
90
  import { PaperlessModule } from '@employes/paperless-ngx';
71
91
 
72
92
  @NgModule({
73
93
  declarations: [AppComponent],
74
- imports: [BrowserModule, PaperlessModule],
94
+ imports: [
95
+ BrowserModule,
96
+
97
+ // add this in your app module
98
+ PaperlessModule.forRoot(),
99
+
100
+ // add this in any module using paperless components
101
+ PaperlessModule,
102
+ ],
75
103
  providers: [],
76
104
  bootstrap: [AppComponent],
77
105
  })
78
106
  export class AppModule {}
79
107
 
108
+ // Any component
80
109
  @Component({
81
110
  selector: 'app-root',
82
111
  templateUrl: `
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@paperless/conventions",
3
3
  "description": "Paperless eslint, typescript & prettier recommended configuration",
4
- "version": "0.1.0",
4
+ "version": "1.3.0",
5
5
  "main": "index.js",
6
6
  "license": "ISC",
7
7
  "publishConfig": {
@@ -14,27 +14,28 @@
14
14
  "yarn:publish": "yarn publish"
15
15
  },
16
16
  "devDependencies": {
17
- "@angular-eslint/eslint-plugin": "^13.2.1",
18
- "@angular-eslint/eslint-plugin-template": "^13.2.1",
19
- "@angular-eslint/template-parser": "^13.2.1",
20
- "@stencil/eslint-plugin": "^0.4.0",
21
- "@typescript-eslint/eslint-plugin": "^5.19.0",
22
- "@typescript-eslint/parser": "^5.19.0",
23
- "eslint": "^8.13.0",
24
- "eslint-plugin-react": "^7.29.4",
25
- "prettier": "^2.6.2",
26
- "typescript": "^4.6.3"
17
+ "@angular-eslint/eslint-plugin": "16.0.1",
18
+ "@angular-eslint/eslint-plugin-template": "16.0.1",
19
+ "@angular-eslint/template-parser": "16.0.1",
20
+ "@stencil/eslint-plugin": "0.4.0",
21
+ "@typescript-eslint/eslint-plugin": "5.59.5",
22
+ "@typescript-eslint/parser": "5.59.5",
23
+ "eslint": "8.40.0",
24
+ "eslint-plugin-react": "7.32.2",
25
+ "prettier": "2.8.8",
26
+ "typescript": "4.6.3"
27
27
  },
28
28
  "peerDependencies": {
29
- "@angular-eslint/eslint-plugin": "^13.2.1",
30
- "@angular-eslint/eslint-plugin-template": "^13.2.1",
31
- "@angular-eslint/template-parser": "^13.2.1",
29
+ "@angular-eslint/eslint-plugin": "^13.2.1 || ^14.0.0 || ^15.0.0 || ^16.0.0",
30
+ "@angular-eslint/eslint-plugin-template": "^13.2.1 || ^14.0.0 || ^15.0.0 || ^16.0.0",
31
+ "@angular-eslint/template-parser": "^13.2.1 || ^14.0.0 || ^15.0.0 || ^16.0.0",
32
32
  "@stencil/eslint-plugin": "^0.4.0",
33
33
  "@typescript-eslint/eslint-plugin": "^5.19.0",
34
34
  "@typescript-eslint/parser": "^5.19.0",
35
35
  "eslint": "^8.13.0",
36
36
  "eslint-plugin-react": "^7.29.4",
37
37
  "prettier": "^2.6.2",
38
+ "prettier-plugin-tailwindcss": "^0.2.1",
38
39
  "typescript": "^4.6.3"
39
40
  }
40
41
  }
@@ -1,4 +1,5 @@
1
1
  module.exports = {
2
+ plugins: [require('prettier-plugin-tailwindcss')],
2
3
  trailingComma: 'es5',
3
4
  tabs: true,
4
5
  tabWidth: 4,
package/tsconfig.json CHANGED
@@ -9,26 +9,32 @@
9
9
  "experimentalDecorators": true,
10
10
  "emitDecoratorMetadata": true,
11
11
  "importHelpers": true,
12
- "target": "es2015",
13
- "module": "esnext",
14
12
  "allowJs": false,
15
13
  "typeRoots": ["node_modules/@types"],
16
- "lib": ["es2019", "dom"],
17
14
  "forceConsistentCasingInFileNames": true,
18
15
  "skipLibCheck": true,
19
16
  "skipDefaultLibCheck": true,
20
- "baseUrl": ".",
21
17
  "resolveJsonModule": true,
22
18
  "noImplicitReturns": false,
23
19
  "noImplicitThis": false,
24
20
  "noImplicitAny": false,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noImplicitOverride": false,
23
+ "noPropertyAccessFromIndexSignature": false,
25
24
  "strictNullChecks": false,
26
25
  "suppressImplicitAnyIndexErrors": true,
27
26
  "noUnusedLocals": true,
28
- "allowSyntheticDefaultImports": true
27
+ "allowSyntheticDefaultImports": true,
28
+ "useDefineForClassFields": false,
29
+ "target": "es2020",
30
+ "module": "es2020",
31
+ "lib": ["es2018", "dom"]
29
32
  },
30
- "exclude": ["node_modules", "tmp", "dist"],
31
33
  "angularCompilerOptions": {
32
- "enableIvy": true
34
+ "enableIvy": true,
35
+ "enableI18nLegacyMessageIdFormat": false,
36
+ "strictInjectionParameters": true,
37
+ "strictInputAccessModifiers": true,
38
+ "strictTemplates": false
33
39
  }
34
40
  }