Skip to content

Commit

Permalink
chore: fix eslint errors, unset stylint rule selector-id-pattern, upd…
Browse files Browse the repository at this point in the history
…ate node version for CI, downgrade typescript version (for eslint compatibility)
  • Loading branch information
mattgoud committed Sep 27, 2024
1 parent 46d0ed1 commit 5af9481
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup node env
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
node: [20]

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Lint scss
run: npm ci && npm run scss-lint
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Lint js
run: touch ./webpack/.env && npm ci && npm run lint
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: Run unit tests
strategy:
matrix:
js: [ '16' ]
js: [ '20' ]
steps:
- name: Setup Node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Build and check types
run: touch ./webpack/.env && npm ci && npm run build
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
],
"customSyntax": "postcss-scss",
"rules": {
"selector-id-pattern": null,
"selector-max-id": null,
"selector-max-class": null,
"selector-max-type": null,
"selector-max-compound-selectors": null,
"selector-no-qualifying-type": null,
"selector-max-combinators": null,
"selector-class-pattern": null,
"selector-descendant-combinator-no-non-space": null,
"function-disallowed-list": null,
"scss/dollar-variable-default": null,
"property-disallowed-list": null
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"stylelint": "^14.16.1",
"stylelint-config-prestashop": "^1.0.7",
"ts-jest": "^29.2.5",
"typescript": "^5.6.2",
"typescript": "~5.5.4",
"webpack": "^5.95.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
Expand Down
1 change: 1 addition & 0 deletions src/js/components/usePasswordPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ const usePasswordPolicy = (selector: string): PasswordPolicyReturn => {
try {
return JSON.parse(content);
} catch (error) {
console.error(error);
return false;
}
})(hintElement.innerHTML);
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/useQuantityInput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const mockedResponse = (ok: boolean, hasError?: boolean, qty?: string): jest.Moc
return mockedFetch;
};

const debounceTimeout = async () => new Promise((fn) => setTimeout(fn, Quantify.delay));
const debounceTimeout = async () => new Promise((fn) => { setTimeout(fn, Quantify.delay); });

const getHTMLElement = <Type extends HTMLElement>(selector: string, parent?: Type): Type => {
const parentElement = parent ?? document;
Expand Down
1 change: 0 additions & 1 deletion src/js/responsive-toggler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import initEmitter from './prestashop';
import {
desktopElement, mobileElement, mobileElementId, contentValue, desktopElementId,
} from './constants/mocks/swapElements-data';
import ThemeType = Theme.ThemeType;

beforeAll(() => {
document.body.innerHTML = `
Expand Down

0 comments on commit 5af9481

Please sign in to comment.