Skip to content

Commit 2efedd7

Browse files
committed
fix configs, tests, add maintainability badge
1 parent a78f965 commit 2efedd7

File tree

10 files changed

+161
-38
lines changed

10 files changed

+161
-38
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.qlty/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*
2+
!configs
3+
!configs/**
4+
!hooks
5+
!hooks/**
6+
!qlty.toml
7+
!.gitignore

.qlty/configs/.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
rules:
2+
document-start: disable
3+
quoted-strings:
4+
required: only-when-needed
5+
extra-allowed: ["{|}"]
6+
key-duplicates: {}
7+
octal-values:
8+
forbid-implicit-octal: true

.qlty/qlty.toml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# This file was automatically generated by `qlty init`.
2+
# You can modify it to suit your needs.
3+
# We recommend you to commit this file to your repository.
4+
#
5+
# This configuration is used by both Qlty CLI and Qlty Cloud.
6+
#
7+
# Qlty CLI -- Code quality toolkit for developers
8+
# Qlty Cloud -- Fully automated Code Health Platform
9+
#
10+
# Try Qlty Cloud: https://qlty.sh
11+
#
12+
# For a guide to configuration, visit https://qlty.sh/d/config
13+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
14+
config_version = "0"
15+
16+
exclude_patterns = [
17+
"*_min.*",
18+
"*-min.*",
19+
"*.min.*",
20+
"**/.yarn/**",
21+
"**/*.d.ts",
22+
"**/assets/**",
23+
"**/bower_components/**",
24+
"**/build/**",
25+
"**/cache/**",
26+
"**/config/**",
27+
"**/db/**",
28+
"**/deps/**",
29+
"**/dist/**",
30+
"**/extern/**",
31+
"**/external/**",
32+
"**/generated/**",
33+
"**/Godeps/**",
34+
"**/gradlew/**",
35+
"**/mvnw/**",
36+
"**/node_modules/**",
37+
"**/protos/**",
38+
"**/seed/**",
39+
"**/target/**",
40+
"**/templates/**",
41+
"**/testdata/**",
42+
"**/vendor/**",
43+
"**/.github/workflows/**"
44+
]
45+
46+
test_patterns = [
47+
"**/test/**",
48+
"**/spec/**",
49+
"**/*.test.*",
50+
"**/*.spec.*",
51+
"**/*_test.*",
52+
"**/*_spec.*",
53+
"**/test_*.*",
54+
"**/spec_*.*",
55+
]
56+
57+
[smells]
58+
mode = "comment"
59+
60+
[[source]]
61+
name = "default"
62+
default = true
63+
64+
[languages]
65+
javascript = true
66+
67+
[[plugin]]
68+
name = "actionlint"
69+
70+
[[plugin]]
71+
name = "checkov"
72+
73+
[[plugin]]
74+
name = "eslint"
75+
version = "9.26.0"
76+
package_file = "package.json"
77+
package_filters = ["eslint"]
78+
79+
[[plugin]]
80+
name = "markdownlint"
81+
mode = "comment"
82+
config = { "MD013" = false }
83+
84+
[[plugin]]
85+
name = "osv-scanner"
86+
87+
[[plugin]]
88+
name = "prettier"
89+
90+
[[plugin]]
91+
name = "ripgrep"
92+
mode = "comment"
93+
94+
[[plugin]]
95+
name = "trivy"
96+
drivers = [
97+
"config",
98+
"fs-vuln",
99+
]
100+
101+
[[plugin]]
102+
name = "trufflehog"
103+
104+
[[plugin]]
105+
name = "yamllint"

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
### Hexlet tests and linter status:
1+
# Frontend Project 11
2+
3+
## Hexlet tests and linter status
4+
25
[![Actions Status](https://github.com/daria-z/frontend-project-11/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/daria-z/frontend-project-11/actions)
6+
7+
## Maintainability
8+
[![Maintainability](https://qlty.sh/badges/c844bad3-843c-45f0-818d-ce89db985001/maintainability.svg)](https://qlty.sh/gh/daria-z/projects/frontend-project-11)

eslint.config.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
import js from "@eslint/js";
2-
import globals from "globals";
32
import { defineConfig } from "eslint/config";
43

54
export default defineConfig([
6-
{ files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"] },
7-
{ files: ["**/*.{js,mjs,cjs}"], languageOptions: { globals: globals.browser } },
5+
{
6+
ignores: ["node_modules/**", "dist/**", "__fixtures__/**"],
7+
},
8+
{
9+
files: ["**/*.{js,mjs,cjs}"],
10+
plugins: { js },
11+
extends: ["js/recommended"],
12+
},
13+
{
14+
files: ["vite.config.js"],
15+
languageOptions: {
16+
sourceType: "module",
17+
globals: {
18+
__dirname: "readonly",
19+
},
20+
},
21+
},
822
]);

package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@hexlet/code",
3+
"type": "module",
34
"version": "1.0.0",
45
"scripts": {
56
"dev": "vite",
@@ -9,7 +10,6 @@
910
"devDependencies": {
1011
"@eslint/js": "^9.24.0",
1112
"eslint": "^9.24.0",
12-
"globals": "^16.0.0",
1313
"sass": "^1.87.0",
1414
"vite": "^6.3.5"
1515
},

src/index.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>Bootstrap w/ Vite</title>
7+
</head>
38

4-
<head>
5-
<meta charset="utf-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<title>Bootstrap w/ Vite</title>
8-
</head>
9-
10-
<body>
11-
<div class="container py-4 px-3 mx-auto">
12-
<h1>Hello, Bootstrap and Vite!</h1>
13-
<button class="btn btn-primary">Primary button</button>
14-
</div>
15-
<script type="module" src="./js/main.js"></script>
16-
</body>
17-
9+
<body>
10+
<div class="container py-4 px-3 mx-auto">
11+
<h1>Hello, Bootstrap and Vite!</h1>
12+
<button class="btn btn-primary">Primary button</button>
13+
</div>
14+
<script type="module" src="./js/main.js"></script>
15+
</body>
1816
</html>

vite.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
const path = require("path");
1+
import { defineConfig } from "vite";
2+
import path from "path";
23

3-
export default {
4+
export default defineConfig({
45
root: path.resolve(__dirname, "src"),
56
server: {
67
port: 8080,
78
hot: true,
89
},
9-
};
10+
});

0 commit comments

Comments
 (0)