Skip to content

Commit 4a36127

Browse files
authored
Merge pull request #10 from Johnsoct/linting-updates
Linting and Formatting Updates (ESLint, Stylelint, Prettier) update
2 parents d6d4f6e + 2455a91 commit 4a36127

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3251
-5270
lines changed

.stylelintrc.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cache": true,
33
"defaultSeverity": "warning",
44
"extends": [
5+
"stylelint-config-html",
56
"stylelint-config-standard"
67
],
78
"fix": true,
@@ -11,11 +12,14 @@
1112
"comment-whitespace-inside": "always",
1213
"custom-property-empty-line-before": "never",
1314
"declaration-block-no-redundant-longhand-properties": false,
15+
"declaration-block-no-shorthand-property-overrides": true,
1416
"declaration-empty-line-before": "never",
1517
"declaration-property-unit-allowed-list": {
1618
"font-size": [
1719
"px",
18-
"rem"
20+
"rem",
21+
"vh",
22+
"vw"
1923
]
2024
},
2125
"font-family-name-quotes": "always-unless-keyword",
@@ -42,7 +46,6 @@
4246
"overrides": [
4347
{
4448
"files": [
45-
"*.scss",
4649
"**/*.scss"
4750
],
4851
"extends": [

cypress.config.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { defineConfig } from "cypress";
22

33
export default defineConfig({
4-
component: {
5-
devServer: {
6-
bundler: "vite",
7-
framework: "vue",
4+
component: {
5+
devServer: {
6+
bundler: "vite",
7+
framework: "vue",
8+
},
89
},
9-
},
1010

11-
e2e: {
12-
baseUrl: "http://localhost:4173",
13-
specPattern: "cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}",
14-
},
11+
e2e: {
12+
baseUrl: "http://localhost:4173",
13+
specPattern: "cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}",
14+
},
1515
});

cypress.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Packages
22
import {
3-
type CyMountOptions,
43
mount,
54
} from 'cypress/vue';
65
import {

cypress/fixtures/example.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Using fixtures to represent data",
3-
"email": "[email protected]",
4-
"body": "Fixtures are a great way to mock data for responses to routes"
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
55
}

cypress/support/commands/select.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
const enterValueForSelectInput = (id: string, text: string) => {
2-
cy
3-
.get(id)
4-
.find('.vs__search')
5-
.clear()
6-
.type(text)
7-
.type('{enter}')
8-
.trigger('input');
2+
cy
3+
.get(id)
4+
.find('.vs__search')
5+
.clear()
6+
.type(text)
7+
.type('{enter}')
8+
.trigger('input');
99
};
1010

1111
Cypress.Commands.add('enterValueForSelectInput', enterValueForSelectInput);
1212

1313
const selectFirstElementInVSelect = (id: string) => {
14-
cy
15-
.get(id)
16-
.click();
14+
cy
15+
.get(id)
16+
.click();
1717

18-
cy
19-
.get('li.vs__dropdown-option')
20-
.first()
21-
.click();
18+
cy
19+
.get('li.vs__dropdown-option')
20+
.first()
21+
.click();
2222
};
2323

2424
Cypress.Commands.add('selectFirstElementInVSelect', selectFirstElementInVSelect);

cypress/support/commands/vue.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
// Packages
2-
import { mount } from 'cypress/vue';
32
import { type VueWrapper } from '@vue/test-utils';
3+
import { mount } from 'cypress/vue';
44
// Plugins
55
import { ToastrPlugin } from '@src/utils/plugins/toastr';
66

77
Cypress.Commands.add('getMounted', () => {
8-
return cy
9-
.get<VueWrapper<unknown>>('@vue')
10-
.then(($wrapper) => {
11-
cy.wrap($wrapper);
12-
});
8+
return cy
9+
.get<VueWrapper<unknown>>('@vue')
10+
.then(($wrapper) => {
11+
cy.wrap($wrapper);
12+
});
1313
});
1414

1515
Cypress.Commands.add('mount', (component, options = {}) => {
16-
const defaultOptions = {
17-
global: {
18-
plugins: [
19-
ToastrPlugin,
20-
],
21-
stubs: {
22-
transition: false,
23-
'transition-group': false,
24-
},
25-
},
26-
};
16+
const defaultOptions = {
17+
global: {
18+
plugins: [
19+
ToastrPlugin,
20+
],
21+
stubs: {
22+
transition: false,
23+
'transition-group': false,
24+
},
25+
},
26+
};
2727

28-
const mountOptions = { ...defaultOptions, ...options };
28+
const mountOptions = { ...defaultOptions, ...options };
2929

30-
return mount(component, mountOptions).then(({ wrapper }) => {
31-
cy
32-
.wrap(wrapper)
33-
.as('vue');
34-
});
30+
return mount(component, mountOptions).then(({ wrapper }) => {
31+
cy
32+
.wrap(wrapper)
33+
.as('vue');
34+
});
3535
});
Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
<!-- eslint-disable @html-eslint/require-meta-description -->
12
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<title>Components App</title>
8-
</head>
9-
<body>
10-
<div data-cy-root></div>
11-
</body>
12-
</html>
3+
<html lang="en-US">
4+
<head>
5+
<meta charset="utf-8">
6+
<meta
7+
content="IE=edge"
8+
http-equiv="X-UA-Compatible"
9+
>
10+
<meta
11+
content="width=device-width,initial-scale=1.0"
12+
name="viewport"
13+
>
14+
<title>Components App</title>
15+
</head>
16+
<body>
17+
<!-- eslint-disable-next-line @html-eslint/require-attrs -->
18+
<div data-cy-root></div>
19+
</body>
20+
</html>

cypress/support/component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// ***********************************************************
1515

1616
import '@src/styles/base/_index.scss';
17-
1817
// Import commands.js using ES2015 syntax:
1918
import './commands/vue';
2019
import './commands/select';

0 commit comments

Comments
 (0)