Skip to content

Commit 27b0395

Browse files
authored
Merge pull request #10 from AegisJSProject/dependabot/npm_and_yarn/eslint-9.0.0
Bump eslint from 8.57.0 to 9.0.0
2 parents cf61d01 + e2a3fe1 commit 27b0395

14 files changed

+446
-437
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/super-linter.yml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,33 @@ on:
2323
branches:
2424
- master
2525
- release/*
26+
paths-ignore:
27+
- '**/*.js' # Disable since ESLint is used and v9 config is incompatible
28+
- '**/*.mjs'
29+
- '**/*.cjs'
30+
- '**/*.min.js'
2631

2732
###############
2833
# Set the Job #
2934
###############
3035
jobs:
3136
build:
37+
strategy:
38+
fail-fast: false
39+
# matrix:
40+
# language:
3241
# Name the Job
3342
name: Lint Code Base
3443
# Set the agent to run on
3544
runs-on: ubuntu-latest
3645

46+
permissions:
47+
contents: read
48+
packages: read
49+
# To report GitHub Actions status checks
50+
statuses: write
51+
52+
3753
##################
3854
# Load all steps #
3955
##################
@@ -43,36 +59,53 @@ jobs:
4359
##########################
4460
- name: Checkout Code
4561
uses: actions/checkout@v4
62+
with:
63+
# super-linter needs the full git history to get the
64+
# list of files that changed across commits
65+
fetch-depth: 0
4666

4767
################################
4868
# Run Linter against code base #
4969
################################
5070
- name: Lint Code Base
51-
uses: docker://github/super-linter:v4
71+
uses: super-linter/super-linter@v6.3.1
5272
env:
5373
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
VALIDATE_ALL_CODEBASE: true
55-
DEFAULT_BRANCH: master
56-
VALIDATE_YAML: true
57-
VALIDATE_JSON: true
74+
# DEFAULT_BRANCH: master
75+
# DEFAULT_WORKSPACE:
76+
# ANSIBLE_DIRECTORY:
77+
# ACTIONS_RUNNER_DEBUG: true
78+
VALIDATE_ALL_CODEBASE: false
79+
IGNORE_GENERATED_FILES: true
80+
IGNORE_GITIGNORED_FILES: true
81+
SUPPRESS_POSSUM: true
82+
LOG_LEVEL: ERROR
83+
LINTER_RULES_PATH: './'
84+
EDITORCONFIG_FILE_NAME: '.editorconfig'
85+
# JAVASCRIPT_ES_CONFIG_FILE: 'eslint.config.js'
86+
CSS_FILE_NAME: '.stylelintrc.json'
87+
88+
# Valate Languages - Uncomment to Enable
89+
# JS/TS/JSON Disabled until ESLint in super-linter is updated
90+
VALIDATE_HTML: true
91+
VALIDATE_CSS: true
92+
# VALIDATE_JAVASCRIPT_ES: true
93+
# VALIDATE_JAVASCRIPT_STANDARD: true
94+
# VALIDATE_JSON: true
5895
# VALIDATE_XML: true
59-
VALIDATE_MD: true
60-
# VALIDATE_HTML: true
96+
VALIDATE_MARKDOWN: true
97+
VALIDATE_YAML: true
98+
# VALIDATE_TYPESCRIPT_ES: true
99+
# VALIDATE_TYPESCRIPT_STANDARD: true
100+
# VALIDATE_JSX: true
101+
# VALIDATE_TSX: true
61102
# VALIDATE_BASH: true
62103
# VALIDATE_PERL: true
63104
# VALIDATE_PHP_BUILTIN: true
64105
# VALIDATE_PYTHON: true
65106
# VALIDATE_RUBY: true
66107
# VALIDATE_COFFEE: true
67108
# VALIDATE_ANSIBLE: true
68-
# VALIDATE_JAVASCRIPT_ES: true
69-
# VALIDATE_JAVASCRIPT_STANDARD: true
70-
# VALIDATE_TYPESCRIPT_ES: true
71-
# VALIDATE_TYPESCRIPT_STANDARD: true
72109
# VALIDATE_DOCKER: true
73110
# VALIDATE_GO: true
74111
# VALIDATE_TERRAFORM: true
75-
# VALIDATE_CSS: true
76-
# ANSIBLE_DIRECTORY:
77-
# ACTIONS_RUNNER_DEBUG: true
78-
# DEFAULT_WORKSPACE:

.htmlhint

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"tagname-lowercase": [
3+
"clipPath",
4+
"linearGradient"
5+
],
6+
"attr-lowercase": [
7+
"viewBox",
8+
"preserveAspectRatio",
9+
"linearGradient",
10+
"gradientTransform",
11+
"gradientUnits"
12+
],
13+
"attr-value-double-quotes": true,
14+
"attr-value-not-empty": false,
15+
"attr-no-duplication": true,
16+
"doctype-first": true,
17+
"tag-pair": true,
18+
"tag-self-close": true,
19+
"spec-char-escape": true,
20+
"id-unique": true,
21+
"src-not-empty": true,
22+
"title-require": false,
23+
"alt-require": true,
24+
"doctype-html5": true,
25+
"id-class-value": "dash",
26+
"style-disabled": true,
27+
"inline-style-disabled": true,
28+
"inline-script-disabled": true,
29+
"space-tab-mixed-disabled": "tab",
30+
"id-class-ad-disabled": false,
31+
"href-abs-or-rel": false,
32+
"attr-unsafe-chars": true,
33+
"head-script-disabled": false
34+
}

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ node_modules/
77
.gitattributes
88
.gitignore
99
.nvmrc
10+
.stylelintrc
11+
.stylelintignore
1012
importmap.json
1113
importmap.yaml
1214
*.config.js

.stylelintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/img/
2+
/js/
3+
/fonts/
4+
/_site/
5+
/node_modules/
6+
/css/core-css/
7+
/css/normalize.css/
8+
/css/animate.css/
9+
*.min*
10+
*.map

.stylelintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"rules": {
3+
"block-no-empty": null,
4+
"color-no-invalid-hex": true,
5+
"comment-empty-line-before": [ "always", {
6+
"ignore": ["stylelint-commands", "after-comment"]
7+
} ],
8+
"declaration-colon-space-after": "always",
9+
"indentation": ["tab", {
10+
"except": ["value"]
11+
}],
12+
"max-empty-lines": 2,
13+
"rule-empty-line-before": [ "always", {
14+
"except": ["first-nested"],
15+
"ignore": ["after-comment"]
16+
} ]
17+
}
18+
}

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1+
<!-- markdownlint-disable -->
12
# Changelog
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

8+
## [Unreleased]
9+
10+
## [v0.0.8] - 2024-04-09
11+
12+
### Changed
13+
- Update ESLint version & config
14+
- Update Super Linter version & config
15+
- Update to latest `@aegisjsproject/sanitizer`
16+
717
## [v0.0.7] - 2024-04-03
818

919
### Changed
10-
- Uppdate Sanitizer config
20+
- Update Sanitizer config
1121

1222
## [v0.0.6] - 2024-04-02
1323

eslint.config.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
4+
export default [
5+
// 'files': ['*.js', '**/*.js'],
6+
{
7+
'ignores': [
8+
'/node_modules/*',
9+
'/_site/*',
10+
'/img/*',
11+
'/css/*',
12+
'/fonts/*',
13+
'/js/std-js/*',
14+
'**/*.cjs',
15+
'./*.cjs',
16+
'./harden.cjs',
17+
'**/*.mjs',
18+
'./*.mjs',
19+
'**/*.min.js',
20+
'*.min.js',
21+
],
22+
}, {
23+
'rules': {
24+
...js.configs.recommended.rules,
25+
'indent': [2, 'tab', { 'SwitchCase': 1 }],
26+
'quotes': [2, 'single'],
27+
'semi': [2, 'always'],
28+
'no-console': 0,
29+
'no-async-promise-executor': 0,
30+
'no-prototype-builtins': 0,
31+
'no-unused-vars': 'error',
32+
},
33+
'languageOptions': {
34+
'ecmaVersion': 'latest',
35+
'sourceType': 'module',
36+
'globals': {
37+
'globalThis': 'readonly',
38+
'trustedTypes': 'readonly',
39+
// ...Object.fromEntries(Object.keys(globals.browser).map(key => [key, 'readonly'])),
40+
...globals.browser,
41+
}
42+
}
43+
}
44+
];

html.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import { stringify } from './utils.js';
33

44
export function createHTMLParser(config = sanitizer, { mapper = stringify } = {}) {
55
return (strings, ...values) => {
6-
const el = document.createElement('div');
76
const frag = document.createDocumentFragment();
8-
el.setHTML(String.raw(strings, ...values.map(mapper)).trim(), { sanitizer: config });
9-
frag.append(...el.childNodes);
7+
frag.setHTML(String.raw(strings, ...values.map(mapper)).trim(), config);
108
return frag;
119
};
1210
}
@@ -16,8 +14,5 @@ export const html = createHTMLParser(sanitizer, { mapper: stringify });
1614
export const el = (...args) => html.apply(null, args).firstElementChild;
1715

1816
export function doc(strings, ...values) {
19-
return Document.parseHTML(
20-
String.raw(strings, ...values.map(stringify)),
21-
{ sanitizer }
22-
);
17+
return Document.parseHTML(String.raw(strings, ...values.map(stringify)), sanitizer);
2318
}

index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)