@blockquote/create-wc 1.96.5 → 1.97.1

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.96.5",
3
+ "version": "1.97.1",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -39,7 +39,7 @@
39
39
  "trailingComma": "all"
40
40
  },
41
41
  "dependencies": {
42
- "@open-wc/create": "^0.38.70",
42
+ "@open-wc/create": "^0.38.129",
43
43
  "chalk": "^5.3.0",
44
44
  "command-line-args": "^5.2.1",
45
45
  "prompts": "^2.4.2",
@@ -49,7 +49,7 @@
49
49
  "@open-wc/eslint-config": "^12.0.3",
50
50
  "eslint": "^8.57.0",
51
51
  "eslint-config-prettier": "^9.1.0",
52
- "prettier": "^3.2.5"
52
+ "prettier": "^3.3.2"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=14.15.0"
@@ -2,12 +2,10 @@
2
2
  import { CommonLintingMixin } from '../common-linting/index.js';
3
3
  import { CommonTestingWtrMixin } from '../common-testing-wtr/index.js';
4
4
 
5
- import { LintingMixin } from '../linting/index.js';
6
5
  import { WcLitElementPackageMixin } from '../wc-lit-element/index.js';
7
6
  import { TestingMixin, TestingScaffoldMixin } from '../testing/index.js';
8
7
 
9
8
  // ts
10
- import { TsLintingMixin } from '../linting-ts/index.js';
11
9
  import { TsWcLitElementPackageMixin } from '../wc-lit-element-ts/index.js';
12
10
  import { TsTestingMixin, TsTestingScaffoldMixin } from '../testing-ts/index.js';
13
11
 
@@ -15,14 +13,12 @@ export function gatherMixins(options) {
15
13
  const mixins = [];
16
14
  if (options.typescript === 'true') {
17
15
  mixins.push(CommonLintingMixin);
18
- mixins.push(TsLintingMixin);
19
16
  mixins.push(CommonTestingWtrMixin);
20
17
  mixins.push(TsTestingMixin);
21
18
  mixins.push(TsTestingScaffoldMixin);
22
19
  mixins.push(TsWcLitElementPackageMixin);
23
20
  } else {
24
21
  mixins.push(CommonLintingMixin);
25
- mixins.push(LintingMixin);
26
22
  mixins.push(CommonTestingWtrMixin);
27
23
  mixins.push(TestingMixin);
28
24
  mixins.push(TestingScaffoldMixin);
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "scripts": {
3
3
  "format": "npm run format:eslint && npm run format:prettier && npm run format:stylelint",
4
- "format:eslint": "eslint \"**/*.{js,ts,html}\" --fix --ignore-path .eslintignore",
5
- "format:prettier": "prettier \"**/*.{js,ts,json,html}\" --write --ignore-path .eslintignore",
6
- "format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .eslintignore",
4
+ "format:eslint": "eslint .",
5
+ "format:prettier": "prettier \"**/*.{js,ts,json,html}\" --write --ignore-path .prettierignore",
6
+ "format:stylelint": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .prettierignore",
7
7
  "lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
8
- "lint:eslint": "eslint \"**/*.{js,ts,html}\" --ignore-path .eslintignore",
9
- "lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .eslintignore",
10
- "lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .eslintignore"
8
+ "lint:eslint": "eslint .",
9
+ "lint:prettier": "prettier \"**/*.{js,ts,json,html}\" --check --ignore-path .prettierignore",
10
+ "lint:stylelint": "stylelint \"**/*.{scss,css}\" --allow-empty-input --ignore-path .prettierignore"
11
11
  },
12
12
  "lint-staged": {
13
13
  "**/*.{js,ts,html}": [
@@ -35,55 +35,7 @@
35
35
  }
36
36
  ]
37
37
  },
38
- "eslintConfig": {
39
- "parserOptions": {
40
- "ecmaVersion": "latest"
41
- },
42
- "rules": {
43
- "class-methods-use-this": "off",
44
- "no-unused-expressions": [
45
- "error",
46
- {
47
- "allowShortCircuit": true,
48
- "allowTernary": true
49
- }
50
- ],
51
- "object-curly-newline": "off",
52
- "import/extensions": [
53
- "error",
54
- "always",
55
- {
56
- "ignorePackages": true
57
- }
58
- ],
59
- "import/no-extraneous-dependencies": [
60
- "error",
61
- {
62
- "devDependencies": [
63
- "**/test/**/*.{js,ts}",
64
- "**/*.config.{js,ts,mjs,cjs}",
65
- "**/*.conf.{js,ts,mjs,cjs}"
66
- ]
67
- }
68
- ],
69
- "import/no-unresolved": "off",
70
- "import/prefer-default-export": "off",
71
- "indent": [
72
- "error",
73
- 2,
74
- {
75
- "SwitchCase": 1,
76
- "ignoredNodes": [
77
- "PropertyDefinition",
78
- "TemplateLiteral > CallExpression"
79
- ]
80
- }
81
- ],
82
- "lit/no-classfield-shadowing": "off",
83
- "lit/no-native-attributes": "off",
84
- "lit-a11y/click-events-have-key-events": "off"
85
- }
86
- },
38
+
87
39
  "stylelint": {
88
40
  "extends": "stylelint-config-standard-scss",
89
41
  "rules": {
@@ -97,10 +49,14 @@
97
49
  "@open-wc/eslint-config": "^12.0.3",
98
50
  "eslint": "^8.57.0",
99
51
  "eslint-config-prettier": "^9.1.0",
52
+ "@html-eslint/eslint-plugin": "^0.24.1",
53
+ "@html-eslint/parser": "^0.24.1",
100
54
  "husky": "^9.0.11",
101
- "lint-staged": "^15.2.2",
102
- "prettier": "^3.2.5",
103
- "stylelint": "^16.5.0",
104
- "stylelint-config-standard-scss": "^13.1.0"
55
+ "lint-staged": "^15.2.7",
56
+ "prettier": "^3.3.2",
57
+ "stylelint": "^16.6.1",
58
+ "stylelint-config-standard-scss": "^13.1.0",
59
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
60
+ "@typescript-eslint/parser": "^7.13.0"
105
61
  }
106
62
  }
@@ -32,10 +32,15 @@ export const CommonRepoMixin = (subclass) =>
32
32
  // write and rename .gitignore
33
33
  this.copyTemplate(`${__dirname}/templates/gitignore`, this.destinationPath(`.gitignore`));
34
34
 
35
- // write and rename .eslintignore
35
+ // write and rename .prettierignore
36
36
  this.copyTemplate(
37
- `${__dirname}/templates/eslintignore`,
38
- this.destinationPath(`.eslintignore`),
37
+ `${__dirname}/templates/prettierignore`,
38
+ this.destinationPath(`.prettierignore`),
39
+ );
40
+
41
+ this.copyTemplate(
42
+ `${__dirname}/templates/eslint.config.js`,
43
+ this.destinationPath(`eslint.config.js`,),
39
44
  );
40
45
 
41
46
  // copy all other files
@@ -0,0 +1,122 @@
1
+ import typescriptEslint from '@typescript-eslint/eslint-plugin';
2
+ import tsParser from '@typescript-eslint/parser';
3
+ import html from '@html-eslint/eslint-plugin';
4
+ import htmlParser from '@html-eslint/parser';
5
+ import path from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+ import js from '@eslint/js';
8
+ import { FlatCompat } from '@eslint/eslintrc';
9
+
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = path.dirname(__filename);
12
+ const compat = new FlatCompat({
13
+ baseDirectory: __dirname,
14
+ recommendedConfig: js.configs.recommended,
15
+ allConfig: js.configs.all,
16
+ });
17
+
18
+ export default [
19
+ {
20
+ ignores: [
21
+ '**/.idea',
22
+ '**/.vscode',
23
+ '**/.code-workspace',
24
+ '**/coverage',
25
+ '**/reports',
26
+ '**/__snapshots__',
27
+ '**/screenshots',
28
+ '**/_site',
29
+ '**/dist',
30
+ '**/dev',
31
+ '**/build',
32
+ '**/.tmp',
33
+ '**/*.d.ts',
34
+ '**/storybook-static',
35
+ '**/*.config.*',
36
+ '**/*.min.js',
37
+ '**/*-styles.*',
38
+ ],
39
+ },
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
+ },
74
+ {
75
+ languageOptions: {
76
+ ecmaVersion: 'latest',
77
+ sourceType: 'module',
78
+ },
79
+ rules: {
80
+ 'class-methods-use-this': 'off',
81
+ 'no-unused-expressions': [
82
+ 'error',
83
+ {
84
+ allowShortCircuit: true,
85
+ allowTernary: true,
86
+ },
87
+ ],
88
+
89
+ 'object-curly-newline': 'off',
90
+ 'import/extensions': [
91
+ 'error',
92
+ 'always',
93
+ {
94
+ ignorePackages: true,
95
+ },
96
+ ],
97
+ 'import/no-extraneous-dependencies': [
98
+ 'error',
99
+ {
100
+ devDependencies: [
101
+ '**/test/**/*.{js,ts}',
102
+ '**/*.config.{js,ts,mjs,cjs}',
103
+ '**/*.conf.{js,ts,mjs,cjs}',
104
+ ],
105
+ },
106
+ ],
107
+ 'import/no-unresolved': 'off',
108
+ 'import/prefer-default-export': 'off',
109
+ indent: [
110
+ 'error',
111
+ 2,
112
+ {
113
+ SwitchCase: 1,
114
+ ignoredNodes: ['PropertyDefinition', 'TemplateLiteral > *'],
115
+ },
116
+ ],
117
+ 'lit/no-classfield-shadowing': 'off',
118
+ 'lit/no-native-attributes': 'off',
119
+ 'lit-a11y/click-events-have-key-events': 'off',
120
+ },
121
+ },
122
+ ];
@@ -1,32 +1,30 @@
1
1
  ## editors
2
- /.idea
3
- /.vscode
4
- /*.code-workspace
2
+ **/.idea
3
+ **/.vscode
4
+ **/.code-workspace
5
5
 
6
6
  ## system files
7
- .DS_Store
7
+ **/.DS_Store
8
8
 
9
9
  ## npm/yarn
10
- node_modules
11
- npm-debug.log
12
- *-debug.log
13
- yarn-error.log
10
+ **/node_modules
11
+ **/npm-debug.log
12
+ **/*-debug.log
13
+ **/yarn-error.log
14
14
 
15
15
  ## testing
16
- coverage
17
- **/coverage/
18
- reports
19
- __snapshots__
20
- screenshots/.current
21
- screenshots/.diff
22
-
16
+ **/coverage
17
+ **/reports
18
+ **/__snapshots__
19
+ **/screenshots
23
20
 
24
21
  ## build
25
- _site
26
- dist
27
- dev
28
- build
29
- .tmp
30
- *.tgz
31
- *.tsbuildinfo
32
- storybook-static
22
+ **/_site
23
+ **/dist
24
+ **/dev
25
+ **/build
26
+ **/.tmp
27
+ **/*.tgz
28
+ **/*.tsbuildinfo
29
+ **/storybook-static
30
+ ## end gitignore
@@ -22,20 +22,24 @@
22
22
  "prepare": "husky"
23
23
  },
24
24
  "dependencies": {
25
- "lit": "^3.1.3"
25
+ "lit": "^3.1.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@blockquote/cem-to-markdown-readme": "^1.0.0",
29
29
  "@blockquote/coverage-table-reporter": "^1.2.0",
30
30
  "@blockquote/rollup-plugin-externalize-source-dependencies": "^1.0.0",
31
31
  "@blockquote/rollup-plugin-total-bundlesize": "^2.1.2",
32
- "@blockquote/sass-style-template": "^3.0.2",
32
+ "@blockquote/sass-style-template": "^3.0.3",
33
33
  "@custom-elements-manifest/analyzer": "^0.10.2",
34
+ "@open-wc/testing": "^4.0.0",
35
+ "@types/mocha": "^10.0.6",
36
+ "@web/test-runner": "^0.18.2",
37
+ "@web/test-runner-playwright": "^0.11.0",
34
38
  "@web/rollup-plugin-html": "^2.3.0",
35
39
  "concurrently": "^8.2.2",
36
40
  "sort-package-json": "^2.10.0",
37
41
  "ts-lit-plugin": "^2.0.2",
38
- "vite": "^5.2.11"
42
+ "vite": "^5.3.1"
39
43
  },
40
44
  "publishConfig": {
41
45
  "access": "public"
@@ -0,0 +1,38 @@
1
+ ## editors
2
+ **/.idea
3
+ **/.vscode
4
+ **/.code-workspace
5
+
6
+ ## system files
7
+ **/.DS_Store
8
+
9
+ ## npm/yarn
10
+ **/node_modules
11
+ **/npm-debug.log
12
+ **/*-debug.log
13
+ **/yarn-error.log
14
+
15
+ ## testing
16
+ **/coverage
17
+ **/reports
18
+ **/__snapshots__
19
+ **/screenshots
20
+
21
+ ## build
22
+ **/_site
23
+ **/dist
24
+ **/dev
25
+ **/build
26
+ **/.tmp
27
+ **/*.tgz
28
+ **/*.tsbuildinfo
29
+ **/storybook-static
30
+ ## end gitignore
31
+
32
+ ## specific prettierignore
33
+ **/*.d.ts
34
+ **/*.config.*
35
+ **/package-lock.json
36
+ **/*.min.js
37
+ **/*-styles.*
38
+ **/CHANGELOG.md
@@ -1,8 +1 @@
1
- {
2
- "devDependencies": {
3
- "@open-wc/testing": "^4.0.0",
4
- "@types/mocha": "^10.0.6",
5
- "@web/test-runner": "^0.18.2",
6
- "@web/test-runner-playwright": "^0.11.0"
7
- }
8
- }
1
+ {}
@@ -1,8 +1 @@
1
- {
2
- "devDependencies": {
3
- "@open-wc/testing": "^4.0.0",
4
- "@types/mocha": "^10.0.6",
5
- "@web/test-runner": "^0.18.2",
6
- "@web/test-runner-playwright": "^0.11.0"
7
- }
8
- }
1
+ {}
@@ -32,7 +32,7 @@
32
32
  "sass:watch": "sass-style-template -j ts"
33
33
  },
34
34
  "devDependencies": {
35
- "tslib": "^2.6.2",
35
+ "tslib": "^2.6.3",
36
36
  "typescript": "^5.4.5"
37
37
  }
38
38
  }
@@ -36,5 +36,5 @@
36
36
  ],
37
37
  "types": ["mocha"]
38
38
  },
39
- "include": ["src/**/*.ts", "define/**/*.ts", "test/**/*.ts"],
39
+ "include": ["src/**/*.ts", "define/**/*.ts", "test/**/*.ts"]
40
40
  }
@@ -1,41 +0,0 @@
1
- ## editors
2
- /.idea
3
- /.vscode
4
- /*.code-workspace
5
-
6
- ## system files
7
- .DS_Store
8
-
9
- ## npm/yarn
10
- node_modules
11
- npm-debug.log
12
- *-debug.log
13
- yarn-error.log
14
-
15
- ## testing
16
- coverage
17
- **/coverage/
18
- reports
19
- __snapshots__
20
- screenshots/.current
21
- screenshots/.diff
22
-
23
-
24
- ## build
25
- _site
26
- dist
27
- dev
28
- build
29
- .tmp
30
- *.tgz
31
- *.tsbuildinfo
32
- *.d.ts
33
- storybook-static
34
- ## end gitignore
35
-
36
- ## specific eslintignore
37
- *.config.*
38
- package-lock.json
39
- *.min.js
40
- *-styles.*
41
- CHANGELOG.md
@@ -1,21 +0,0 @@
1
- /* eslint-disable no-console */
2
- import { fileURLToPath } from 'url';
3
- import { dirname } from 'path';
4
- import { LintingEsLintMixin } from '../linting-eslint/index.js';
5
- import { LintingPrettierMixin } from '../linting-prettier/index.js';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
-
10
- export const LintingMixin = (subclass) =>
11
- class extends LintingPrettierMixin(LintingEsLintMixin(subclass)) {
12
- async execute() {
13
- await super.execute();
14
-
15
- // extend package.json
16
- this.copyTemplateJsonInto(
17
- `${__dirname}/templates/package.json`,
18
- this.destinationPath('package.json'),
19
- );
20
- }
21
- };
@@ -1 +0,0 @@
1
- {}
@@ -1,17 +0,0 @@
1
- import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = dirname(__filename);
6
-
7
- export const LintingEsLintMixin = (subclass) =>
8
- class extends subclass {
9
- async execute() {
10
- await super.execute();
11
-
12
- this.copyTemplateJsonInto(
13
- `${__dirname}/templates/package.json`,
14
- this.destinationPath('package.json'),
15
- );
16
- }
17
- };
@@ -1,8 +0,0 @@
1
- {
2
- "eslintConfig": {
3
- "extends": [
4
- "@open-wc",
5
- "prettier"
6
- ]
7
- }
8
- }
@@ -1,17 +0,0 @@
1
- import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = dirname(__filename);
6
-
7
- export const TsLintingEsLintMixin = (subclass) =>
8
- class extends subclass {
9
- async execute() {
10
- await super.execute();
11
-
12
- this.copyTemplateJsonInto(
13
- `${__dirname}/templates/package.json`,
14
- this.destinationPath('package.json'),
15
- );
16
- }
17
- };
@@ -1,28 +0,0 @@
1
- {
2
- "eslintConfig": {
3
- "parser": "@typescript-eslint/parser",
4
- "plugins": [
5
- "@typescript-eslint"
6
- ],
7
- "extends": [
8
- "@open-wc",
9
- "plugin:@typescript-eslint/recommended",
10
- "prettier"
11
- ],
12
- "rules": {
13
- "@typescript-eslint/ban-types": "off",
14
- "@typescript-eslint/explicit-function-return-type": "off",
15
- "@typescript-eslint/explicit-module-boundary-types": "off",
16
- "@typescript-eslint/no-array-constructor": "error",
17
- "@typescript-eslint/no-empty-function": "off",
18
- "@typescript-eslint/no-explicit-any": "error",
19
- "@typescript-eslint/no-loss-of-precision": "error",
20
- "@typescript-eslint/no-namespace": "error",
21
- "@typescript-eslint/no-non-null-assertion": "off"
22
- }
23
- },
24
- "devDependencies": {
25
- "@typescript-eslint/eslint-plugin": "^7.9.0",
26
- "@typescript-eslint/parser": "^7.9.0"
27
- }
28
- }
@@ -1,17 +0,0 @@
1
- import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = dirname(__filename);
6
-
7
- export const LintingPrettierMixin = (subclass) =>
8
- class extends subclass {
9
- async execute() {
10
- await super.execute();
11
-
12
- this.copyTemplateJsonInto(
13
- `${__dirname}/templates/package.json`,
14
- this.destinationPath('package.json'),
15
- );
16
- }
17
- };
@@ -1,17 +0,0 @@
1
- import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = dirname(__filename);
6
-
7
- export const TsLintingPrettierMixin = (subclass) =>
8
- class extends subclass {
9
- async execute() {
10
- await super.execute();
11
-
12
- this.copyTemplateJsonInto(
13
- `${__dirname}/templates/package.json`,
14
- this.destinationPath('package.json'),
15
- );
16
- }
17
- };
@@ -1,21 +0,0 @@
1
- /* eslint-disable no-console */
2
- import { fileURLToPath } from 'url';
3
- import { dirname } from 'path';
4
- import { TsLintingEsLintMixin } from '../linting-eslint-ts/index.js';
5
- import { TsLintingPrettierMixin } from '../linting-prettier-ts/index.js';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
-
10
- export const TsLintingMixin = (subclass) =>
11
- class extends TsLintingPrettierMixin(TsLintingEsLintMixin(subclass)) {
12
- async execute() {
13
- await super.execute();
14
-
15
- // extend package.json
16
- this.copyTemplateJsonInto(
17
- `${__dirname}/templates/package.json`,
18
- this.destinationPath('package.json'),
19
- );
20
- }
21
- };
@@ -1 +0,0 @@
1
- {}