mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-28 07:50:47 +08:00
Add CI to check code format
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
committed by
Alexis Sellier
parent
aaabb99074
commit
2b5efedfbd
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
@@ -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
|
||||
Executable
+6
@@ -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 .
|
||||
Reference in New Issue
Block a user