Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] update to scss #2

Merged
merged 8 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:astro/recommended",
"plugin:astro/jsx-a11y-recommended",
],
overrides: [
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
},
{
files: [".jsx", ".tsx"],
extends: ["plugin:react/recommended"],
plugins: ["react"],
rules: {
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
},
},
],
settings: {
"import/resolver": {
typescript: {},
},
},
rules: {
"import/prefer-default-export": ["off"],
},
plugins: ["@typescript-eslint", "import"],
};
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
### What's new?
[//]: "Describe what's new in a few lines or bullet points. Feel free to add screenshots!"
[//]: # "Describe what's new in a few lines or bullet points. Feel free to add screenshots!"
78 changes: 44 additions & 34 deletions .github/workflows/compiler.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
---
name: Compiler
name: Lint

#############################
# Start the job on push #
# Start the job on push #
#############################
on:
push:
branches-ignore: [main]
pull_request:
branches: [main]
push:
branches-ignore: [main]
pull_request:
branches: [main]

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Run TypeScript compiler
# Set the agent to run on
runs-on: ubuntu-latest
build:
# Name the Job
name: Run ESLint, Prettier, and TypeScript compiler
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
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
################################
# Check for TypeScript errors #
################################
- name: Run TypeScript compiler (tsc)
run: npx tsc --noEmit
################################
# Install packages #
################################
- name: Install packages
run: npm ci
################################
# Lint codebase #
################################
- name: Run ESLint
run: npx eslint .
################################
# Check Prettier on codebase #
################################
- name: Run Prettier
run: npx prettier --check .
################################
# Check for TypeScript errors #
################################
- name: Run TypeScript compiler (tsc)
run: npx tsc --noEmit
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.github/
.vscode/

README.md

.eslintrc.cjs
.prettierrc.cjs
astro.config.mjs

package-lock.json
package.json
tsconfig.json
9 changes: 9 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
arrowParens: "avoid",
bracketSameLine: false,
bracketSpacing: true,
printWidth: 80,
semi: true,
singleQuote: true,
trailingComma: "all",
};
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.tabSize": 2,
"editor.formatOnSave": true
}
7 changes: 3 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { defineConfig } from 'astro/config';
import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";

import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), react()]
});
integrations: [react()],
});
Loading