Skip to content

Commit 9d341b5

Browse files
authored
Merge pull request #293 from coliff/dev/coliff/dep-package-config-update
Tighten linters, update Node, and tweak JS
2 parents 54ebf61 + 397e0e5 commit 9d341b5

File tree

8 files changed

+27
-9
lines changed

8 files changed

+27
-9
lines changed

.eslintrc.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
{
22
"root": true,
33
"env": {
4+
"browser": true,
45
"es6": true,
56
"node": true
67
},
78
"extends": ["eslint:recommended"],
89
"ignorePatterns": ["*.min.*"],
910
"rules": {
10-
"no-undef": "off"
11+
"curly": "error",
12+
"dot-notation": "error",
13+
"eqeqeq": "error",
14+
"no-implicit-coercion": "error",
15+
"no-return-assign": "error",
16+
"no-shadow": "error",
17+
"no-unneeded-ternary": "error",
18+
"no-undef": "error",
19+
"no-var": "error",
20+
"prefer-const": "error",
21+
"radix": "error",
22+
"yoda": "error"
1123
}
1224
}

.github/workflows/super-linter.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
fetch-depth: 0
2828
persist-credentials: false
2929

30+
- name: Install Dependencies
31+
run: npm install
32+
3033
- name: Lint Code Base
3134
uses: super-linter/super-linter/slim@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
3235
env:
@@ -40,7 +43,6 @@ jobs:
4043
VALIDATE_BIOME_FORMAT: false
4144
VALIDATE_BIOME_LINT: false
4245
VALIDATE_CHECKOV: false
43-
VALIDATE_CSS: false
4446
VALIDATE_EDITORCONFIG: false
4547
VALIDATE_GIT_COMMITLINT: false
4648
VALIDATE_GITLEAKS: false

.htmlhintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"alt-require": true,
33
"attr-lowercase": true,
44
"attr-no-duplication": true,
5+
"attr-no-unnecessary-whitespace": true,
56
"attr-value-double-quotes": true,
7+
"attr-value-no-duplication": true,
68
"attr-whitespace": true,
79
"button-type-require": true,
810
"doctype-first": true,
@@ -11,7 +13,9 @@
1113
"frame-title-require": true,
1214
"h1-require": true,
1315
"html-lang-require": true,
16+
"id-class-ad-disabled": true,
1417
"id-unique": true,
18+
"input-requires-label": true,
1519
"link-rel-canonical-require": false,
1620
"main-require": true,
1721
"meta-charset-require": true,
@@ -21,6 +25,7 @@
2125
"src-not-empty": true,
2226
"tag-no-obsolete": true,
2327
"tag-pair": true,
28+
"tags-check": false,
2429
"tagname-lowercase": true,
2530
"title-require": true
2631
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v22.22.2

js/show-password-toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Licensed under MIT (https://github.com/coliff/bootstrap-show-password-toggle/blob/main/LICENSE)
55
*/
66

7-
var ShowPasswordToggle = document.querySelector("[type='password']");
7+
const ShowPasswordToggle = document.querySelector("[type='password']");
88
ShowPasswordToggle.onclick = function () {
99
document.querySelector("[type='password']").classList.add("input-password");
1010
document.getElementById("toggle-password").classList.remove("d-none");

js/show-password-toggle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
"css": "npm-run-all css-lint css-compile css-minify",
3535
"css-compile": "sass --style expanded --source-map --embed-sources scss:css",
3636
"css-lint": "stylelint \"scss/*.scss\" --fix -f verbose",
37-
"html-lint": "htmlhint \"tests/bootstrap5-sign-in/*.html\"",
37+
"html-lint": "htmlhint \"tests/**/*.html\"",
3838
"css-minify": "cleancss -O1 --format breakWith=lf --output css/show-password-toggle.min.css css/show-password-toggle.css",
3939
"js-lint": "eslint js/show-password-toggle.js --fix",
4040
"js-minify": "terser --ecma 5 --keep-classnames --keep-fnames --output js/show-password-toggle.min.js -- js/show-password-toggle.js",
41+
"lint": "npm-run-all css-lint js-lint html-lint",
4142
"pa11y": "npx pa11y https://coliff.github.io/bootstrap-show-password-toggle/tests/bootstrap5-sign-in/",
4243
"prettier": "npx prettier@3 --write \"**/*.{css,html,js,json,scss,yml}\"",
4344
"serve": "npx http-server -o /tests/bootstrap5-sign-in/ -p 8080 -c-1",
@@ -54,6 +55,6 @@
5455
"terser": "5.46.1"
5556
},
5657
"volta": {
57-
"node": "22.22.1"
58+
"node": "22.22.2"
5859
}
5960
}

tests/bootstrap5-sign-in/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
margin-top: 17%;
2323
}
2424
</style>
25-
<!-- Bootstrap 5 IE11 Polyfills -->
26-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-ie11@5/css/bootstrap-ie11.min.css" media="all and (-ms-high-contrast: active), (-ms-high-contrast: none)" />
2725
</head>
2826

2927
<body class="text-center bg-secondary-subtle h-100 mt-5">

0 commit comments

Comments
 (0)