Skip to content

Commit 7a2abec

Browse files
authored
Merge pull request #76 from AegisJSProject/dependabot/npm_and_yarn/eslint-9.10.0
Bump eslint from 8.57.0 to 9.10.0
2 parents 853ae19 + d7e22f2 commit 7a2abec

File tree

13 files changed

+626
-1787
lines changed

13 files changed

+626
-1787
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/nodejs.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,15 @@ on:
1010
- master
1111
- release/*
1212
jobs:
13-
npm-test:
14-
name: NPM Install and Test
13+
build:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
with:
20-
lfs: true
21-
submodules: true
22-
- name: Setup Node
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version-file: '.nvmrc'
26-
cache: npm
27-
- name: Get npm cache directory
28-
id: npm-cache-dir
29-
shell: bash
30-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
31-
- name: Restore cache
32-
uses: actions/cache@v4
33-
# use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
34-
id: npm-cache
35-
with:
36-
path: ${{ steps.npm-cache-dir.outputs.dir }}
37-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
38-
restore-keys: ${{ runner.os }}-node-
39-
- name: Install dependencies
40-
run: npm ci --ignore-scripts --no-audit --no-fund
41-
- name: Run npm test
42-
run: npm test --if-present
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
# `cache: npm` seems to require a `package-lock.json` file
21+
# cache: npm
22+
- run: npm i
23+
- run: npm run build --if-present
24+
- run: npm test

.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@v7.1.0
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
58-
# VALIDATE_XML: true
59-
VALIDATE_MD: 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
6090
# VALIDATE_HTML: true
91+
VALIDATE_CSS: true
92+
# VALIDATE_JAVASCRIPT_ES: true
93+
# VALIDATE_JAVASCRIPT_STANDARD: true
94+
# VALIDATE_JSON: true
95+
# VALIDATE_XML: 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:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.3.1
1+
20.9.0

CHANGELOG.md

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

@@ -6,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
67

78
## [Unreleased]
89

10+
## [v0.1.3] - 2024-09-19
11+
12+
### Added
13+
- Add `String.dedent` where supported/polyfilled
14+
15+
### Changed
16+
- Update dependencies
17+
- Update eslint & config
18+
919
## [v0.1.2] - 2024-03-12
1020

1121
### Added

README.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -80,83 +80,83 @@ import xml from 'highlight.js/languages/xml.min.js';
8080
registerLanguages({ javascript, css, xml });
8181

8282
document.head.append(
83-
createStyleSheet('github', { media: '(prefers-color-scheme: light)' }),
84-
createStyleSheet('github-dark', { media: '(prefers-color-scheme: dark)' }),
83+
createStyleSheet('github', { media: '(prefers-color-scheme: light)' }),
84+
createStyleSheet('github-dark', { media: '(prefers-color-scheme: dark)' }),
8585
);
8686

8787
document.getElementById('header').append(md`
88-
# Hello, World!
88+
# Hello, World!
8989
90-
## It is currently ${new Date()}.
90+
## It is currently ${new Date()}.
9191
`);
9292

9393
customElements.define('md-preview', class HTMLMDPreviewElement extends HTMLElement {
94-
#shadow;
95-
96-
constructor() {
97-
super();
98-
99-
this.#shadow = this.attachShadow({ mode: 'closed' });
100-
const container = document.createElement('div');
101-
container.id = 'container';
102-
container.part.add('container');
103-
104-
this.#shadow.append(
105-
createStyleSheet('github', { media: '(prefers-color-scheme: light)' }),
106-
createStyleSheet('github-dark', { media: '(prefers-color-scheme: dark)' }),
107-
container,
108-
);
109-
}
110-
111-
async attributeChangedCallback(name, oldVal, newVal) {
112-
switch(name) {
113-
case 'src':
114-
if (typeof newVal === 'string') {
115-
this.#shadow.getElementById('container').replaceChildren(await getMarkdown(this.src));
116-
} else {
117-
this.#shadow.getElementById('container').replaceChildren();
118-
}
119-
break;
120-
121-
default:
122-
throw new Error(`Unhandled attribute change: ${name}.`);
123-
}
124-
}
125-
126-
set content(val) {
127-
if (typeof val === 'string' && val.length !== 0) {
128-
this.#shadow.getElementById('container').replaceChildren(md`${val}`);
129-
this.scrollIntoView({ behavior: 'smooth', block: 'start' });
130-
} else {
131-
this.#shadow.getElementById('container').replaceChildren();
132-
}
133-
}
134-
135-
get src() {
136-
return this.getAttribute('src');
137-
}
138-
139-
set src(val) {
140-
if (typeof val === 'string' || val instanceof URL) {
141-
this.setAttribute('src', val);
142-
} else {
143-
this.removeAttribute('src');
144-
}
145-
}
146-
147-
clear() {
148-
this.content = null;
149-
}
150-
151-
static get observedAttributes() {
152-
return ['src'];
153-
}
94+
#shadow;
95+
96+
constructor() {
97+
super();
98+
99+
this.#shadow = this.attachShadow({ mode: 'closed' });
100+
const container = document.createElement('div');
101+
container.id = 'container';
102+
container.part.add('container');
103+
104+
this.#shadow.append(
105+
createStyleSheet('github', { media: '(prefers-color-scheme: light)' }),
106+
createStyleSheet('github-dark', { media: '(prefers-color-scheme: dark)' }),
107+
container,
108+
);
109+
}
110+
111+
async attributeChangedCallback(name, oldVal, newVal) {
112+
switch(name) {
113+
case 'src':
114+
if (typeof newVal === 'string') {
115+
this.#shadow.getElementById('container').replaceChildren(await getMarkdown(this.src));
116+
} else {
117+
this.#shadow.getElementById('container').replaceChildren();
118+
}
119+
break;
120+
121+
default:
122+
throw new Error(`Unhandled attribute change: ${name}.`);
123+
}
124+
}
125+
126+
set content(val) {
127+
if (typeof val === 'string' && val.length !== 0) {
128+
this.#shadow.getElementById('container').replaceChildren(md`${val}`);
129+
this.scrollIntoView({ behavior: 'smooth', block: 'start' });
130+
} else {
131+
this.#shadow.getElementById('container').replaceChildren();
132+
}
133+
}
134+
135+
get src() {
136+
return this.getAttribute('src');
137+
}
138+
139+
set src(val) {
140+
if (typeof val === 'string' || val instanceof URL) {
141+
this.setAttribute('src', val);
142+
} else {
143+
this.removeAttribute('src');
144+
}
145+
}
146+
147+
clear() {
148+
this.content = null;
149+
}
150+
151+
static get observedAttributes() {
152+
return ['src'];
153+
}
154154
});
155155

156156
document.forms.test.addEventListener('submit', event => {
157-
event.preventDefault();
158-
const data = new FormData(event.target);
159-
document.getElementById('preview').content = data.get('md');
157+
event.preventDefault();
158+
const data = new FormData(event.target);
159+
document.getElementById('preview').content = data.get('md');
160160
});
161161

162162
document.forms.test.addEventListener('reset', () => document.getElementById('preview').clear());

eslint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { ignoreFile } from '@shgysk8zer0/eslint-config/ignoreFile.js';
2+
import browser from '@shgysk8zer0/eslint-config/browser.js';
3+
4+
export default [ignoreFile, browser()];

0 commit comments

Comments
 (0)