Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
[*.{html,md,js,css,sql}]
indent_size = 2

2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

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

This file was deleted.

19 changes: 0 additions & 19 deletions .gitattributes

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
fetch-depth: 0

- name: Install dependencies
run: yarn install
run: npm install

- name: Lint
run: |
yarn run lint
npm run lint

- name: Validate
run: |
yarn run validate
npm run validate
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
fetch-depth: 0

- name: Install dependencies
run: yarn install
run: npm install

- name: Validate
run: |
yarn run validate
npm run validate

- name: Run WebPageTest with unit tests
id: unit-test
env:
WPT_SERVER: "webpagetest.httparchive.org"
WPT_API_KEY: ${{ secrets.HA_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: yarn run test
run: npm run test

- name: Run WebPageTest for more websites
id: wpt-test
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ jobs:
fetch-depth: 2

- name: Install dependencies
run: yarn install
run: npm install

- name: Lint and validate
run: |
yarn run lint
yarn run validate
npm run lint
npm run validate

- name: Get changed technology files
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "Force update requested, processing all technology files"
echo "TECH_FILES_CHANGED=1" >> $GITHUB_ENV
files_changed=1
else
git fetch origin main --depth=2
files_changed=$(git diff --name-only HEAD^ ${{ github.sha }} -- 'src/technologies/*.json' 'src/categories.json' 'src/groups.json' | wc -l)
echo "TECH_FILES_CHANGED=$files_changed" >> $GITHUB_ENV
echo "Detected $files_changed changed technology files"
fi
echo "TECH_FILES_CHANGED=$files_changed" >> $GITHUB_ENV

- name: Upload technology rules to BigQuery
if: env.TECH_FILES_CHANGED != '0'
env:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
run: yarn run tech_upload
run: npm run tech_upload

- name: Get changed icons
run: |
Expand All @@ -54,9 +54,9 @@ jobs:
else
git fetch origin main --depth=2
changed_icons=$(git diff --name-only HEAD^ ${{ github.sha }} -- 'src/images/icons/*.svg' 'src/images/icons/*.png' -print0 | xargs -0)
echo "Detected changed icons: $files_changed"
fi
echo "CHANGED_ICONS=$changed_icons" >> $GITHUB_ENV
echo ${changed_icons}

# PNG are generally smaller, and we have some SVG that are 1Mb, so conversion to PNG is necessary.
- name: Installing Image Conversion Package
Expand All @@ -82,5 +82,4 @@ jobs:

- name: Sync new PNGs to Cloud Storage
if: env.CHANGED_ICONS != ''
run: |
gcloud storage rsync src/images/icons/ gs://httparchive/static/icons/ --exclude=".*.svg$" --cache-control="public, max-age=31536000, immutable"
run: gcloud storage rsync src/images/icons/ gs://httparchive/static/icons/ --exclude=".*.svg$" --cache-control="public, max-age=31536000, immutable"
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
/build/*
/src/images/icons/converted/*
node_modules
package-lock.json
Thumbs.db
Desktop.ini
*.DS_Store
*.log
._*
.idea
/nbproject/private/
src/out.json

keys.json
.env
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To get started, see the [README](https://github.com/HTTPArchive/wappalyzer/blob/

## Submitting changes

- First, run `yarn run validate` to identify any issues.
- First, run `npm run validate` to identify any issues.
- Use descriptive commit messages, e.g. 'Add WordPress detection'.
- Push your commits to a new branch on your own fork.
- Finally, submit a [pull request](https://help.github.com/articles/about-pull-requests/) and describe your changes.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
```sh
git clone https://github.com/HTTPArchive/wappalyzer.git
cd wappalyzer
yarn install
npm install
```

## Usage
Expand Down
21 changes: 21 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import prettierPlugin from 'eslint-plugin-prettier';
import { defineConfig, globalIgnores } from 'eslint/config';
import eslintPluginJsonc from 'eslint-plugin-jsonc';

export default defineConfig([
{
files: ['**/*.{js,mjs}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: {
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': 'error', // enables Prettier
},
},
globalIgnores(['node_modules']),
...eslintPluginJsonc.configs['flat/recommended-with-jsonc'],
]);
Loading