Added linting (#10)

This commit is contained in:
Alejandro Angulo 2021-10-02 11:30:13 -07:00 committed by GitHub
parent c1cfadafcd
commit 797fb83258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 2105 additions and 118 deletions

View file

@ -28,6 +28,36 @@ jobs:
- public - public
- config - config
- themes - themes
lint:
docker:
- image: cimg/python:3.9
steps:
- checkout
- run:
name: Install pre-commit
command: pip install pre-commit
- run:
name: Setup pre-commit cache key
command: |
cp .pre-commit-config.yaml pre-commit-cache-key.txt
# Intentionally supplying --version twice to get verbose version information
python --version --version >> pre-commit-cache-key.txt
- restore_cache:
keys:
- v1-pre-commit-cache-{{ checksum "pre-commit-cache-key.txt" }}
- run:
name: Run pre-commit hooks
command: pre-commit run --from-ref main --to-ref HEAD
- save_cache:
key: v1-pre-commit-cache-{{ checksum "pre-commit-cache-key.txt" }}
paths:
- ~/.cache/pre-commit
deploy: deploy:
docker: docker:
@ -59,10 +89,13 @@ workflows:
jobs: jobs:
- test - test
- lint
- deploy: - deploy:
context: aws-context context: aws-context
requires: requires:
- test - test
- lint
filters: filters:
branches: branches:
only: only:

7
.eslintrc.yml Normal file
View file

@ -0,0 +1,7 @@
env:
browser: true
es2021: true
extends: "eslint:recommended"
parserOptions:
ecmaVersion: 12
rules: {}

8
.gitignore vendored
View file

@ -4,3 +4,11 @@
# Deployment config # Deployment config
config/production/deployment.toml config/production/deployment.toml
# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

23
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,23 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
exclude: |
(?x)^(
.*\.cjs
)$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.32.0
hooks:
- id: eslint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
hooks:
- id: prettier

1
.prettierrc.json Normal file
View file

@ -0,0 +1 @@
{}

631
.yarn/releases/yarn-3.0.2.cjs vendored Executable file

File diff suppressed because one or more lines are too long

1
.yarnrc.yml Normal file
View file

@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-3.0.2.cjs

8
package.json Normal file
View file

@ -0,0 +1,8 @@
{
"name": "alejandr0angul0.dev",
"packageManager": "yarn@3.0.2",
"devDependencies": {
"eslint": "^7.32.0",
"prettier": "^2.4.1"
}
}

View file

@ -1,82 +1,330 @@
/* Background */ .chroma { color: #f8f8f2; background-color: #282a36 } /* Background */
/* Other */ .chroma .x { } .chroma {
/* Error */ .chroma .err { } color: #f8f8f2;
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } background-color: #282a36;
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } /* Other */
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } .chroma .x {
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } }
/* Keyword */ .chroma .k { color: #ff79c6 } /* Error */
/* KeywordConstant */ .chroma .kc { color: #ff79c6 } .chroma .err {
/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic } }
/* KeywordNamespace */ .chroma .kn { color: #ff79c6 } /* LineTableTD */
/* KeywordPseudo */ .chroma .kp { color: #ff79c6 } .chroma .lntd {
/* KeywordReserved */ .chroma .kr { color: #ff79c6 } vertical-align: top;
/* KeywordType */ .chroma .kt { color: #8be9fd } padding: 0;
/* Name */ .chroma .n { } margin: 0;
/* NameAttribute */ .chroma .na { color: #50fa7b } border: 0;
/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic } }
/* NameBuiltinPseudo */ .chroma .bp { } /* LineTable */
/* NameClass */ .chroma .nc { color: #50fa7b } .chroma .lntable {
/* NameConstant */ .chroma .no { } border-spacing: 0;
/* NameDecorator */ .chroma .nd { } padding: 0;
/* NameEntity */ .chroma .ni { } margin: 0;
/* NameException */ .chroma .ne { } border: 0;
/* NameFunction */ .chroma .nf { color: #50fa7b } width: auto;
/* NameFunctionMagic */ .chroma .fm { } overflow: auto;
/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic } display: block;
/* NameNamespace */ .chroma .nn { } }
/* NameOther */ .chroma .nx { } /* LineHighlight */
/* NameProperty */ .chroma .py { } .chroma .hl {
/* NameTag */ .chroma .nt { color: #ff79c6 } display: block;
/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic } width: 100%;
/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic } background-color: #ffffcc;
/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic } }
/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic } /* LineNumbersTable */
/* NameVariableMagic */ .chroma .vm { } .chroma .lnt {
/* Literal */ .chroma .l { } margin-right: 0.4em;
/* LiteralDate */ .chroma .ld { } padding: 0 0.4em 0 0.4em;
/* LiteralString */ .chroma .s { color: #f1fa8c } color: #7f7f7f;
/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c } }
/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c } /* LineNumbers */
/* LiteralStringChar */ .chroma .sc { color: #f1fa8c } .chroma .ln {
/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c } margin-right: 0.4em;
/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c } padding: 0 0.4em 0 0.4em;
/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c } color: #7f7f7f;
/* LiteralStringEscape */ .chroma .se { color: #f1fa8c } }
/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c } /* Keyword */
/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c } .chroma .k {
/* LiteralStringOther */ .chroma .sx { color: #f1fa8c } color: #ff79c6;
/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c } }
/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c } /* KeywordConstant */
/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c } .chroma .kc {
/* LiteralNumber */ .chroma .m { color: #bd93f9 } color: #ff79c6;
/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 } }
/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 } /* KeywordDeclaration */
/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 } .chroma .kd {
/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 } color: #8be9fd;
/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 } font-style: italic;
/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 } }
/* Operator */ .chroma .o { color: #ff79c6 } /* KeywordNamespace */
/* OperatorWord */ .chroma .ow { color: #ff79c6 } .chroma .kn {
/* Punctuation */ .chroma .p { } color: #ff79c6;
/* Comment */ .chroma .c { color: #6272a4 } }
/* CommentHashbang */ .chroma .ch { color: #6272a4 } /* KeywordPseudo */
/* CommentMultiline */ .chroma .cm { color: #6272a4 } .chroma .kp {
/* CommentSingle */ .chroma .c1 { color: #6272a4 } color: #ff79c6;
/* CommentSpecial */ .chroma .cs { color: #6272a4 } }
/* CommentPreproc */ .chroma .cp { color: #ff79c6 } /* KeywordReserved */
/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 } .chroma .kr {
/* Generic */ .chroma .g { } color: #ff79c6;
/* GenericDeleted */ .chroma .gd { color: #ff5555 } }
/* GenericEmph */ .chroma .ge { text-decoration: underline } /* KeywordType */
/* GenericError */ .chroma .gr { } .chroma .kt {
/* GenericHeading */ .chroma .gh { font-weight: bold } color: #8be9fd;
/* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold } }
/* GenericOutput */ .chroma .go { color: #44475a } /* Name */
/* GenericPrompt */ .chroma .gp { } .chroma .n {
/* GenericStrong */ .chroma .gs { } }
/* GenericSubheading */ .chroma .gu { font-weight: bold } /* NameAttribute */
/* GenericTraceback */ .chroma .gt { } .chroma .na {
/* GenericUnderline */ .chroma .gl { text-decoration: underline } color: #50fa7b;
/* TextWhitespace */ .chroma .w { } }
/* NameBuiltin */
.chroma .nb {
color: #8be9fd;
font-style: italic;
}
/* NameBuiltinPseudo */
.chroma .bp {
}
/* NameClass */
.chroma .nc {
color: #50fa7b;
}
/* NameConstant */
.chroma .no {
}
/* NameDecorator */
.chroma .nd {
}
/* NameEntity */
.chroma .ni {
}
/* NameException */
.chroma .ne {
}
/* NameFunction */
.chroma .nf {
color: #50fa7b;
}
/* NameFunctionMagic */
.chroma .fm {
}
/* NameLabel */
.chroma .nl {
color: #8be9fd;
font-style: italic;
}
/* NameNamespace */
.chroma .nn {
}
/* NameOther */
.chroma .nx {
}
/* NameProperty */
.chroma .py {
}
/* NameTag */
.chroma .nt {
color: #ff79c6;
}
/* NameVariable */
.chroma .nv {
color: #8be9fd;
font-style: italic;
}
/* NameVariableClass */
.chroma .vc {
color: #8be9fd;
font-style: italic;
}
/* NameVariableGlobal */
.chroma .vg {
color: #8be9fd;
font-style: italic;
}
/* NameVariableInstance */
.chroma .vi {
color: #8be9fd;
font-style: italic;
}
/* NameVariableMagic */
.chroma .vm {
}
/* Literal */
.chroma .l {
}
/* LiteralDate */
.chroma .ld {
}
/* LiteralString */
.chroma .s {
color: #f1fa8c;
}
/* LiteralStringAffix */
.chroma .sa {
color: #f1fa8c;
}
/* LiteralStringBacktick */
.chroma .sb {
color: #f1fa8c;
}
/* LiteralStringChar */
.chroma .sc {
color: #f1fa8c;
}
/* LiteralStringDelimiter */
.chroma .dl {
color: #f1fa8c;
}
/* LiteralStringDoc */
.chroma .sd {
color: #f1fa8c;
}
/* LiteralStringDouble */
.chroma .s2 {
color: #f1fa8c;
}
/* LiteralStringEscape */
.chroma .se {
color: #f1fa8c;
}
/* LiteralStringHeredoc */
.chroma .sh {
color: #f1fa8c;
}
/* LiteralStringInterpol */
.chroma .si {
color: #f1fa8c;
}
/* LiteralStringOther */
.chroma .sx {
color: #f1fa8c;
}
/* LiteralStringRegex */
.chroma .sr {
color: #f1fa8c;
}
/* LiteralStringSingle */
.chroma .s1 {
color: #f1fa8c;
}
/* LiteralStringSymbol */
.chroma .ss {
color: #f1fa8c;
}
/* LiteralNumber */
.chroma .m {
color: #bd93f9;
}
/* LiteralNumberBin */
.chroma .mb {
color: #bd93f9;
}
/* LiteralNumberFloat */
.chroma .mf {
color: #bd93f9;
}
/* LiteralNumberHex */
.chroma .mh {
color: #bd93f9;
}
/* LiteralNumberInteger */
.chroma .mi {
color: #bd93f9;
}
/* LiteralNumberIntegerLong */
.chroma .il {
color: #bd93f9;
}
/* LiteralNumberOct */
.chroma .mo {
color: #bd93f9;
}
/* Operator */
.chroma .o {
color: #ff79c6;
}
/* OperatorWord */
.chroma .ow {
color: #ff79c6;
}
/* Punctuation */
.chroma .p {
}
/* Comment */
.chroma .c {
color: #6272a4;
}
/* CommentHashbang */
.chroma .ch {
color: #6272a4;
}
/* CommentMultiline */
.chroma .cm {
color: #6272a4;
}
/* CommentSingle */
.chroma .c1 {
color: #6272a4;
}
/* CommentSpecial */
.chroma .cs {
color: #6272a4;
}
/* CommentPreproc */
.chroma .cp {
color: #ff79c6;
}
/* CommentPreprocFile */
.chroma .cpf {
color: #ff79c6;
}
/* Generic */
.chroma .g {
}
/* GenericDeleted */
.chroma .gd {
color: #ff5555;
}
/* GenericEmph */
.chroma .ge {
text-decoration: underline;
}
/* GenericError */
.chroma .gr {
}
/* GenericHeading */
.chroma .gh {
font-weight: bold;
}
/* GenericInserted */
.chroma .gi {
color: #50fa7b;
font-weight: bold;
}
/* GenericOutput */
.chroma .go {
color: #44475a;
}
/* GenericPrompt */
.chroma .gp {
}
/* GenericStrong */
.chroma .gs {
}
/* GenericSubheading */
.chroma .gu {
font-weight: bold;
}
/* GenericTraceback */
.chroma .gt {
}
/* GenericUnderline */
.chroma .gl {
text-decoration: underline;
}
/* TextWhitespace */
.chroma .w {
}

1027
yarn.lock Normal file

File diff suppressed because it is too large Load diff