Skip to content

Commit 19889d7

Browse files
committed
chore: update eslint config
1 parent 48faf16 commit 19889d7

File tree

11 files changed

+70
-18
lines changed

11 files changed

+70
-18
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@babel/register": "^7.16.0",
5959
"@custom-elements-manifest/analyzer": "^0.4.17",
6060
"@open-wc/building-rollup": "^2.0.2",
61-
"@open-wc/eslint-config": "^9.0.0",
61+
"@open-wc/eslint-config": "^9.2.1",
6262
"@open-wc/testing": "^2.5.33",
6363
"@rollup/plugin-babel": "^5.3.0",
6464
"@web/rollup-plugin-html": "^1.11.0",
@@ -69,7 +69,7 @@
6969
"eslint": "^8.30.0",
7070
"eslint-config-prettier": "^8.3.0",
7171
"eslint-plugin-import": "^2.25.3",
72-
"eslint-plugin-lit": "^1.6.1",
72+
"eslint-plugin-lit": "^1.8.2",
7373
"eslint-plugin-lit-a11y": "^1.1.0",
7474
"eslint-plugin-wc": "^1.3.2",
7575
"lit": "^2.0.2",

src/generators/app-lit-element/templates/static-demoing/.storybook/server.mjs renamed to src/generators/app-lit-element/templates/static-demoing/.storybook/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { storybookPlugin } from '@web/dev-server-storybook';
2-
import baseConfig from '../web-dev-server.config.mjs';
2+
import baseConfig from '../web-dev-server.config.js';
33

44
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
55
...baseConfig,

src/generators/linting-eslint-ts/templates/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"devDependencies": {
33
"eslint": "^8.31.0",
4-
"@open-wc/eslint-config": "^9.0.0",
4+
"@open-wc/eslint-config": "^9.2.1",
55
"@typescript-eslint/parser": "^5.48.0",
66
"@typescript-eslint/eslint-plugin": "^5.48.0"
77
},

src/generators/linting-eslint/templates/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
{
22
"devDependencies": {
33
"eslint": "^8.31.0",
4-
"@open-wc/eslint-config": "^9.0.2"
4+
"@open-wc/eslint-config": "^9.2.1"
55
},
66
"eslintConfig": {
7-
"parserOptions": {
8-
"ecmaVersion": "latest"
9-
},
107
"extends": [
118
"@open-wc"
129
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { storybookPlugin } from '@web/dev-server-storybook';
2+
import baseConfig from '../web-dev-server.config.js';
3+
4+
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
5+
...baseConfig,
6+
open: '/',
7+
plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins],
8+
});

test/snapshots/fully-loaded-app/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@babel/preset-env": "^7.16.4",
2525
"@custom-elements-manifest/analyzer": "^0.4.17",
2626
"@open-wc/building-rollup": "^2.0.2",
27-
"@open-wc/eslint-config": "^9.0.2",
27+
"@open-wc/eslint-config": "^9.2.1",
2828
"@open-wc/testing": "^3.1.6",
2929
"@rollup/plugin-babel": "^5.3.0",
3030
"@rollup/plugin-node-resolve": "^13.0.6",
@@ -46,9 +46,6 @@
4646
"rollup-plugin-workbox": "^6.2.0"
4747
},
4848
"eslintConfig": {
49-
"parserOptions": {
50-
"ecmaVersion": "latest"
51-
},
5249
"extends": [
5350
"@open-wc",
5451
"prettier"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// import { playwrightLauncher } from '@web/test-runner-playwright';
2+
3+
const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4+
5+
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6+
/** Test files to run */
7+
files: 'test/**/*.test.js',
8+
9+
/** Resolve bare module imports */
10+
nodeResolve: {
11+
exportConditions: ['browser', 'development'],
12+
},
13+
14+
/** Filter out lit dev mode logs */
15+
filterBrowserLogs(log) {
16+
for (const arg of log.args) {
17+
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18+
return false;
19+
}
20+
}
21+
return true;
22+
},
23+
24+
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25+
// esbuildTarget: 'auto',
26+
27+
/** Amount of browsers to run concurrently */
28+
// concurrentBrowsers: 2,
29+
30+
/** Amount of test files per browser to test concurrently */
31+
// concurrency: 1,
32+
33+
/** Browsers to run tests on */
34+
// browsers: [
35+
// playwrightLauncher({ product: 'chromium' }),
36+
// playwrightLauncher({ product: 'firefox' }),
37+
// playwrightLauncher({ product: 'webkit' }),
38+
// ],
39+
40+
// See documentation for all available options
41+
});

0 commit comments

Comments
 (0)