Skip to content

Commit

Permalink
no yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed May 9, 2024
1 parent 802653d commit ff07f83
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 2,876 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ module.exports = {
browser: true,
node: true,
},
parser: '@babel/eslint-parser',
parserOptions: {
parser: 'babel-eslint',
requireConfigFile: false,
},
extends: [
'@nuxtjs',
'prettier',
'prettier/vue',
'plugin:prettier/recommended',
'plugin:nuxt/recommended',
'plugin:json/recommended',
],
plugins: ['prettier'],
rules: {
'array-callback-return': 'off',
},
}
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"semi": false,
"arrowParens": "always",
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5"
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

- [Git](https://git-scm.com)
- [Node.js](https://nodejs.org) version 14 or higher
- [Yarn](https://yarnpkg.com)

## Quick start

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"dependencies": {
"@prantlf/jsonlint": "^14.0.3",
"adm-zip": "^0.4.16",
"convert-svg-to-png": "^0.5.0"
"adm-zip": "^0.5.12",
"convert-svg-to-png": "^0.6.4"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^3.1.0",
"@nuxtjs/eslint-module": "^2.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.13.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-json": "^2.1.2",
"eslint-plugin-nuxt": "^1.0.0",
"eslint-plugin-prettier": "^3.1.4",
"@nuxtjs/eslint-config": "^12.0.0",
"@nuxtjs/eslint-module": "^4.1.0",
"@babel/eslint-parser": "^7.24.5",
"eslint": "^8.23.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-nuxt": "^4.0.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"prettier": "^2.1.2",
"prettier": "^3.2.5",
"terminal-overwrite": "^2.0.1",
"webpagetest": "github:HTTPArchive/WebPageTest.api-nodejs"
},
"scripts": {
"lint": "eslint src/**/*.{js,json} && jsonlint -jsV ./schema.json --trim-trailing-commas --enforce-double-quotes ./src/technologies/ && jsonlint -js --trim-trailing-commas --enforce-double-quotes ./src/categories.json",
"lint:fix": "eslint --fix src/**/*.{js,json} && jsonlint -isV ./schema.json --trim-trailing-commas --enforce-double-quotes ./src/technologies/ && jsonlint -is --trim-trailing-commas --enforce-double-quotes ./src/categories.json",
"validate": "yarn run lint && node ./bin/validate.js",
"validate": "npm run lint && node ./bin/validate.js",
"test": "jest",
"convert": "node --no-warnings ./bin/convert.js",
"prettify": "jsonlint -si --trim-trailing-commas --enforce-double-quotes ./src/categories.json ./src/technologies/*.json",
"build": "yarn run validate && yarn run prettify && yarn run convert && node ./bin/build.js"
"build": "npm run validate && npm run prettify && npm run convert && node ./bin/build.js"
},
"jest": {
"reporters": [
Expand Down
12 changes: 5 additions & 7 deletions src/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ async function getDom(technologies) {
}

if (text) {
// eslint-disable-next-line unicorn/prefer-text-content
const value = (node.innerText ? node.innerText.trim() : '').slice(
0,
1000000
Expand Down Expand Up @@ -245,7 +244,7 @@ const Content = {
)

// Text
// eslint-disable-next-line unicorn/prefer-text-content

const text = document.body.innerText.replace(/\s+/g, ' ').slice(0, 25000)

// CSS rules
Expand Down Expand Up @@ -332,7 +331,6 @@ const Content = {
.split('/')
.shift()}`,

// eslint-disable-next-line unicorn/prefer-text-content
`https://${ad.innerText.split('\n').pop()}`,
]),
]
Expand Down Expand Up @@ -402,10 +400,10 @@ const Content = {
args instanceof Error
? [args.toString()]
: args
? Array.isArray(args)
? args
: [args]
: [],
? Array.isArray(args)
? args
: [args]
: [],
},
(response) => {
chrome.runtime.lastError
Expand Down
8 changes: 4 additions & 4 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function getRequiredTechnologies(name, categoryId) {
return name
? Wappalyzer.requires.find(({ name: _name }) => _name === name).technologies
: categoryId
? Wappalyzer.categoryRequires.find(
({ categoryId: _categoryId }) => _categoryId === categoryId
).technologies
: undefined
? Wappalyzer.categoryRequires.find(
({ categoryId: _categoryId }) => _categoryId === categoryId
).technologies
: undefined
}

function isSimilarUrl(a, b) {
Expand Down
1 change: 0 additions & 1 deletion src/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-env browser */
/* globals chrome */

// eslint-disable-next-line no-unused-vars
const Utils = {
agent: 'chrome',

Expand Down
Loading

0 comments on commit ff07f83

Please sign in to comment.