@blockquote/create-wc 1.96.4 → 1.97.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.96.4",
3
+ "version": "1.97.0",
4
4
  "description": "Web component with Lit scaffolding - Extending Open Web Component",
5
5
  "keywords": [
6
6
  "LitElement",
@@ -11,10 +11,10 @@
11
11
  "openwc",
12
12
  "generator"
13
13
  ],
14
- "homepage": "https://github.com/oscarmarina/create",
14
+ "homepage": "https://github.com/oscarmarina/create-wc",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/oscarmarina/create.git"
17
+ "url": "git+https://github.com/oscarmarina/create-wc.git"
18
18
  },
19
19
  "license": "MIT",
20
20
  "author": "Oscar Marina",
@@ -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,137 @@
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
+ '**/.DS_Store',
25
+ '**/node_modules',
26
+ '**/npm-debug.log',
27
+ '**/*-debug.log',
28
+ '**/yarn-error.log',
29
+ '**/coverage',
30
+ '**/coverage/',
31
+ '**/reports',
32
+ '**/__snapshots__',
33
+ 'screenshots/.current',
34
+ 'screenshots/.diff',
35
+ '**/_site',
36
+ '**/dist',
37
+ '**/dev',
38
+ '**/build',
39
+ '**/.tmp',
40
+ '**/*.tgz',
41
+ '**/*.tsbuildinfo',
42
+ '**/storybook-static',
43
+ '**/*.d.ts',
44
+ '**/*.config.*',
45
+ '**/package-lock.json',
46
+ '**/*.min.js',
47
+ '**/*-styles.*',
48
+ '**/CHANGELOG.md',
49
+ ],
50
+ },
51
+ ...compat.extends('@open-wc', 'plugin:@typescript-eslint/recommended', 'prettier'),
52
+ {
53
+ files: ['**/*.html'],
54
+ plugins: {
55
+ '@html-eslint': html,
56
+ },
57
+ languageOptions: {
58
+ parser: htmlParser,
59
+ },
60
+ rules: {
61
+ '@html-eslint/indent': ['error', 2],
62
+ },
63
+ },
64
+ {
65
+ files: ['**/*.ts'],
66
+ plugins: {
67
+ '@typescript-eslint': typescriptEslint,
68
+ },
69
+ languageOptions: {
70
+ parser: tsParser,
71
+ },
72
+ rules: {
73
+ '@typescript-eslint/ban-types': 'off',
74
+ '@typescript-eslint/explicit-function-return-type': 'off',
75
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
76
+ '@typescript-eslint/no-array-constructor': 'error',
77
+ '@typescript-eslint/no-empty-function': 'off',
78
+ '@typescript-eslint/no-explicit-any': 'error',
79
+ '@typescript-eslint/no-loss-of-precision': 'error',
80
+ '@typescript-eslint/no-namespace': 'error',
81
+ '@typescript-eslint/no-non-null-assertion': 'off',
82
+ },
83
+ },
84
+ {
85
+ languageOptions: {
86
+ ecmaVersion: 'latest',
87
+ sourceType: 'module',
88
+ },
89
+ rules: {
90
+ 'class-methods-use-this': 'off',
91
+ 'no-unused-expressions': [
92
+ 'error',
93
+ {
94
+ allowShortCircuit: true,
95
+ allowTernary: true,
96
+ },
97
+ ],
98
+
99
+ 'object-curly-newline': 'off',
100
+
101
+ 'import/extensions': [
102
+ 'error',
103
+ 'always',
104
+ {
105
+ ignorePackages: true,
106
+ },
107
+ ],
108
+
109
+ 'import/no-extraneous-dependencies': [
110
+ 'error',
111
+ {
112
+ devDependencies: [
113
+ '**/test/**/*.{js,ts}',
114
+ '**/*.config.{js,ts,mjs,cjs}',
115
+ '**/*.conf.{js,ts,mjs,cjs}',
116
+ ],
117
+ },
118
+ ],
119
+
120
+ 'import/no-unresolved': 'off',
121
+ 'import/prefer-default-export': 'off',
122
+
123
+ indent: [
124
+ 'error',
125
+ 2,
126
+ {
127
+ SwitchCase: 1,
128
+ ignoredNodes: ['PropertyDefinition', 'TemplateLiteral > *'],
129
+ },
130
+ ],
131
+
132
+ 'lit/no-classfield-shadowing': 'off',
133
+ 'lit/no-native-attributes': 'off',
134
+ 'lit-a11y/click-events-have-key-events': 'off',
135
+ },
136
+ },
137
+ ];
@@ -1,32 +1,32 @@
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__
16
+ **/coverage
17
+ **/reports
18
+ **/__snapshots__
20
19
  screenshots/.current
21
20
  screenshots/.diff
22
21
 
23
22
 
24
23
  ## build
25
- _site
26
- dist
27
- dev
28
- build
29
- .tmp
30
- *.tgz
31
- *.tsbuildinfo
32
- storybook-static
24
+ **/_site
25
+ **/dist
26
+ **/dev
27
+ **/build
28
+ **/.tmp
29
+ **/*.tgz
30
+ **/*.tsbuildinfo
31
+ **/storybook-static
32
+ ## 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,40 @@
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/.current
20
+ screenshots/.diff
21
+
22
+
23
+ ## build
24
+ **/_site
25
+ **/dist
26
+ **/dev
27
+ **/build
28
+ **/.tmp
29
+ **/*.tgz
30
+ **/*.tsbuildinfo
31
+ **/storybook-static
32
+ ## end gitignore
33
+
34
+ ## specific prettierignore
35
+ **/*.d.ts
36
+ **/*.config.*
37
+ **/package-lock.json
38
+ **/*.min.js
39
+ **/*-styles.*
40
+ **/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
- {}