@@ -12,6 +12,8 @@ import noSrcImports from './scripts/eslint-rules/no-src-imports.js';
1212export default ts . config (
1313 js . configs . recommended ,
1414 ...ts . configs . strictTypeChecked ,
15+ litConfigs [ 'flat/recommended' ] ,
16+ wcConfigs [ 'flat/recommended' ] ,
1517 {
1618 ignores : [ '*' , '*/' , '!src/' , '!tests/' , 'src/@types/' , 'src/test/**/*' ] ,
1719 } ,
@@ -22,11 +24,7 @@ export default ts.config(
2224 plugins : {
2325 'import-x' : importX ,
2426 'anti-trojan-source' : antiTrojanSource ,
25- '@gitlens' : {
26- rules : {
27- 'no-src-imports' : noSrcImports ,
28- } ,
29- } ,
27+ '@gitlens' : { rules : { 'no-src-imports' : noSrcImports } } ,
3028 } ,
3129 rules : {
3230 '@gitlens/no-src-imports' : 'error' ,
@@ -328,16 +326,12 @@ export default ts.config(
328326 files : [ 'src/**/*' ] ,
329327 ignores : [ '**/webview/**/*' , 'src/test/**/*' , 'src/webviews/apps/**/*' , 'src/env/browser/**/*' ] ,
330328 languageOptions : {
331- globals : {
332- ...globals . node ,
333- } ,
329+ globals : { ...globals . node } ,
334330 parser : ts . parser ,
335331 parserOptions : {
336- ecmaVersion : 2022 ,
332+ ecmaVersion : 2023 ,
337333 sourceType : 'module' ,
338- ecmaFeatures : {
339- impliedStrict : true ,
340- } ,
334+ ecmaFeatures : { impliedStrict : true } ,
341335 projectService : true ,
342336 } ,
343337 } ,
@@ -369,24 +363,18 @@ export default ts.config(
369363 files : [ 'src/**/*' ] ,
370364 ignores : [ '**/webview/**/*' , 'src/test/**/*' , 'src/webviews/apps/**/*' , 'src/env/node/**/*' ] ,
371365 languageOptions : {
372- globals : {
373- ...globals . worker ,
374- } ,
366+ globals : { ...globals . worker } ,
375367 parser : ts . parser ,
376368 parserOptions : {
377- ecmaVersion : 2022 ,
369+ ecmaVersion : 2023 ,
378370 sourceType : 'module' ,
379- ecmaFeatures : {
380- impliedStrict : true ,
381- } ,
371+ ecmaFeatures : { impliedStrict : true } ,
382372 projectService : true ,
383373 } ,
384374 } ,
385375 } ,
386376 {
387377 name : 'webviews' ,
388- ...litConfigs [ 'flat/recommended' ] ,
389- ...wcConfigs [ 'flat/recommended' ] ,
390378 // Keep in sync with `src/webviews/apps/tsconfig.json`
391379 files : [
392380 'src/webviews/apps/**/*' ,
@@ -404,16 +392,12 @@ export default ts.config(
404392 ] ,
405393 ignores : [ '**/-webview/**/*' ] ,
406394 languageOptions : {
407- globals : {
408- ...globals . browser ,
409- } ,
395+ globals : { ...globals . browser } ,
410396 parser : ts . parser ,
411397 parserOptions : {
412- ecmaVersion : 2022 ,
398+ ecmaVersion : 2023 ,
413399 sourceType : 'module' ,
414- ecmaFeatures : {
415- impliedStrict : true ,
416- } ,
400+ ecmaFeatures : { impliedStrict : true } ,
417401 projectService : true ,
418402 } ,
419403 } ,
@@ -457,23 +441,27 @@ export default ts.config(
457441 name : 'webviews-apps-only' ,
458442 ...litConfigs [ 'flat/recommended' ] ,
459443 ...wcConfigs [ 'flat/recommended' ] ,
444+ ...wcConfigs [ 'flat/best-practice' ] ,
460445 files : [ 'src/webviews/apps/**/*' ] ,
461446 ignores : [ '**/-webview/**/*' ] ,
462447 languageOptions : {
463- globals : {
464- ...globals . browser ,
465- } ,
448+ globals : { ...globals . browser } ,
466449 parser : ts . parser ,
467450 parserOptions : {
468- ecmaVersion : 2022 ,
451+ ecmaVersion : 2023 ,
469452 sourceType : 'module' ,
470- ecmaFeatures : {
471- impliedStrict : true ,
472- } ,
453+ ecmaFeatures : { impliedStrict : true } ,
473454 projectService : true ,
474455 } ,
475456 } ,
476457 rules : {
458+ // 'lit/quoted-expressions': 'error',
459+ 'lit/lifecycle-super' : 'error' ,
460+ 'lit/no-legacy-imports' : 'error' ,
461+ 'lit/no-native-attributes' : 'error' ,
462+ 'lit/no-template-bind' : 'error' ,
463+ // 'lit/no-template-map': 'warn', // Want to enable this, but it's too noisy right now
464+ 'lit/no-this-assign-in-render' : 'error' ,
477465 '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
478466 '@typescript-eslint/no-restricted-imports' : [
479467 'error' ,
@@ -514,16 +502,12 @@ export default ts.config(
514502 name : 'tests:e2e' ,
515503 files : [ 'tests/**/*' ] ,
516504 languageOptions : {
517- globals : {
518- ...globals . node ,
519- } ,
505+ globals : { ...globals . node } ,
520506 parser : ts . parser ,
521507 parserOptions : {
522- ecmaVersion : 2022 ,
508+ ecmaVersion : 2023 ,
523509 sourceType : 'module' ,
524- ecmaFeatures : {
525- impliedStrict : true ,
526- } ,
510+ ecmaFeatures : { impliedStrict : true } ,
527511 projectService : true ,
528512 } ,
529513 } ,
0 commit comments