Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add CI to check code format
Sebastian Martinez committed 4 years ago
commit 2b5efedfbd43192153e9f3875de0de7abfa0eb5e
parent aaabb99074fc45fea87071510527256ec156aba0
4 files changed +51 -0
added .eslintignore
@@ -0,0 +1 @@
+
node_modules

\ No newline at end of file
added .eslintrc.js
@@ -0,0 +1,32 @@
+
module.exports = {
+
  env: {
+
    browser: true,
+
    node: true,
+
  },
+
  extends: [
+
    "eslint:recommended",
+
    "plugin:@typescript-eslint/recommended"
+
  ],
+
  parser: "@typescript-eslint/parser",
+
  parserOptions: {
+
    ecmaVersion: 12,
+
    sourceType: "module",
+
  },
+
  plugins: [
+
    "svelte3",
+
    "@typescript-eslint"
+
  ],
+
  overrides: [
+
    {
+
      files: ["*.svelte"],
+
      processor: "svelte3/svelte3",
+
    }
+
  ],
+
  rules: {
+
    "@typescript-eslint/no-explicit-any": "off",
+
    indent: ["error", 2, { "SwitchCase": 1 }]
+
  },
+
  settings: {
+
    "svelte3/typescript": true, 
+
  },
+
};
added .github/workflows/check-format.yml
@@ -0,0 +1,12 @@
+
name: check-format
+
on: [push]
+

+
jobs:
+
  check-format:
+
    runs-on: ubuntu-latest
+
    steps:
+
      - uses: actions/checkout@v2
+
      - uses: actions/setup-node@v1
+
      - run: npm ci
+
      - run: ./scripts/check-format
+
        shell: bash
added scripts/check-format
@@ -0,0 +1,6 @@
+
#!/bin/sh
+

+
# Checks local /node_modules,
+
# if not found will download that package and execute it.
+
# Does not modify files, informs bad code format
+
npx eslint .