Skip to content

Commit

Permalink
Merge pull request #10 from jbouder/code-quality-updates
Browse files Browse the repository at this point in the history
Code Quality Updates
  • Loading branch information
jbouder authored Aug 2, 2024
2 parents a611b6c + 811c534 commit 8099b97
Show file tree
Hide file tree
Showing 54 changed files with 2,842 additions and 538 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,39 @@ jobs:

- name: Run Vitest tests with coverage
run: npm run test:coverage

run-lint-checks:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Lint code
run: npm run lint

run-formatting-checks:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Format code
run: npm run format
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true
}
31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const pluginJs = require("@eslint/js");
const tseslint = require("typescript-eslint");
const reactPlugin = require("eslint-plugin-react");

module.exports = [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
settings: {
react: {
version: "detect",
},
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
reactPlugin.configs.flat.recommended,
{
rules: {
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-expressions": "off",
"react/prop-types": "off",
},
},
];
Loading

0 comments on commit 8099b97

Please sign in to comment.