Skip to content

Commit

Permalink
Finish initial repo draft
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-claudia committed Sep 10, 2024
1 parent 5a97a70 commit ed8f3d0
Show file tree
Hide file tree
Showing 21 changed files with 1,568 additions and 1,142 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/deploy-gh-pages.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
on:
repository_dispatch:
types:
- deploy-npm
- deploy

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.workflow_ref }}
- uses: ./internal-deploy-npm
- uses: MithrilJS/infra/internal/deploy
with:
npm_token: ${{ secrets.NPM_TOKEN }}
github_pages_token: ${{ secrets.GITHUB_PAGES_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/remind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ jobs:
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v4
- uses: ./internal-remind
- uses: MithrilJS/infra/internal/remind
260 changes: 83 additions & 177 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import globals from "globals"
import js from "@eslint/js"
import n from "eslint-plugin-n"
import stylistic from "@stylistic/eslint-plugin"

export default [
js.configs.recommended,
n.configs["flat/recommended"],
{
name: "root config",
plugins: {
"@stylistic": stylistic,
"n": n,
},
languageOptions: {
ecmaVersion: 2022,
globals: {
Expand All @@ -14,222 +21,121 @@ export default [
},
rules: {
"accessor-pairs": "error",
"array-bracket-spacing": [
"@stylistic/array-bracket-spacing": [
"error",
"never"
],
"array-callback-return": "error",
"arrow-body-style": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"block-scoped-var": "off",
"block-spacing": "off",
"brace-style": "off",
"callback-return": "off",
"camelcase": [
"error",
{
"properties": "never"
}
],
"comma-dangle": [
"error",
"only-multiline"
],
"comma-spacing": "off",
"comma-style": [
"error",
"last"
],
"complexity": "off",
"computed-property-spacing": [
"error",
"never"
],
"consistent-return": "off",
"consistent-this": "off",
"curly": "off",
"default-case": "off",
"dot-location": [
"error",
"property"
],
"dot-notation": "off",
"eol-last": "off",
"eqeqeq": "off",
"func-names": "off",
"func-style": "off",
"generator-star-spacing": "error",
"global-require": "error",
"guard-for-in": "off",
"handle-callback-err": "error",
"id-blacklist": "error",
"id-length": "off",
"id-match": "error",
"indent": [
"warn",
4,
{
"outerIIFEBody": 0,
"SwitchCase": 1
}
],
"init-declarations": "off",
"jsx-quotes": "error",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": "off",
"lines-around-comment": "off",
"max-depth": "off",
"max-len": "off",
"max-nested-callbacks": "error",
"max-params": "off",
"max-statements": "off",
"max-statements-per-line": "off",
"new-parens": "off",
"newline-after-var": "off",
"newline-before-return": "off",
"newline-per-chained-call": "off",
"@stylistic/arrow-parens": "error",
"@stylistic/arrow-spacing": "error",
"@stylistic/block-spacing": ["error", "always"],
"@stylistic/brace-style": ["error", "1tbs"],
"@stylistic/comma-dangle": ["error", "only-multiline"],
"@stylistic/comma-spacing": ["error", {before: false, after: true}],
"@stylistic/comma-style": ["error", "last"],
"@stylistic/computed-property-spacing": ["error", "never"],
"curly": ["error", "multi-line", "consistent"],
"@stylistic/dot-location": ["error", "property"],
"dot-notation": "error",
"@stylistic/eol-last": "error",
"eqeqeq": ["error", "always", {null: "ignore"}],
"@stylistic/function-call-spacing": "error",
"@stylistic/generator-star-spacing": "error",
"n/handle-callback-err": "error",
"id-match": ["error", "^_?(?:[A-Za-z$][\\w$]*|[$A-Z][$A-Z0-9]*(?:_[$A-Z0-9]+)*)$", {properties: false}],
"@stylistic/indent": ["error", 4, {outerIIFEBody: 0, SwitchCase: 1}],
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
"@stylistic/key-spacing": "error",
"@stylistic/keyword-spacing": "error",
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/lines-around-comment": ["error", {
beforeBlockComment: true,
allowBlockStart: true,
allowBlockEnd: true,
allowObjectStart: true,
allowObjectEnd: true,
allowArrayStart: true,
allowArrayEnd: true,
allowClassStart: true,
allowClassEnd: true,
}],
"@stylistic/multiline-comment-style": ["error", "bare-block"],
"@stylistic/new-parens": "error",
"@stylistic/newline-per-chained-call": "error",
"no-alert": "error",
"no-array-constructor": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-catch-shadow": "off",
"no-cond-assign": "off",
"no-confusing-arrow": "error",
"no-console": "off",
"no-continue": "off",
"@stylistic/no-confusing-arrow": "error",
"no-div-regex": "error",
"no-duplicate-imports": "error",
"no-else-return": "off",
"no-empty-function": "off",
"no-eq-null": "off",
"no-eval": "error",
"no-extend-native": "off",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-extra-parens": "off",
"no-floating-decimal": "error",
"@stylistic/no-extra-semi": "error",
"@stylistic/no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-inline-comments": "off",
"no-invalid-this": "off",
"no-iterator": "error",
"no-label-var": "off",
"no-labels": "off",
"no-lone-blocks": "error",
"no-lonely-if": "off",
"no-loop-func": "off",
"no-magic-numbers": "off",
"no-mixed-requires": "error",
"no-multi-spaces": "error",
"n/no-mixed-requires": "error",
"@stylistic/no-multi-spaces": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": "error",
"@stylistic/no-multiple-empty-lines": "error",
"no-native-reassign": "error",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-new": "off",
"no-new-func": "off",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"n/no-new-require": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-path-concat": "off",
"no-plusplus": "off",
"no-process-env": "off",
"no-process-exit": "error",
"n/no-process-exit": "error",
"no-proto": "error",
"no-redeclare": "off",
"no-restricted-globals": "error",
"no-restricted-imports": "error",
"no-restricted-modules": "error",
"no-restricted-syntax": "error",
"no-return-assign": "off",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "off",
"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sync": "off",
"no-ternary": "off",
"no-throw-literal": "off",
"no-trailing-spaces": [
"no-redeclare": "error",
"no-restricted-syntax": [
"error",
{
"skipBlankLines": true
}
{selector: "ForInStatement", message: "Use `for (const key of Object.keys(object))` instead."}
],
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": "error",
"@stylistic/no-tabs": "error",
"no-throw-literal": "error",
"@stylistic/no-trailing-spaces": ["error", {skipBlankLines: true}],
"no-undef-init": "error",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "off",
"no-use-before-define": "off",
"no-useless-assignment": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-escape": "off",
"no-var": "off",
"no-void": "off",
"no-warning-comments": "off",
"no-whitespace-before-property": "error",
"no-with": "error",
"object-curly-spacing": [
"error",
"never"
],
"no-var": "error",
"@stylistic/no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "never"],
"object-shorthand": "off",
"one-var": "off",
"one-var": ["error", {initialized: "never"}],
"one-var-declaration-per-line": "off",
"operator-assignment": [
"error",
"always"
],
"operator-linebreak": "off",
"padded-blocks": "off",
"prefer-arrow-callback": "off",
"operator-assignment": ["error", "always"],
"@stylistic/operator-linebreak": "off",
"@stylistic/padded-blocks": ["error", "never"],
"prefer-const": "error",
"prefer-reflect": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": [
"error",
"double",
{"avoidEscape": true}
],
"radix": [
"error",
"always"
],
"require-jsdoc": "off",
"@stylistic/quotes": ["error", "double", {avoidEscape: true}],
"radix": ["error", "always"],
"require-yield": "error",
"semi": "off",
"semi-spacing": "off",
"@stylistic/semi": ["error", "never"],
"sort-imports": ["error", {allowSeparatedGroups: true}],
"sort-vars": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": [
"error",
"never"
],
"space-infix-ops": "off",
"space-unary-ops": "error",
"spaced-comment": "off",
"@stylistic/space-before-blocks": ["error", "always"],
"@stylistic/space-before-function-paren": ["error", "never"],
"@stylistic/space-in-parens": ["error", "never"],
"@stylistic/space-unary-ops": "error",
"strict": ["error", "global"],
"template-curly-spacing": "error",
"valid-jsdoc": "off",
"vars-on-top": "off",
"wrap-iife": "off",
"wrap-regex": "error",
"yield-star-spacing": "error",
"yoda": "off"
"@stylistic/template-curly-spacing": "error",
"@stylistic/wrap-regex": "error",
"@stylistic/yield-star-spacing": "error",
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ inputs:

runs:
using: node20
main: ../lib/entry/handle-deploy.js
main: ../../lib/entry/handle-deploy.js
9 changes: 9 additions & 0 deletions internal/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Do internal deployment

inputs:
github_pages_token:
required: true

runs:
using: node20
main: ../../lib/entry/handle-deploy.js
2 changes: 1 addition & 1 deletion internal-remind/action.yml → internal/remind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Generate internal reminder

runs:
using: node20
main: ../lib/entry/handle-remind.js
main: ../../lib/entry/handle-remind.js
Loading

0 comments on commit ed8f3d0

Please sign in to comment.