Skip to content

Commit

Permalink
[refactor] update to scss (#2)
Browse files Browse the repository at this point in the history
* refactor: switch to plain css

* refactor: uninstall tailwind, add default styles

* setup: add eslint configs, include eslint and prettier in github workflow

* add prettier ignore

* fix pull request template

* refactor: update to use scss

* fix: prettier issues

* fix: styling issues
  • Loading branch information
jinkang-0 authored Jan 4, 2024
1 parent 38d51cc commit b1d6a3d
Show file tree
Hide file tree
Showing 21 changed files with 10,284 additions and 7,737 deletions.
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"],
};
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

0 comments on commit b1d6a3d

Please sign in to comment.