Skip to content

Commit 5bdb383

Browse files
authored
Initial Release
1 parent 9bbcfae commit 5bdb383

File tree

15 files changed

+3720
-173
lines changed

15 files changed

+3720
-173
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: build-test-lint
2+
on: push
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: checkout repo
8+
uses: actions/checkout@v4
9+
- name: use node.js
10+
uses: actions/setup-node@v4
11+
with:
12+
node-version: '20.x'
13+
- run: npm install
14+
- run: npx tsc --build
15+
- run: npx tsc --build --clean
16+
- run: npx eslint

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
/node_modules/
1+
node_modules
2+
.yarn
3+
logs
4+
*.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
.DS_Store

README.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
# Getting started with queue-pruner
1+
This app checks the modqueue every five minutes. If there are any posts or comments in the queue for shadowbanned, suspended or deleted users, the post or comment will be removed if configured to do so.
22

3-
Your project has been created using a Devvit template.
3+
The app can be configured to remove posts or comments for deleted users or shadowbanned/suspended users - both options can be controlled independently.
44

5-
## Next up
5+
## Change History
66

7-
Next up is uploading and developing your app using playtest.
7+
### v1.0.0
88

9-
In the project directory, you can run:
9+
* Initial Release
1010

11-
### `devvit upload`
11+
## About this app
1212

13-
Upload the app to the App Directory. Uploaded apps are only visible to you (the app owner) and can only be installed to a small test subreddit with less than 200 subscribers.
14-
15-
### `devvit playtest <subreddit-name>`
16-
17-
Installs your app to your test subreddit and starts a playtest session where a new version is installed whenever you save changes to your app code, and logs are continuously streamed.
18-
19-
## Learn more
20-
21-
You can learn more in the [documentation](https://developers.reddit.com/docs/).
22-
23-
You can manage your apps in the [developer portal](https://developers.reddit.com/my/apps).
13+
Modqueue Pruner is open source. You can find the source [here](https://github.com/fsvreddit/queue-pruner).

eslint.config.mjs

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import eslint from "@eslint/js";
2+
import tseslint from "typescript-eslint";
3+
import stylistic from '@stylistic/eslint-plugin'
4+
import vitest from "@vitest/eslint-plugin"
5+
6+
export default tseslint.config(
7+
eslint.configs.recommended,
8+
...tseslint.configs.strictTypeChecked,
9+
...tseslint.configs.stylisticTypeChecked,
10+
stylistic.configs.customize({
11+
indent: 4,
12+
quotes: "double",
13+
semi: true,
14+
quoteProps: "consistent-as-needed",
15+
braceStyle: "1tbs",
16+
}),
17+
{
18+
files: ["**/*.test.ts"],
19+
plugins: {
20+
vitest
21+
},
22+
rules: {
23+
...vitest.configs.recommended.rules,
24+
'vitest/valid-title': 'warn',
25+
'vitest/no-commented-out-tests': 'warn'
26+
}
27+
},
28+
{
29+
files: ["**/*.ts", "**/*.tsx"],
30+
31+
languageOptions: {
32+
parserOptions: {
33+
project: "./tsconfig.json",
34+
tsconfigRootDir: import.meta.dirname,
35+
},
36+
},
37+
38+
rules: {
39+
// Extra rules
40+
"eqeqeq": ["error", "always", {
41+
null: "ignore",
42+
}],
43+
"no-self-compare": "error",
44+
"no-template-curly-in-string": "error",
45+
"no-useless-assignment": "error",
46+
"no-nested-ternary": "error",
47+
"no-return-assign": "error",
48+
"no-sequences": "error",
49+
"no-var": "error",
50+
"arrow-body-style": ["error", "as-needed"],
51+
"func-style": ["error", "declaration", {
52+
allowArrowFunctions: true,
53+
}],
54+
"curly": ["error", "all"],
55+
"object-shorthand": ["error", "always"],
56+
"operator-assignment": ["error", "always"],
57+
"camelcase": ["error", {
58+
properties: "always",
59+
}],
60+
61+
// Rules I don't want
62+
"@typescript-eslint/restrict-template-expressions": "off",
63+
64+
// Extra code styling rules
65+
"@stylistic/array-bracket-newline": ["error", "consistent"],
66+
"@stylistic/array-element-newline": ["error", "consistent"],
67+
"@/func-call-spacing": ["error", "never"],
68+
"@stylistic/function-paren-newline": ["error", "multiline"],
69+
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
70+
71+
"@stylistic/object-curly-newline": ["error", {
72+
multiline: true,
73+
consistent: true,
74+
}],
75+
76+
"@stylistic/object-property-newline": ["error", {
77+
allowAllPropertiesOnSameLine: true,
78+
}],
79+
80+
"@stylistic/operator-linebreak": ["off"],
81+
"@stylistic/semi-style": ["error", "last"],
82+
"@stylistic/space-before-function-paren": ["error", "always"],
83+
},
84+
},
85+
{
86+
ignores: ["**/node_modules", "**/dist", "eslint.config.mjs", "**/difflib"],
87+
},
88+
);

0 commit comments

Comments
 (0)