Skip to content

Commit

Permalink
Merge branch 'main' into feature/initial-release-of-the-boilerplate#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Raffone17 committed Feb 22, 2022
2 parents 435ca89 + b222aad commit 718e314
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .github/linters/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"ignorePatterns": [
"**/*.json"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"airbnb"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"settings": {
"react": {
"version": "latest"
}
},
"rules": {
"indent": [
"error",
4
],
"import/no-unresolved": "off",
"@typescript-eslint/indent": [
"error",
4
],
"quotes": [
2,
"single",
{
"avoidEscape": true
}
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"max-len": [
2,
160,
4,
{
"ignoreUrls": true
}
],
"lines-between-class-members": "off",
"prefer-object-spread": "off",
"padded-blocks": "off",
"import/extensions": "off",
"import/prefer-default-export": "off",
"object-curly-newline": [
"error",
{
"ObjectExpression": {
"multiline": true,
"minProperties": 2
},
"ObjectPattern": {
"multiline": true
},
"ImportDeclaration": "never",
"ExportDeclaration": {
"multiline": true,
"minProperties": 3
}
}
],
"no-useless-constructor": "off",
"no-empty-function": [
"error",
{
"allow": [
"functions",
"constructors"
]
}
],
"class-methods-use-this": "off",
"no-underscore-dangle": [
"error",
{
"allow": [
"_id"
]
}
],
"no-param-reassign": [
"error",
{
"props": false
}
],
"@typescript-eslint/no-var-requires": "off"
}
}
66 changes: 66 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base

#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [master, main]
# Remove the line above to run when pushing to master
pull_request:
branches: [master, main]

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
##########################
# Install packages #
##########################
- name: Install Packages
run: npm ci
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Do not lint downloaded code - see https://github.com/github/super-linter
FILTER_REGEX_EXCLUDE: .*/download/.*
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_TYPESCRIPT_STANDARD: false
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
# EOF

0 comments on commit 718e314

Please sign in to comment.