@blockquote/create-wc 1.97.2 → 1.99.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockquote/create-wc",
3
- "version": "1.97.2",
3
+ "version": "1.99.0",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -33,10 +33,21 @@
33
33
  "start": "node ./src/create.js"
34
34
  },
35
35
  "prettier": {
36
- "arrowParens": "always",
36
+ "arrowParens": "avoid",
37
+ "bracketSameLine": true,
38
+ "htmlWhitespaceSensitivity": "ignore",
37
39
  "printWidth": 100,
38
40
  "singleQuote": true,
39
- "trailingComma": "all"
41
+ "trailingComma": "all",
42
+ "overrides": [
43
+ {
44
+ "files": "*.{scss,css}",
45
+ "options": {
46
+ "printWidth": 280,
47
+ "singleQuote": false
48
+ }
49
+ }
50
+ ]
40
51
  },
41
52
  "dependencies": {
42
53
  "@open-wc/create": "^0.38.130",
@@ -35,7 +35,6 @@
35
35
  }
36
36
  ]
37
37
  },
38
-
39
38
  "stylelint": {
40
39
  "extends": "stylelint-config-standard-scss",
41
40
  "rules": {
@@ -47,16 +46,15 @@
47
46
  },
48
47
  "devDependencies": {
49
48
  "@open-wc/eslint-config": "^12.0.3",
49
+ "@html-eslint/eslint-plugin": "^0.25.0",
50
+ "@html-eslint/parser": "^0.25.0",
50
51
  "eslint": "^8.57.0",
51
52
  "eslint-config-prettier": "^9.1.0",
52
- "@html-eslint/eslint-plugin": "^0.25.0",
53
- "@html-eslint/parser": "^0.24.1",
53
+ "typescript-eslint": "^7.13.1",
54
54
  "husky": "^9.0.11",
55
55
  "lint-staged": "^15.2.7",
56
56
  "prettier": "^3.3.2",
57
57
  "stylelint": "^16.6.1",
58
- "stylelint-config-standard-scss": "^13.1.0",
59
- "@typescript-eslint/eslint-plugin": "^7.13.1",
60
- "@typescript-eslint/parser": "^7.13.1"
58
+ "stylelint-config-standard-scss": "^13.1.0"
61
59
  }
62
60
  }
@@ -1,7 +1,7 @@
1
- import typescriptEslint from '@typescript-eslint/eslint-plugin';
2
- import tsParser from '@typescript-eslint/parser';
1
+ import tseslint from 'typescript-eslint';
3
2
  import html from '@html-eslint/eslint-plugin';
4
- import htmlParser from '@html-eslint/parser';
3
+ // import htmlParser from '@html-eslint/parser';
4
+ import eslintConfigPrettier from 'eslint-config-prettier';
5
5
  import path from 'node:path';
6
6
  import { fileURLToPath } from 'node:url';
7
7
  import js from '@eslint/js';
@@ -9,12 +9,44 @@ import { FlatCompat } from '@eslint/eslintrc';
9
9
 
10
10
  const __filename = fileURLToPath(import.meta.url);
11
11
  const __dirname = path.dirname(__filename);
12
+
12
13
  const compat = new FlatCompat({
13
14
  baseDirectory: __dirname,
14
15
  recommendedConfig: js.configs.recommended,
15
16
  allConfig: js.configs.all,
16
17
  });
17
18
 
19
+ const htmlFilesConfig = [html.configs['flat/recommended']].map(conf => ({
20
+ ...conf,
21
+ files: ['**/*.html'],
22
+ }));
23
+
24
+ const htmlFilesRules = {
25
+ files: ['**/*.html'],
26
+ rules: {
27
+ '@html-eslint/indent': ['error', 2],
28
+ '@html-eslint/require-closing-tags': 'off',
29
+ '@html-eslint/no-extra-spacing-attrs': 'off',
30
+ '@html-eslint/attrs-newline': 'off',
31
+ },
32
+ };
33
+
34
+ const tsFilesConfig = [...tseslint.configs.strict, ...tseslint.configs.stylistic].map(conf => ({
35
+ ...conf,
36
+ files: ['**/*.ts'],
37
+ }));
38
+
39
+ const tsFilesRules = {
40
+ files: ['**/*.ts'],
41
+ rules: {
42
+ '@typescript-eslint/ban-types': 'off',
43
+ '@typescript-eslint/explicit-function-return-type': 'off',
44
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
45
+ '@typescript-eslint/no-empty-function': 'off',
46
+ '@typescript-eslint/no-non-null-assertion': 'off',
47
+ },
48
+ };
49
+
18
50
  export default [
19
51
  {
20
52
  ignores: [
@@ -37,40 +69,12 @@ export default [
37
69
  '**/*-styles.*',
38
70
  ],
39
71
  },
40
- ...compat.extends('@open-wc', 'plugin:@typescript-eslint/recommended', 'prettier'),
41
- {
42
- files: ['**/*.html'],
43
- plugins: {
44
- '@html-eslint': html,
45
- },
46
- languageOptions: {
47
- parser: htmlParser,
48
- },
49
- rules: {
50
- '@html-eslint/indent': ['error', 2],
51
- '@html-eslint/no-multiple-h1': 'error',
52
- },
53
- },
54
- {
55
- files: ['**/*.ts'],
56
- plugins: {
57
- '@typescript-eslint': typescriptEslint,
58
- },
59
- languageOptions: {
60
- parser: tsParser,
61
- },
62
- rules: {
63
- '@typescript-eslint/ban-types': 'off',
64
- '@typescript-eslint/explicit-function-return-type': 'off',
65
- '@typescript-eslint/explicit-module-boundary-types': 'off',
66
- '@typescript-eslint/no-array-constructor': 'error',
67
- '@typescript-eslint/no-empty-function': 'off',
68
- '@typescript-eslint/no-explicit-any': 'error',
69
- '@typescript-eslint/no-loss-of-precision': 'error',
70
- '@typescript-eslint/no-namespace': 'error',
71
- '@typescript-eslint/no-non-null-assertion': 'off',
72
- },
73
- },
72
+ ...compat.extends('@open-wc'),
73
+ ...htmlFilesConfig,
74
+ htmlFilesRules,
75
+ ...tsFilesConfig,
76
+ tsFilesRules,
77
+ eslintConfigPrettier,
74
78
  {
75
79
  languageOptions: {
76
80
  ecmaVersion: 'latest',
@@ -85,8 +89,15 @@ export default [
85
89
  allowTernary: true,
86
90
  },
87
91
  ],
88
-
89
92
  'object-curly-newline': 'off',
93
+ indent: [
94
+ 'error',
95
+ 2,
96
+ {
97
+ SwitchCase: 1,
98
+ ignoredNodes: ['PropertyDefinition', 'TemplateLiteral > *'],
99
+ },
100
+ ],
90
101
  'import/extensions': [
91
102
  'error',
92
103
  'always',
@@ -106,14 +117,6 @@ export default [
106
117
  ],
107
118
  'import/no-unresolved': 'off',
108
119
  'import/prefer-default-export': 'off',
109
- indent: [
110
- 'error',
111
- 2,
112
- {
113
- SwitchCase: 1,
114
- ignoredNodes: ['PropertyDefinition', 'TemplateLiteral > *'],
115
- },
116
- ],
117
120
  'lit/no-classfield-shadowing': 'off',
118
121
  'lit/no-native-attributes': 'off',
119
122
  'lit-a11y/click-events-have-key-events': 'off',
@@ -32,7 +32,7 @@
32
32
  "@blockquote/sass-style-template": "^3.0.3",
33
33
  "@custom-elements-manifest/analyzer": "^0.10.2",
34
34
  "@open-wc/testing": "^4.0.0",
35
- "@types/mocha": "^10.0.6",
35
+ "@types/mocha": "^10.0.7",
36
36
  "@web/test-runner": "^0.18.2",
37
37
  "@web/test-runner-playwright": "^0.11.0",
38
38
  "@web/rollup-plugin-html": "^2.3.0",
@@ -0,0 +1,12 @@
1
+ <svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <style>
3
+ .square1 { fill: #888888; }
4
+ .square2 { fill: #D2D2D2; }
5
+ @media (prefers-color-scheme: dark) {
6
+ .square1 { fill: #D2D2D2; }
7
+ .square2 { fill: #888888; }
8
+ }
9
+ </style>
10
+ <rect class="square1" x="24" y="24" width="48" height="48" />
11
+ <rect class="square2" x="33" y="33" width="30" height="30" />
12
+ </svg>
@@ -2,8 +2,9 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <title>Demo - <%= tagName %></title>
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
5
  <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <link rel="icon" href="favicon.svg" sizes="any" type="image/svg+xml">
7
8
  <meta name="description" content="<%= tagName %>" />
8
9
  <style>
9
10
  html,
@@ -33,6 +33,6 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "tslib": "^2.6.3",
36
- "typescript": "^5.4.5"
36
+ "typescript": "^5.5.2"
37
37
  }
38
38
  }
@@ -0,0 +1,12 @@
1
+ <svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <style>
3
+ .square1 { fill: #888888; }
4
+ .square2 { fill: #D2D2D2; }
5
+ @media (prefers-color-scheme: dark) {
6
+ .square1 { fill: #D2D2D2; }
7
+ .square2 { fill: #888888; }
8
+ }
9
+ </style>
10
+ <rect class="square1" x="24" y="24" width="48" height="48" />
11
+ <rect class="square2" x="33" y="33" width="30" height="30" />
12
+ </svg>
@@ -2,8 +2,9 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <title>Demo - <%= tagName %></title>
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
5
  <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <link rel="icon" href="favicon.svg" sizes="any" type="image/svg+xml">
7
8
  <meta name="description" content="<%= tagName %>" />
8
9
  <style>
9
10
  html,