Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEBDEV-7255: Update Dependencies #2

Merged
merged 4 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 15.x
node-version: latest

- name: Install dependencies
run: yarn install && npm install -g codecov

- name: Run tests
run: yarn run test

- name: Upload code coverage
run: codecov
- name: Upload Codecov reports
uses: codecov/codecov-action@main
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
3 changes: 2 additions & 1 deletion demo/app-root.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { html, css, LitElement, customElement } from 'lit-element';
import { html, css, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';

@customElement('app-root')
export class AppRoot extends LitElement {
Expand Down
53 changes: 53 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import html from 'eslint-plugin-html';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends('plugin:@typescript-eslint/recommended'),
{
plugins: {
'@typescript-eslint': typescriptEslint,
html,
},

languageOptions: {
parser: tsParser,
},

settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src', 'demo'],
},
},
},

rules: {
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
},
},
{
ignores: ['**/*.js', '**/*.mjs', '**/*.d.ts'],
},
{
files: ['**/*.test.ts'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
},
},
];
42 changes: 20 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,31 @@
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
"build": "tsc",
"prepare": "tsc",
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
"lint": "eslint . && prettier \"**/*.ts\" --check",
"format": "eslint . --fix && prettier \"**/*.ts\" --write",
"circular": "madge --circular --extensions ts .",
"test": "tsc && yarn run lint && yarn run circular && wtr --coverage",
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
},
"dependencies": {
},
"devDependencies": {
"@open-wc/eslint-config": "^4.2.0",
"@open-wc/testing": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"@web/dev-server": "^0.1.1",
"@web/test-runner": "^0.11.5",
"concurrently": "^5.3.0",
"eslint": "^7.21.0",
"eslint-config-prettier": "^6.11.0",
"husky": "^1.0.0",
"lit-element": "^2.2.1",
"lit-html": "^1.1.2",
"lint-staged": "^10.0.0",
"madge": "^4.0.1",
"prettier": "^2.0.4",
"sinon": "^9.2.4",
"tslib": "^2.0.3",
"typescript": "^4.2.3"
"@open-wc/eslint-config": "^12.0.3",
"@open-wc/testing": "^4.0.0",
"@types/mocha": "^10.0.10",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"@web/dev-server": "^0.4.6",
"@web/test-runner": "^0.19.0",
"concurrently": "^9.1.2",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"lit": "^3.2.1",
"madge": "^8.0.0",
"prettier": "^3.4.2",
"sinon": "^19.0.2",
"tslib": "^2.8.1",
"typescript": "^5.7.3"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
Expand Down
1 change: 0 additions & 1 deletion test/result.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ describe('Result', () => {
});

it('can be initialized with an error', async () => {
// eslint-disable-next-line no-shadow
enum FooErrorType {
networkError,
decodingError,
Expand Down
Loading