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
12 changes: 3 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,16 @@ jobs:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"

- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
with:
run_install: true
cache: true

- name: Audit dependencies
run: pnpm audit --prod --audit-level=high

- name: Run linters
run: pnpm run lint:all
run: node --run lint:all

- name: Run build
run: pnpm run build
run: node --run build
2 changes: 0 additions & 2 deletions .ncurc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
enginesNode: true
format: repo
reject:
- pnpm
- typescript
- eslint # https://github.com/neostandard/neostandard/issues/350
19 changes: 16 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export default [
ts: true,
noJsx: true,
semi: true,
env: ["browser", "greasemonkey"],
ignores: ["*.user.js", "**/types/GM_config.ts"]
env: ["browser", "greasemonkey"]
}),
{ ignores: ["*.user.js", "**/types/GM_config.ts"] },
{
files: ["*.user.js"],
plugins: { userscripts: { rules: userscripts.rules } },
Expand All @@ -17,9 +17,22 @@ export default [
},
{
rules: {
"@stylistic/arrow-parens": ["error", "always"],
"@stylistic/comma-dangle": ["error", "never"],
"@stylistic/operator-linebreak": ["error", "after"],
"@stylistic/member-delimiter-style": ["error", {
multiline: { delimiter: "none", requireLast: false },
multilineDetection: "brackets",
singleline: { delimiter: "comma" }
}],
"@stylistic/quotes": ["error", "double"],
"@stylistic/space-before-function-paren": ["error", "never"]
"@stylistic/space-before-function-paren": ["error", {
anonymous: "always",
asyncArrow: "always",
named: "never"
}],
"no-console": ["warn", { allow: ["error", "warn", "table", "info"] }],
"no-else-return": ["error", { allowElseIf: true }]
}
}
];
33 changes: 6 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Userscript that minimizes messages containing words from the list",
"author": "VChet",
"license": "MIT",
"packageManager": "pnpm@10.34.5",
"packageManager": "pnpm@11.22.0",
"type": "module",
"homepage": "https://github.com/VChet/telegram-ad-filter#readme",
"repository": {
Expand All @@ -24,34 +24,13 @@
"release": "commit-and-tag-version"
},
"devDependencies": {
"@types/node": "^26.1.1",
"@types/node": "^26.2.0",
"@types/tampermonkey": "^5.0.5",
"commit-and-tag-version": "^13.1.0",
"eslint": "^9.39.5",
"commit-and-tag-version": "^13.1.2",
"eslint": "^10.8.1",
"eslint-plugin-userscripts": "^0.5.6",
"neostandard": "^0.13.0",
"tsdown": "^0.22.13",
"neostandard": "0.14.0-next.1",
"tsdown": "^0.22.14",
"typescript": "^6.0.3"
},
"pnpm": {
"overrides": {
"array-includes": "npm:@nolyfill/array-includes@^1",
"array.prototype.findlast": "npm:@nolyfill/array.prototype.findlast@^1",
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@^1",
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@^1",
"array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@^1",
"es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@^1",
"hasown": "npm:@nolyfill/hasown@^1",
"is-core-module": "npm:@nolyfill/is-core-module@^1",
"isarray": "npm:@nolyfill/isarray@^1",
"object-keys": "npm:@nolyfill/object-keys@^1",
"object.assign": "npm:@nolyfill/object.assign@^1",
"object.entries": "npm:@nolyfill/object.entries@^1",
"object.fromentries": "npm:@nolyfill/object.fromentries@^1",
"object.values": "npm:@nolyfill/object.values@^1",
"safe-buffer": "npm:@nolyfill/safe-buffer@^1",
"string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@^1",
"string.prototype.repeat": "npm:@nolyfill/string.prototype.repeat@^1"
}
}
}
Loading