Skip to content

Commit

Permalink
Merge pull request #192 from ator-dev/dev-modernise
Browse files Browse the repository at this point in the history
Use better dev practices and update packages
  • Loading branch information
ator-dev authored Oct 10, 2024
2 parents e556940 + 1d81cda commit 153a84d
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 1,538 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

34 changes: 0 additions & 34 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/promo/dist
/pack
/node_modules
/pnpm-lock.yaml
/manifest.json
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default [
...tseslint.config({
files: [ "**/*.ts", "**/*.mts" ],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
],
}),
{
files: [ "**/*.ts", "**/*.mts" ],
plugins: {
tseslint: tseslint.plugin,
},
rules: {
"indent": [ "error", "tab" ],
"semi": [ "error", "always" ],
"linebreak-style": [ "error", "unix" ],
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-empty-function": "warn",
},
},
{
ignores: [ "dist/**/*" ],
},
];
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "mark-my-search",
"displayName": "Mark My Search",
"type": "module",
"scripts": {
"icons-convert": "bash -c 'mkdir -p icons/dist; SIZES=(16 32 48 64 96 128 240 300); for SIZE in ${SIZES[@]}; do inkscape icons/mms.svg -w $SIZE -h $SIZE -o icons/dist/mms-${SIZE}.png; done; SIZES=(32); for SIZE in ${SIZES[@]}; do inkscape icons/mms-off.svg -w $SIZE -h $SIZE -o icons/dist/mms-off-${SIZE}.png; done'",
"scripts-build": "tsc -p tsconfig.json",
"prepare-firefox": "ln --force --symbolic manifest/firefox.json manifest.json",
"prepare-chromium": "ln --force --symbolic manifest/chromium.json manifest.json",
"pack-firefox": "npm run prepare-firefox; mkdir --parents pack; rm --force pack/mark_my_search-firefox.zip; zip pack/mark_my_search-firefox.zip * -ri dist/**\\* icons/**\\* pages/**\\* lib/**\\* manifest.json",
"pack-chromium": "npm run prepare-chromium; mkdir --parents pack; rm --force pack/mark_my_search-chromium.zip; zip pack/mark_my_search-chromium.zip * -ri dist/**\\* icons/**\\* pages/**\\* lib/**\\* manifest.json"
"scripts-build": "rm --recursive dist; tsc --project tsconfig.json",
"prepare-firefox": "ln --force --symbolic platform/firefox/manifest.json manifest.json",
"prepare-chromium": "ln --force --symbolic platform/chromium/manifest.json manifest.json",
"pack-firefox": "rm --force pack/mark_my_search-firefox.zip; npm run scripts-build; npm run prepare-firefox; mkdir --parents pack; zip pack/mark_my_search-firefox.zip * -ri dist/**\\* icons/**\\* pages/**\\* lib/**\\* manifest.json",
"pack-chromium": "rm --force pack/mark_my_search-chromium.zip; npm run scripts-build; npm run prepare-chromium; mkdir --parents pack; zip pack/mark_my_search-chromium.zip * -ri dist/**\\* icons/**\\* pages/**\\* lib/**\\* manifest.json"
},
"repository": {
"type": "git",
Expand All @@ -24,14 +25,12 @@
},
"homepage": "https://github.com/searchmarkers/mark-my-search#readme",
"devDependencies": {
"@types/chrome": "^0.0.204",
"@types/firefox-webext-browser": "^94.0.1",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"eslint": "^8.30.0",
"inkscape": "^3.1.1",
"jq": "^1.7.2",
"typescript": "^4.9.4",
"winston": "^3.8.2"
"@types/chrome": "0.0.253",
"@types/firefox-webext-browser": "120.0.0",
"eslint": "9.12.0",
"globals": "^15.6.0",
"inkscape": "3.1.1",
"typescript": "5.6.3",
"typescript-eslint": "8.8.1"
}
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 153a84d

Please sign in to comment.