@blockquote/create-wc 1.103.1 → 1.104.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 +1 -1
- package/src/common-linting/templates/package.json +6 -4
- package/src/common-repo/templates/eslint.config.js +100 -54
- package/src/common-repo/templates/package.json +3 -3
- package/src/wc-lit-element/templates/styles/my-el-styles.css.js +0 -1
- package/src/wc-lit-element-ts/templates/package.json +2 -2
- package/src/wc-lit-element-ts/templates/styles/my-el-styles.css.ts +0 -1
package/package.json
CHANGED
|
@@ -45,16 +45,18 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@open-wc/eslint-config": "^12.0.3",
|
|
49
48
|
"@html-eslint/eslint-plugin": "^0.27.0",
|
|
50
49
|
"@html-eslint/parser": "^0.27.0",
|
|
51
|
-
"eslint": "^
|
|
50
|
+
"eslint": "^9.12.0",
|
|
52
51
|
"eslint-config-prettier": "^9.1.0",
|
|
53
|
-
"
|
|
52
|
+
"eslint-plugin-import": "^2.31.0",
|
|
53
|
+
"eslint-plugin-lit": "^1.15.0",
|
|
54
|
+
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
55
|
+
"eslint-plugin-wc": "^2.2.0",
|
|
54
56
|
"husky": "^9.1.6",
|
|
55
57
|
"lint-staged": "^15.2.10",
|
|
56
58
|
"prettier": "^3.3.3",
|
|
57
|
-
"stylelint": "^16.
|
|
59
|
+
"stylelint": "^16.10.0",
|
|
58
60
|
"stylelint-config-standard-scss": "^13.1.0"
|
|
59
61
|
}
|
|
60
62
|
}
|
|
@@ -1,35 +1,93 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import {fileURLToPath} from 'node:url';
|
|
4
|
+
import importPlugin from 'eslint-plugin-import';
|
|
5
|
+
import {configs as wc} from 'eslint-plugin-wc';
|
|
6
|
+
import {configs as lit} from 'eslint-plugin-lit';
|
|
1
7
|
import tseslint from 'typescript-eslint';
|
|
8
|
+
import tsParser from '@typescript-eslint/parser';
|
|
2
9
|
import html from '@html-eslint/eslint-plugin';
|
|
3
10
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
4
|
-
import path from 'node:path';
|
|
5
11
|
import js from '@eslint/js';
|
|
6
|
-
import {fileURLToPath} from 'node:url';
|
|
7
12
|
import {FlatCompat} from '@eslint/eslintrc';
|
|
8
13
|
|
|
9
14
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
15
|
const __dirname = path.dirname(__filename);
|
|
11
16
|
|
|
17
|
+
const fileTypes = '{js,ts,mjs}';
|
|
18
|
+
|
|
12
19
|
const compat = new FlatCompat({
|
|
13
20
|
baseDirectory: __dirname,
|
|
14
21
|
recommendedConfig: js.configs.recommended,
|
|
15
22
|
allConfig: js.configs.all,
|
|
16
23
|
});
|
|
17
24
|
|
|
18
|
-
|
|
25
|
+
// eslint-plugin-import
|
|
26
|
+
const importFilesConfig = [
|
|
27
|
+
importPlugin.flatConfigs.recommended,
|
|
28
|
+
importPlugin.flatConfigs.typescript,
|
|
29
|
+
].map((conf) => ({
|
|
19
30
|
...conf,
|
|
20
|
-
files: [
|
|
31
|
+
files: [`**/*.${fileTypes}`],
|
|
32
|
+
languageOptions: {
|
|
33
|
+
parser: tsParser,
|
|
34
|
+
},
|
|
21
35
|
}));
|
|
22
36
|
|
|
23
|
-
const
|
|
24
|
-
files: [
|
|
37
|
+
const importFilesRules = {
|
|
38
|
+
files: [`**/*.${fileTypes}`],
|
|
25
39
|
rules: {
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
'import/extensions': [
|
|
41
|
+
'error',
|
|
42
|
+
'always',
|
|
43
|
+
{
|
|
44
|
+
ignorePackages: true,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
'import/no-extraneous-dependencies': [
|
|
48
|
+
'error',
|
|
49
|
+
{
|
|
50
|
+
devDependencies: [
|
|
51
|
+
`**/test/**/*.${fileTypes}`,
|
|
52
|
+
`**/*.config.${fileTypes}`,
|
|
53
|
+
`**/*.conf.${fileTypes}`,
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
'import/no-unresolved': 'off',
|
|
58
|
+
'import/prefer-default-export': 'off',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// eslint-plugin-wc
|
|
63
|
+
const wcFilesConfig = [wc['flat/recommended']].map((conf) => ({
|
|
64
|
+
...conf,
|
|
65
|
+
files: [`**/*.${fileTypes}`],
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
const wcFilesRules = {
|
|
69
|
+
files: [`**/*.${fileTypes}`],
|
|
70
|
+
rules: {
|
|
71
|
+
'wc/no-constructor-attributes': 'warn',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// eslint-plugin-lit
|
|
76
|
+
const litFilesConfig = [lit['flat/recommended']].map((conf) => ({
|
|
77
|
+
...conf,
|
|
78
|
+
files: [`**/*.${fileTypes}`],
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
const litFilesRules = {
|
|
82
|
+
files: [`**/*.${fileTypes}`],
|
|
83
|
+
rules: {
|
|
84
|
+
'lit/lifecycle-super': 'error',
|
|
85
|
+
'lit/no-native-attributes': 'off',
|
|
86
|
+
'lit/no-useless-template-literals': 'off',
|
|
30
87
|
},
|
|
31
88
|
};
|
|
32
89
|
|
|
90
|
+
// @html-eslint/typescript-eslint
|
|
33
91
|
const tsFilesConfig = [...tseslint.configs.strict, ...tseslint.configs.stylistic].map((conf) => ({
|
|
34
92
|
...conf,
|
|
35
93
|
files: ['**/*.ts'],
|
|
@@ -43,37 +101,45 @@ const tsFilesRules = {
|
|
|
43
101
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
44
102
|
'@typescript-eslint/no-empty-function': 'off',
|
|
45
103
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
104
|
+
'@typescript-eslint/class-literal-property-style': 'off',
|
|
46
105
|
},
|
|
47
106
|
};
|
|
48
107
|
|
|
108
|
+
// @html-eslint/eslint-plugin
|
|
109
|
+
const htmlFilesConfig = [html.configs['flat/recommended']].map((conf) => ({
|
|
110
|
+
...conf,
|
|
111
|
+
files: ['**/*.html'],
|
|
112
|
+
}));
|
|
113
|
+
|
|
114
|
+
const htmlFilesRules = {
|
|
115
|
+
files: ['**/*.html'],
|
|
116
|
+
rules: {
|
|
117
|
+
'@html-eslint/indent': ['error', 2],
|
|
118
|
+
'@html-eslint/require-closing-tags': 'off',
|
|
119
|
+
'@html-eslint/no-extra-spacing-attrs': 'off',
|
|
120
|
+
'@html-eslint/attrs-newline': 'off',
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// eslint-config
|
|
49
125
|
export default [
|
|
50
126
|
{
|
|
51
127
|
ignores: [
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'**/coverage',
|
|
55
|
-
'**/reports',
|
|
56
|
-
'**/__snapshots__',
|
|
57
|
-
'**/screenshots',
|
|
58
|
-
'**/_site',
|
|
59
|
-
'**/dist',
|
|
60
|
-
'**/dev',
|
|
61
|
-
'**/build',
|
|
62
|
-
'**/.tmp',
|
|
63
|
-
'**/.wireit',
|
|
64
|
-
'**/*.d.ts',
|
|
65
|
-
'**/storybook-static',
|
|
66
|
-
'**/*.config.*',
|
|
67
|
-
'**/*.workspace.*',
|
|
68
|
-
'**/*.min.js',
|
|
69
|
-
'**/*-styles.*',
|
|
128
|
+
'**/{.idea,.vscode,coverage,reports,__snapshots__,screenshots,_site,dist,dev,build,.tmp,.wireit,storybook-static}/**',
|
|
129
|
+
'**/*.{d.ts,min.js,config.*,workspace.*,conf.*,test/**/*}',
|
|
70
130
|
],
|
|
71
131
|
},
|
|
72
|
-
...compat.extends('
|
|
73
|
-
...
|
|
74
|
-
|
|
132
|
+
...compat.extends('plugin:lit-a11y/recommended'),
|
|
133
|
+
...importFilesConfig,
|
|
134
|
+
importFilesRules,
|
|
135
|
+
...wcFilesConfig,
|
|
136
|
+
wcFilesRules,
|
|
137
|
+
...litFilesConfig,
|
|
138
|
+
litFilesRules,
|
|
75
139
|
...tsFilesConfig,
|
|
76
140
|
tsFilesRules,
|
|
141
|
+
...htmlFilesConfig,
|
|
142
|
+
htmlFilesRules,
|
|
77
143
|
eslintConfigPrettier,
|
|
78
144
|
{
|
|
79
145
|
languageOptions: {
|
|
@@ -98,34 +164,14 @@ export default [
|
|
|
98
164
|
ignoredNodes: ['PropertyDefinition', 'TemplateLiteral *'],
|
|
99
165
|
},
|
|
100
166
|
],
|
|
101
|
-
'
|
|
102
|
-
|
|
103
|
-
'always',
|
|
104
|
-
{
|
|
105
|
-
ignorePackages: true,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
'import/no-extraneous-dependencies': [
|
|
109
|
-
'error',
|
|
110
|
-
{
|
|
111
|
-
devDependencies: [
|
|
112
|
-
'**/test/**/*.{js,ts}',
|
|
113
|
-
'**/*.config.{js,ts,mjs,cjs}',
|
|
114
|
-
'**/*.conf.{js,ts,mjs,cjs}',
|
|
115
|
-
],
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
'import/no-unresolved': 'off',
|
|
119
|
-
'import/prefer-default-export': 'off',
|
|
120
|
-
'lit/no-native-attributes': 'off',
|
|
121
|
-
'lit/no-useless-template-literals': 'off',
|
|
167
|
+
'no-empty-function': 'error',
|
|
168
|
+
'lit-a11y/no-autofocus': 'off',
|
|
122
169
|
'lit-a11y/anchor-is-valid': 'off',
|
|
123
170
|
'lit-a11y/click-events-have-key-events': 'off',
|
|
124
|
-
'lit-a11y/no-autofocus': 'off',
|
|
125
171
|
},
|
|
126
172
|
},
|
|
127
173
|
{
|
|
128
|
-
files: [
|
|
174
|
+
files: [`**/test/**/*.${fileTypes}`],
|
|
129
175
|
rules: {
|
|
130
176
|
'no-unused-expressions': 'off',
|
|
131
177
|
'@typescript-eslint/no-unused-expressions': 'off',
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"prepare": "husky"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"lit": "^3.2.
|
|
25
|
+
"lit": "^3.2.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@blockquote/cem-to-markdown-readme": "^1.0.0",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@blockquote/sass-style-template": "^3.0.3",
|
|
33
33
|
"@custom-elements-manifest/analyzer": "^0.10.3",
|
|
34
34
|
"@open-wc/testing": "^4.0.0",
|
|
35
|
-
"@types/mocha": "^10.0.
|
|
35
|
+
"@types/mocha": "^10.0.9",
|
|
36
36
|
"@web/test-runner": "^0.19.0",
|
|
37
37
|
"@web/test-runner-playwright": "^0.11.0",
|
|
38
38
|
"@web/rollup-plugin-html": "^2.3.0",
|
|
39
39
|
"concurrently": "^9.0.1",
|
|
40
40
|
"sort-package-json": "^2.10.1",
|
|
41
41
|
"ts-lit-plugin": "^2.0.2",
|
|
42
|
-
"vite": "^5.4.
|
|
42
|
+
"vite": "^5.4.9"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|