Skip to content

Commit

Permalink
Upgrade ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJaredWilcurt authored Sep 29, 2024
1 parent fe5e220 commit 686a7e2
Show file tree
Hide file tree
Showing 18 changed files with 4,005 additions and 100 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

27 changes: 11 additions & 16 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build Passing
name: Node.js CI

on:
push:
branches: [ main ]
branches: [ "main" ]
pull_request:
branches: [ main ]
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run validate
- uses: actions/checkout@v4.1.7
- uses: volta-cli/action@v4.1.1
- run: node -v
- run: npm -v
- run: npm ci
- run: npm run lint
- run: npm run sasslint
- run: npm run test
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,4 @@ typings/
.env

dist/
package-lock.json

Start dev.lnk
Start dev.lnk
56 changes: 46 additions & 10 deletions _components/base-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,53 @@
class="card"
>
<div class="card-header">
<a v-if="tool.url" :href="tool.url" target="_blank" rel="noopener noreferrer">{{ tool.title }}</a>
<a
v-if="tool.url"
:href="tool.url"
target="_blank"
rel="noopener noreferrer"
>{{ tool.title }}</a>
<span v-else>{{ tool.title }}</span>
<span class="expand" @click="$emit('expandcard', tool)">
<span
class="expand"
@click="$emit('expandcard', tool)"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
role="img"
aria-label="Expand this card, hiding the rest. Updates URL for linking to this tool."
>
<path d="M16 0H9.5L12 2.5l-3 3L10.5 7l3-3L16 6.5zM16 16V9.5L13.5 12l-3-3L9 10.5l3 3L9.5 16zM0 16h6.5L4 13.5l3-3L5.5 9l-3 3L0 9.5zM0 0v6.5L2.5 4l3 3L7 5.5l-3-3L6.5 0z"/>
<path
d="M16 0H9.5L12 2.5l-3 3L10.5 7l3-3L16 6.5zM16 16V9.5L13.5 12l-3-3L9 10.5l3 3L9.5 16zM0 16h6.5L4 13.5l3-3L5.5 9l-3 3L0 9.5zM0 0v6.5L2.5 4l3 3L7 5.5l-3-3L6.5 0z"
/>
</svg>
</span>
<span class="shrink" @click="$emit('shrinkcard')">
<span
class="shrink"
@click="$emit('shrinkcard')"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
role="img"
aria-label="Shrink the size of the card and show other tools. Updates URL to no longer be just for this tool."
>
<path d="M9 7h6.5L13 4.5l3-3L14.5 0l-3 3L9 .5zM9 9v6.5l2.5-2.5 3 3 1.5-1.5-3-3L15.5 9zM7 9H.5L3 11.5l-3 3L1.5 16l3-3L7 15.5zM7 7V.5L4.5 3l-3-3L0 1.5l3 3L.5 7z"/>
<path
d="M9 7h6.5L13 4.5l3-3L14.5 0l-3 3L9 .5zM9 9v6.5l2.5-2.5 3 3 1.5-1.5-3-3L15.5 9zM7 9H.5L3 11.5l-3 3L1.5 16l3-3L7 15.5zM7 7V.5L4.5 3l-3-3L0 1.5l3 3L.5 7z"
/>
</svg>
</span>
</div>

<div class="card-body">
<a
v-if="tool.logo && tool.url"
:href="tool.url" target="_blank" rel="noopener noreferrer"
:href="tool.url"
target="_blank"
rel="noopener noreferrer"
><img
:src="'_imgs/logos/' + tool.logo"
:alt="tool.title + ' logo'"
Expand Down Expand Up @@ -112,7 +129,12 @@
:key="'framework' + frameworkIndex"
>
{{ framework.framework }} -
<a v-if="framework.url" :href="framework.url" target="_blank" rel="noopener noreferrer">{{ framework.title }}</a>
<a
v-if="framework.url"
:href="framework.url"
target="_blank"
rel="noopener noreferrer"
>{{ framework.title }}</a>
<span v-else>{{ framework.title }}</span>
</li>
</ul>
Expand All @@ -127,7 +149,12 @@
:key="'subTool' + subToolIndex"
>
{{ subTool.type }} -
<a v-if="subTool.url" :href="subTool.url" target="_blank" rel="noopener noreferrer">{{ subTool.title }}</a>
<a
v-if="subTool.url"
:href="subTool.url"
target="_blank"
rel="noopener noreferrer"
>{{ subTool.title }}</a>
<span v-else>{{ subTool.title }}</span>
</li>
</ul>
Expand All @@ -142,7 +169,12 @@
:key="'tutorial' + tutorialIndex"
>
<strong>{{ tutorial.site }}</strong> -
<a v-if="tutorial.url" :href="tutorial.url" target="_blank" rel="noopener noreferrer">{{ tutorial.title }}</a>
<a
v-if="tutorial.url"
:href="tutorial.url"
target="_blank"
rel="noopener noreferrer"
>{{ tutorial.title }}</a>
<span v-else>{{ tutorial.title }}</span>
{{ ' ' }}
<em v-if="tutorial.author">by {{ tutorial.author }}</em>
Expand All @@ -156,7 +188,11 @@

<script>
export default {
name: 'base-card',
name: 'BaseCard',
emits: [
'expandcard',
'shrinkcard'
],
props: {
tool: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion _components/github-corner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

<script>
export default {
name: 'github-corner'
name: 'GithubCorner'
};
</script>
12 changes: 5 additions & 7 deletions _components/minus.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<template>
<span
v-if="index === tool[name].length - 1"
@click="remove(name)"
class="minus"
@click="$emit('remove', name)"
>-</span>
</template>

<script>
export default {
name: 'minus',
name: 'MinusButton',
emits: [
'remove'
],
props: {
name: {
type: String,
Expand All @@ -22,11 +25,6 @@ export default {
type: Object,
required: true
}
},
methods: {
remove: function (section) {
this.tool[section].pop();
}
}
};
</script>
2 changes: 1 addition & 1 deletion _components/news-alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script>
export default {
name: 'news-alerts',
name: 'NewsAlerts',
data: function () {
return {
currentStory: 0,
Expand Down
2 changes: 1 addition & 1 deletion _components/site-logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

<script>
export default {
name: 'site-logo'
name: 'SiteLogo'
};
</script>
2 changes: 1 addition & 1 deletion _components/unreviewed-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<script>
export default {
name: 'unreviewed-card',
name: 'UnreviewedCard',
data: function () {
return {
tools: [
Expand Down
4 changes: 3 additions & 1 deletion _scripts/admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-unused-vars
const admin = Vue.createApp({
components: {
'site-logo': httpVueLoader('_components/site-logo.vue'),
Expand Down Expand Up @@ -128,6 +127,9 @@ const admin = Vue.createApp({
});

return itemsArray.join(', ');
},
minusByToolName: function (name) {
this.tool[name].pop();
}
},
filters: {
Expand Down
8 changes: 5 additions & 3 deletions _scripts/beautify-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function beautifyJSON (val) {

function getOwnEnumPropSymbols (object) {
return Object.getOwnPropertySymbols(object).filter(function (keySymbol) {
return object.propertyIsEnumerable(keySymbol);
return Object.prototype.propertyIsEnumerable.call(object, keySymbol);
});
}

Expand All @@ -34,13 +34,15 @@ function beautifyJSON (val) {
return '"[Circular]"';
}

if (val === null ||
if (
val === null ||
val === undefined ||
typeof val === 'number' ||
typeof val === 'boolean' ||
typeof val === 'function' ||
typeof val === 'symbol' ||
isRegexp(val)) {
isRegexp(val)
) {
return String(val);
}

Expand Down
11 changes: 3 additions & 8 deletions _scripts/helpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line no-unused-vars
let helpers = {
window.helpers = {
parseToolsData: function (responseData) {
let data = [];
let networkError = false;
Expand Down Expand Up @@ -157,7 +156,7 @@ let helpers = {
if (params.languages) {
try {
params.languages = JSON.parse(decodeURI(params.languages));
} catch (err) {
} catch {
console.log('Could not parse language filters: ' + params.languages);
}
if (!Array.isArray(params.languages)) {
Expand All @@ -168,7 +167,7 @@ let helpers = {
if (params.platforms) {
try {
params.platforms = JSON.parse(decodeURI(params.platforms));
} catch (err) {
} catch {
console.log('Could not parse platfrom filters: ' + params.platforms);
}
if (!Array.isArray(params.platforms)) {
Expand All @@ -184,10 +183,6 @@ let helpers = {
}
};

if (typeof(module) !== 'undefined') {
module.exports = helpers;
}

window.httpVueLoader = function (componentPath) {
const sfcLoaderOptions = {
moduleCache: {
Expand Down
Loading

0 comments on commit 686a7e2

Please sign in to comment.