Skip to content

Commit

Permalink
Merge pull request #43 from fsegurai/development
Browse files Browse the repository at this point in the history
Eslint migration from 8.57.0 to v9.13.0
  • Loading branch information
fsegurai authored Oct 25, 2024
2 parents 749c4ed + 7497c4b commit 620ff64
Show file tree
Hide file tree
Showing 22 changed files with 730 additions and 1,299 deletions.
129 changes: 0 additions & 129 deletions .eslintrc.json

This file was deleted.

25 changes: 16 additions & 9 deletions .github/workflows/npm-publish-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
node-version: ${{ vars.NODE_VERSION }}
cache: 'yarn'

- name: Create cache directories
run: mkdir -p ~/.cache/yarn && mkdir -p ${{ github.workspace }}/.yarn

- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -64,9 +61,6 @@ jobs:
node-version: ${{ vars.NODE_VERSION }}
cache: 'yarn'

- name: Create cache directories
run: mkdir -p ~/.cache/yarn && mkdir -p ${{ github.workspace }}/.yarn

- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
Expand All @@ -87,7 +81,7 @@ jobs:
run: yarn type-check:lib

Release:
needs: [Build, Test]
needs: [ Build, Test ]
if: |
github.ref == 'refs/heads/main' &&
github.event.repository.fork == false
Expand All @@ -112,12 +106,25 @@ jobs:
name: build-artifacts
path: ${{ vars.DEMO_PATH }}

- name: Get package version
id: get_version
run: echo "::set-output name=VERSION::$(jq -r .version < ./dist/lib/package.json)"

- name: Determine tag
id: determine_tag
run: |
if [[ "${{ steps.get_version.outputs.VERSION }}" == *"-beta"* ]]; then
echo "::set-output name=TAG::beta"
else
echo "::set-output name=TAG::latest"
fi
- name: Release to NPM registry 🚀
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd ./dist/lib
npm publish --access public || echo "Package already published in NPM, skipping..."
npm publish --tag ${{ steps.determine_tag.outputs.TAG }} --access public || echo "Package already published in NPM, skipping..."
- name: Set up Node.js ${{ vars.NODE_VERSION }} for GitHub NPM registry
uses: actions/setup-node@v4
Expand All @@ -133,4 +140,4 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GH_TOKEN }}
run: |
cd ./dist/lib
npm publish && npx semantic-release || echo "Package already published in GitHub NPM, skipping..."
npm publish --tag ${{ steps.determine_tag.outputs.TAG }} && npx semantic-release || echo "Package already published in GitHub NPM, skipping..."
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Optionally, to automatically present some lines as output without providing the
To add [Emoji-Toolkit](https://github.com/joypixels/emoji-toolkit) library to your `package.json` use the following command.

```bash
npm install emoji-toolkit@^8.0.0 --save
npm install emoji-toolkit@^9.0.1 --save
```

To activate [Emoji-Toolkit](https://github.com/joypixels/emoji-toolkit) for emoji suppport you will need to include...
Expand Down Expand Up @@ -259,7 +259,7 @@ Using `markdown` component and/or directive, you will be able to use the `emoji`
To add [KaTeX](https://katex.org/) library to your `package.json` use the following command.

```bash
npm install katex@^0.16.10 --save
npm install katex@^0.16.11 --save
```

To activate [KaTeX](https://katex.org/) math rendering you will need to include...
Expand Down Expand Up @@ -323,7 +323,7 @@ public options: KatexOptions = {
To add [Mermaid](https://mermaid-js.github.io/) library to your `package.json` use the following command.

```bash
npm install mermaid@^10.9.1 --save
npm install mermaid@^11.3.0 --save
```

To activate [Mermaid](https://mermaid-js.github.io/) diagramming and charting tool you will need to include...
Expand Down
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"eslintConfig": "demo/.eslintrc.json",
"eslintConfig": "demo/eslint.config.js",
"lintFilePatterns": [
"demo/**/*.ts",
"demo/**/*.html"
Expand Down Expand Up @@ -156,7 +156,7 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"eslintConfig": "lib/.eslintrc.json",
"eslintConfig": "lib/eslint.config.js",
"lintFilePatterns": [
"lib/**/*.ts",
"lib/**/*.html"
Expand Down
55 changes: 0 additions & 55 deletions demo/.eslintrc.json

This file was deleted.

49 changes: 49 additions & 0 deletions demo/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const tseslint = require("typescript-eslint");
const rootConfig = require("../eslint.config.js");

module.exports = tseslint.config(
...rootConfig,
{
files: ["*.ts"],
languageOptions: {
parserOptions: {
project: "./tsconfig.app.json",
createDefaultProgram: true,
},
},
rules: {
"@angular-eslint/directive-selector": [
"error",
{
type: "attribute",
prefix: "app",
style: "camelCase",
},
],
"@angular-eslint/component-selector": [
"error",
{
type: "element",
prefix: "app",
style: "kebab-case",
},
],
"@angular-eslint/no-output-native": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-var-requires": "off",
"comma-dangle": [
"error",
"always-multiline"
],
"import/order": "error",
"object-shorthand": "off"
},
},
{
files: ["**/*.html"],
rules: {},
}
);
8 changes: 4 additions & 4 deletions demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ <h1>&#64;fsegurai/ngx-markdown</h1>
<span fxFlex></span>
<button (click)="toggleTheme()" mat-icon-button>
<mat-icon>
<img [hidden]="theme === 'light'" src="icon-light-on.svg">
<img [hidden]="theme === 'dark'" src="icon-light-off.svg">
<img [hidden]="theme === 'light'" src="icon-light-on.svg" alt="Light theme">
<img [hidden]="theme === 'dark'" src="icon-light-off.svg" alt="Dark theme">
</mat-icon>
</button>
<a href="https://github.com/fsegurai/ngx-markdown" mat-icon-button>
<img class="github-icon" src="icon-github.svg">
<img class="github-icon" src="icon-github.svg" alt="GitHub">
</a>
</mat-toolbar-row>
</mat-toolbar>
Expand All @@ -21,7 +21,7 @@ <h1>&#64;fsegurai/ngx-markdown</h1>
mat-tab-link
routerLinkActive>
<div fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="8px">
<img src="icon-{{route.path}}.svg">
<img src="icon-{{route.path}}.svg" alt="{{ route.data?.['label'] }}">
<span>{{ route.data?.['label'] }}</span>
</div>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<button (click)="onScrollUp()" *ngIf="showScrollUpButton" [@zoomAnimation] class="scrollup-button--fixed"
color="accent"
fxHide.gt-sm mat-fab>
<img src="icon-chevron-up.svg">
<img src="icon-chevron-up.svg" alt="Scroll to top">
</button>
</div>
<div class="sticky" fxFlex="1 0 180px" fxFlexAlign="flex-start" fxHide.lt-md fxLayout="column">
<app-scrollspy-nav [headings]="headings"></app-scrollspy-nav>
<button (click)="onScrollUp()" *ngIf="showScrollUpButton" [@zoomAnimation] class="scrollup-button" color="accent"
mat-mini-fab>
<img src="icon-chevron-up.svg">
<img src="icon-chevron-up.svg" alt="Scroll to top">
</button>
</div>
</div>
Loading

0 comments on commit 620ff64

Please sign in to comment.