From 83705dd880197c37803c87dba4adf2f5c3770ed7 Mon Sep 17 00:00:00 2001 From: Avior Date: Mon, 11 Oct 2021 15:18:10 +0200 Subject: [PATCH] Maintenance work Signed-off-by: Avior --- .editorconfig | 6 +++++- .github/workflows/node.js.yml | 2 +- codeshift/README.md | 5 ----- codeshift/index.ts => meta/codeshift.ts | 7 +++---- legals.ts => meta/legals.ts | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) delete mode 100644 codeshift/README.md rename codeshift/index.ts => meta/codeshift.ts (97%) rename legals.ts => meta/legals.ts (94%) diff --git a/.editorconfig b/.editorconfig index 84900a505..277ea28d5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,4 +5,8 @@ indent_style = tab indent_size = 4 charset = utf-8 trim_trailing_whitespace = true -insert_final_newline = true \ No newline at end of file +insert_final_newline = true + +[*.{yaml|yml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2cdde7e5f..1432e17e2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -9,7 +9,7 @@ on: - master paths: - 'data/**' - - 'legals.ts' + - 'meta/**' pull_request: jobs: diff --git a/codeshift/README.md b/codeshift/README.md deleted file mode 100644 index 659fc339a..000000000 --- a/codeshift/README.md +++ /dev/null @@ -1,5 +0,0 @@ -to use it launch - -``` -yarn jscodeshift -t ./codeshift/index.ts --extensions=ts --parser=ts ./data/Serie/Set --print --dry -``` diff --git a/codeshift/index.ts b/meta/codeshift.ts similarity index 97% rename from codeshift/index.ts rename to meta/codeshift.ts index e30560754..0515dca1b 100644 --- a/codeshift/index.ts +++ b/meta/codeshift.ts @@ -1,9 +1,5 @@ import { ArrayExpression, Identifier, JSCodeshift, Literal, ObjectExpression, Property, Transform } from "jscodeshift"; -/** - * This file is ran when there is mass changes being done - */ - interface ObjectField { type: 'Object' items: Record @@ -82,6 +78,9 @@ function set(j: JSCodeshift, path: ObjectExpression | ArrayExpression, value: Po } } +/** + * Start editing here ! + */ const transformer: Transform = (file, api) => { const j = api.jscodeshift diff --git a/legals.ts b/meta/legals.ts similarity index 94% rename from legals.ts rename to meta/legals.ts index 33b5b61dc..72cdad0c1 100644 --- a/legals.ts +++ b/meta/legals.ts @@ -1,4 +1,4 @@ -import { Filter } from './interfaces' +import { Filter } from '../interfaces' /** * File Explanation @@ -10,7 +10,7 @@ import { Filter } from './interfaces' * - 2021: https://www.pokemon.com/us/pokemon-news/2021-season-pokemon-tcg-format-rotation/ * - 2020: https://www.pokemon.com/us/pokemon-news/2020-season-pokemon-tcg-format-rotation/ * - * For banned cards we are currently following this webpage + * For banned cards we are also following this webpage * - https://www.pokemon.com/us/pokemon-tcg-banned-card-list/ */